Using Beyond Compare for Visual Diff in TortoiseHg
Asked Answered
M

2

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
Mourning answered 11/5, 2010 at 12:10 Comment(2)
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.Senator
@nc97217 Yes, it works from the command line. Also I am using the Pro versionMourning
M
23

Found the answer.

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

TortoiseHg and Beyond Compare

Mourning answered 11/5, 2010 at 13:51 Comment(5)
Do you know if the 3-way merge tool has to be set to beyondcompare3 too?Jairia
by the way, how did you found that out?Jairia
@Jairia - I have 3-way merge set to bcomp and it seems to work fine. I think it was just trial and error although I might have read something somewhere that gave me a pointer.Mourning
Does anyone know the setting to make this work with BC version 2? "BeyondCompare2" didn't work.Reduplicate
@Reduplicate - in MergeTools.rc (see my answer) there's also a section for Beyond Compare 2. Might be it can help you.Sinecure
S
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.

Sinecure answered 14/8, 2013 at 13:45 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.