Red Hat Bugzilla – Bug 477845
Mercurial merge conflicts executes MacOS merger program
Last modified: 2008-12-24 07:29:10 EST
Description of problem:
While merging two branches in Mercurial, conflicts happened.
I don't have any merger program installed with Mercurial.
That didn't stop Mercurial from trying to run a MacOS merger program (which obviously fails at a Linux system)
Version-Release number of selected component (if applicable):
Fedora 9, Mercurial 1.1 (mercurial-1.1-1.fc9.i386)
Make a merge conflict
$ hg update -C submit # 'submit' is one branch
$ hg merge trunk # Trying to merge with 'trunk'
# I extracted the two relevant cases from the output
# This merge was ok, nothing special happened
sh: /Developer/Applications/Utilities/FileMerge.app/Contents/MacOS/FileMerge: No such file or directory
merging MicropolisCore/src/MicropolisEngine/zone.cpp failed!
# And this one is not.
# As you can see, the program tries running a file from /Developer, which does not exist at a Linux system.
I expected Mercurial to dump various file versions of each failed merge onto the disc, so I can figure it out manually.
I searched for the cause of the above behaviour.
It seems to be caused by the /etc/mercurial/hgrc.d/mergetools.rc file.
It contains the above path, and a lot of other path and configuration settings for many merger programs.
However, the file seems to be copied unpatched, and contains a lot of nonsense:
(some random lines from that file to demonstrate)
tortoisemerge.args=/base: $output /mine:$local /theirs:$other /merged:$output
The last one looks familiar, doesn't it :)
As a test, I commented all key/value pairs of the section out (ie just leaving the [merge-tools] header at line 3), and re-tried the merge.
In this situation, Mercurial does not run the /Developer file, and indeed just dumps a xxx.y and a xxx.y.orig file for each failed merge, as expected.
Will install as mergetools.rc.sample