Setting up Mercurial/TortoiseHg to work with UltraCompare

Posted by Tim Pietzcker on Stack Overflow See other posts from Stack Overflow or by Tim Pietzcker
Published on 2010-03-07T08:52:51Z Indexed on 2010/04/11 5:03 UTC
Read the original article Hit count: 349

Hi,

I'm trying to get my favorite Windows diff/merge tool, UltraCompare (V7.00) to work with Mercurial/TortoiseHg. I have set up UltraCompare in my Mercurial.ini like this (only relevant bits shown):

[merge-tools]
UltraCompare.executable = C:\Programme\IDM Computer Solutions\UltraCompare\uc.com
UltraCompare.args = $base $local $other
UltraCompare.priority = 1
UltraCompare.gui = True
UltraCompare.binary = True
UltraCompare.checkconflicts = True
UltraCompare.checkchanged = True

However, the three-way-merge fails. The path names get messed up if the path to the repository that is being merged to contains a space.

I have done some more testing, and I've found out (using Process Explorer) that uc.com is called with a broken command line if there is a space in the repository's path:

Compare

"C:\Programme\IDM Computer Solutions\UltraCompare\uc.exe" " "c:\dokume~1\tim~1.pie\lokale~1\temp\test.txt~base.akr6au" "E:\Eigene Dateien\test\test-merge\test.txt" "c:\dokume~1\tim~1.pie\lokale~1\temp\test.txt~other.b92442"

and

"C:\Programme\IDM Computer Solutions\UltraCompare\uc.com" "c:\dokume~1\tim~1.pie\lokale~1\temp\test.txt~base.e7vryp" "E:\test\test-merge\test.txt" "c:\dokume~1\tim~1.pie\lokale~1\temp\test.txt~other.u_qxme"

There is an extraneous " after the path of the executable in the first example - not in the second (which works fine).

To me, it seems as if UltraCompare is doing everything right, and that Mercurial/TortoiseHg are passing a defective command line to it. Would you say so, too? Is there a workaround?

I've just updated to Mercurial 1.5/TortoiseHg 1.0, and the problem persists. Support for other merge tools (Beyond Compare and others) has been added, sadly not UltraCompare...

© Stack Overflow or respective owner

Related posts about mercurial

Related posts about tortoisehg