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

David Ei picture David Ei · Apr 26, 2011 · Viewed 7.7k times · Source

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?

Answer

Tim Henigan picture Tim Henigan · Apr 30, 2011

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.