2
votes

We used to use Visual Source Safe and there was one neat feature that I can't find in TortoiseHG. You right click on a file and click "Show history". VSS opens a list of versions for that file. Then you select two versions (ie: version 50 and version 47) and click the compare button to launch a visual diff of the two versions.

How can I do that with Mercurial/TortoiseHG? I saw the annotate feature but only compares consecutive versions of a file.

2

2 Answers

2
votes

You can do that in TortoiseHG's Repository Explorer:
Mark one version, right-click on another version and a context menu will pop up.
In that context menu, choose "Visual Diff with Selected".

EDIT:
@Sly:
Instead of using the filter box, you could right-click on class1.cs in the Windows Explorer and open the Repository Explorer from there. When you do that, the filter is already active and you see only the changesets where class1.cs was involved.
This makes step 1 much easier (at least in my opinion, I always do it that way) AND it completely eliminates step 4 and 5 (the list doesn't appear at all since there is only one file to diff).

1
votes

I've found it faster to do the below than to fiddle with TortoiseHG for the purpose you describe.

Install Winmerge at the default location;

Then, modify your global hgrc to have this. (Mercurial.ini in Windows)

[extdiff]
cmd.guidiff = C:\Program Files\WinMerge\WinMergeU.exe

And, then,

hg guidiff -r rev1 -r rev2

on the command-line.

Note that you can use kdiff3 or whatever as your GUI diff client.