Configuring WinMerge for Mercurial
Posted by kimmov on December 16, 2008
In earlier post I wrote about WinMerge and TortoiseHG. Unfortunately there is nothing new to tell about that. Mainly because I’ve been busy with many other things. But I’ll update the Todo item #2190215 TortoiseHG integration when there is something happening.
Meanwhile, there are instructions in Mercurial wiki about configuring WinMerge to work with Mercurial. The instructions assume WinMerge is in $PATH. After the installer this isn’t unfortunately true. Feature request for it is #2029425 Installer: option to add WinMerge to PATH and I’ve just submitted a patch: #2435175 Installer: Add WinMerge to system path.
The important part in the wiki page is how and what paths to give to WinMerge. This line describes it:
winmergeu.args=/e /ub /dl other /dr local $other $local $output
which looks lengthy so I’ll explain it briefly:
- -e – tells WinMerge to close with single ESC key press
- /ub – disables adding paths to MRU list in Open-dialog
- /dl other - gives left-side file a label ‘other’
- /dr local – gives right-side file a label ‘local’
- $other and $local are paths to open
- $output is the path where the merged file is written to
More about WinMerge command line in Online manual.
This command line format is what I’ve always looking for when I’m integrating WinMerge with some program. Now that the correct command line is known (to work) it is a lot easier to figure out rest of the pieces.
And if I understood tksoh’s comment in Todo item #2190215 correctly then we only need to add these settings for Mercurial, not for TortoiseHG.