17

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?

mwolfe02
  • 23,787
  • 9
  • 91
  • 161
David Ei
  • 191
  • 1
  • 5

3 Answers3

25

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.

Tim Henigan
  • 60,452
  • 11
  • 85
  • 78
  • My log file viewer doesn't look like yours. It is missing the two right-hand panes. Right-clicking on the file in the pane I do have (similar to your upper-left pane) does nothing. I'm running TortoiseHG 2.0.3.Any suggestions? – David Ei May 02 '11 at 12:53
  • 1
    @David: I installed v2.0.3 and it works for me. Did you follow the directions to get to the viewer? (i.e. 1. Open the `manifest` window, 2. Right-click on file, 3. Select `Compare file revisions`)? – Tim Henigan May 02 '11 at 14:10
  • 1
    (Q1) is there a way to make such a revision comparison, but launching my favourite diff tool, instead of this *embedded* THg diff screen? (Q2) if I start my favourite external diff tool on the file revision history by using the CTRL-click double selection, and between the two revisions the file has moved, one of the diff tool panes reports [non-existant]@... and it is empty. Any workaround? – superjos Jun 26 '12 at 18:33
  • on tortoise hg v4 it does not work - ctrl-click unselects current revision rather than selecting both revisions. HOWEVER. There is "diff to local" and "diff to parent". So you could make one revision local and then "diff to local" on the other revision. – DenNukem Nov 11 '16 at 00:00
  • @DenNukem Ctrl+click works for me in THG v4 on Win10. – George Marian Feb 23 '17 at 21:41
0

A co-worker found the answer on bitbucket. This feature was not implemented in TortoiseHg 2. It will probably be added to the next release in July. See: https://bitbucket.org/tortoisehg/thg/issue/260/visual-diff-button-in-hg-log-viewer

David Ei
  • 191
  • 1
  • 5
0

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

dls
  • 4,146
  • 2
  • 24
  • 26
  • That doesn't seem to work for me in the log file viewer. There's no Visual Diff option. This does work in the workbench, but the visual diff is of the entire repository, not a single file. I have found a work-around in that from this repo diff you navigate to the file whose diff you want to see. – David Ei Apr 29 '11 at 12:49