hg annotate -w/-b/-B (whitespace flags) in TortoiseHg - mercurial

Is there a way, in TortoiseHg, to hide whitespace changes when annotating file?
I know that there's an option in hg, but didn't see a support for it in TortoiseHg.
I'm having nightmares, searching for the changeset where the actual change has took place...

You can set flags in TortoiseHg settings. Open section "Diff and Annotate" and select options you want.
Screenshot:

Related

Reviewboard does not recognize .diff file mercurial

Before committing I export my code changes in mercurial like
hg diff -r tip > d.diff or hg export -o d.diff It creates a nice .diff When I upload this to review board it returns empty diff file.
File is not empty. How can I fix this?
The workflow you are using (manual hg diff + diff file upload via web browser) is painful and lacks flexibility. When an error occurs, reviewboard is not very helpful in explaining what is going on (to use an euphemism :-).
I suggest two different approaches, which often work out of the box. They are in order of preference from my point of view (that is, I prefer option 1 to option 2).
Use the hgreviewboard extension. This allows to stay in hg for all reviewboard operations: hg postreview ... will do the diff and upload to reviewboard. hg help postreview will explain all the options and the advanced usage.
Use the post-review script, provided by reviewboard.org. This approach also allows to avoid the manual steps of the browser upload. The link above has full documentation.

TortoiseHg shelve-update-unshelve shortcut

Using TortoiseHg Workbench, almost every time I pull from a remote repository, I have uncommitted code changes so that I need to shelve them before I update and then unshelve them again.
Is there a way to do this all in one click? I seem to remember being able to do this when I used Git (perhaps with GitHub for Windows).
Follow-up or comments
Tried to add button to THG GUI
Defined new tool in Tools menu
Added to toolbar (failed, no buttom on toolbar, I suppose, due to icon size /small/ - using path to big icon file instead of embedded may change visibility result)
Tried to add to Revision Context Menu and use added feature
As you can see - button added, but command failed (for unknown reason): using plain hg for PATH\hg.exe is recommendation from "Define tool" window from THG

Hg: History of chunks of a (moved) file

How can I browse the history of a chunk of a file, or the whole file if only that is possible, oven though the file was moved?
For example, file r/a/b.txt was moved to r/b.txt but had a history while in r/a,and I would like to see that history, if possible focused on a certain chunk/set of lines of the file.
You see the history of a file with
hg log --follow your-file
This will simply list the changesets that touch the given file. You can add --patch if you want to see the patches along with the log messages.
I don't know of a tool that can focus on a particular hunk. The closest is the annotate command. I always use it from TortoiseHg (works on all Windows, Mac, and Linux) which allows you to right-click on a given line and annotate the parent changeset of the changeset that touched the line. That makes it really convenient to "peel off" layers of history in the file.

How do I change the template .hgignore used for new repositories?

When I create a new repository, I can ask TortoiseHG to give me a .hgignore file. Is there a way that I can customise what that file will look like, rather than having to go and get one manually from somewhere every time?
It's an old question, put still popped up as the first result on google, so here is an update:
In the TortoiseHg settings under the tab TortoiseHg users can specify the path of a Repo Skeleton. You can put your predefined .hgignore there, and it will be automatically copied during hg init.
See also:
#3569 Allow user-defined default .hgignore file when creating a new repository
TortoiseHG Docs
Like Tim already said in his comment, apparently it's not possible to do this.
Take a look at the following issue from TortoiseHG's bug tracker:
#966 Include some reasonable defaults in .hgignore on repo creation
Quotes from this link, both by Steve Borho (THG project lead):
This topic comes up on the Mercurial mailing list once a year or so and Matt always shoots it down. There is already support for user level ignore files; one could add these globs to a global file and be done with it.
and:
If a user has files or directories that they always want to ignore, they can add those to a global ignore file without having to introduce any new behaviors in THG.
So putting the things you always want ignored in a user-global ignore file seems to be the only option (even though it's not exactly what you're asking for):
Would like to create some defaults for my .hgignore files in TortoiseHG/Mercurial
(the question that I posted in my comment above)
Global hgignore usage

In Mercurial, How to check the revision log of a specific folder?

So here is an example folder hierarchy:
c:\MyProject
c:\MyProject\Folder1
c:\Myproject\Folder2
In SVN, If I am only interested in looking at the history of changes in c:\MyProject\Folder1 I could just navigate to that folder, right click and view log.
With Mercurial doing the same thing shows all the changes in the entire MyProject. Is there a way to filter out and show me only changes in Folder1 (And its sub-folders) ?
It pretty much works as you would expect, same as for svn log:
hg log c:\MyProject\Folder1
In TortoiseHG, you right-click on Folder1 and open the Repository Explorer from there.
This automatically sets the filter in the Repository Explorer to show only the history of this folder.
Something similar is described here (for single files instead of folders, but you get the idea...)
In the new style tortoise hg (Hg Workbench) you can achieve this by right clicking and selecting TortoiseHg => Revision History on a folder in your repo.
What this actually does is filter (ctrl+s) like this file('path:some/relative/path')
Old question, but: if you installed only TortoiseHg with no explorer extensions, then you can press Ctrl-S in it and enter the revision query file("path:SOME/PATH").