How do I visually diff two revisions of files in TortoiseHg 2.0.3?

8.2k views Asked by At

In TortoiseHg 1.7, I could point Hg Repository Explorer at file and see a list of versions. Selecting 2 versions and right-clicking allowed me to launch my favorite Visual Diff tool to display their differences.

I recently upgraded to TortoiseHg 2.0.3 and can't find a way to visually diff anything except the working file with the tip version. "Revision History" shows a list similar to the old Repo Explorer, but doesn't seem to have a way to lanch a visual diff. Has this featured been removed?

2

There are 2 answers

1
dls On

I'm pretty sure you can do this diff in TortoiseHg v2.0.3 - try selecting one revision by clicking and then CTRL-clicking on another revision and selecting "Visual Diff...".

I can't test this right now because I have to use v1.1.7 for unrelated reasons, but during my time working with v2.0.X I was able to do this. The bitbucket link you included looks like it's for a button to perform the visual diff, not the underlying feature.

NOTE: I was able to get a co-worker to test this, it does work (at least in some fashion) in TortoiseHg v2.0.3

5
Tim Henigan On

As noted by @dls, you can get a visual diff of any two revisions of the repo by:

  1. Clicking on the first revision
  2. Holding CTRL and and left-clicking on the second revision
  3. Right-click on either revision
  4. From the context menu, select Visual diff...
  5. This method works with your user-defined external diff program (default is kdiff3)

enter image description here


TortoiseHg v2.0.x also includes a feature to diff arbitrary versions of a single file.

  1. Open the manifest window
  2. Right-click on the file
  3. Select Compare file revisions

This opens the Hg file log viewer as shown below:

enter image description here

From this window, you can diff arbitrary versions of the file. Select the before revision in the upper-left. Select the after revision in the upper-right. The bottom half of the window shows a visual diff.