19

I am trying to use Beyond Compare for Visual Diff in TortoiseHg. eg Right click on a modified file in explorer and select Visual Diff from TortoiseHg context menu...

BeyondCompare opens but only shows the 'welcome' screen and not the file I want to diff. Am I missing something?

I have setup the mercurial.ini file as follows:

  [extensions]
  extdiff =

  [extdiff]
  cmd.bcomp = C:\Program Files (x86)\Beyond Compare 3\BCompare.exe
  opts.bcomp = /ro

  [tortoisehg]
  vdiff = bcomp

  [merge-tools]
  bcomp.executable = C:\Program Files (x86)\Beyond Compare 3\BComp
  bcomp.args = $local $other $base $output
  bcomp.priority = 1
  bcomp.premerge = True
  bcomp.gui = True

  [ui]
  merge = bcomp
Geoff Appleford
  • 18,538
  • 4
  • 62
  • 85
  • Does it work from the command line? In the repository, `hg bcomp` or `hg bcomp -r rev1 -r rev2 file`. Also, BC3 comes in two flavors: Standard (which doesn't have merging) and Pro (which does). If you're using Standard, try removing the [merge-tools] and [ui] sections. – Niall C. May 11 '10 at 12:46
  • @nc97217 Yes, it works from the command line. Also I am using the Pro version – Geoff Appleford May 11 '10 at 12:57

2 Answers2

23

Found the answer.

Visual Diff Tool in TortoiseHg Global Settings had to be set to 'beyondcompare3' instead of 'bcomp'.

TortoiseHg and Beyond Compare

Geoff Appleford
  • 18,538
  • 4
  • 62
  • 85
3

In our case the same problem happened when we added mercurial.ini to TortoiseHG. It looks like by default configuration comes from TortoiseHG\hgrc.d folder. Specifically diff and merge tools configuration can be found in MergeTools.rc.

Just for the reference, here is how Beyond Compare 3 can be configured manually in mercurial.ini:

[merge-tools]
bcomp.executable = C:\Program Files (x86)\Beyond Compare 3\BComp.exe
bcomp.priority = 1
bcomp.premerge = True
bcomp.gui = True

bcomp.args=$local $other $base /mergeoutput=$output /ro /lefttitle=parent1 /centertitle=base /righttitle=parent2 /outputtitle=merged /automerge /reviewconflicts /solo
bcomp.diffargs=/lro /lefttitle='$plabel1' /righttitle='$clabel' /solo /expandall $parent $child
bcomp.diff3args=$parent1 $parent2 $child /lefttitle='$plabel1' /centertitle='$clabel' /righttitle='$plabel2' /solo /ro
bcomp.dirdiff=True

Notice that there's no need in enabling extdiff extension. Also TortoiseHG should be restarted to apply this setting.

Ilia Barahovsky
  • 10,158
  • 8
  • 41
  • 52