Bug 477845 - Mercurial merge conflicts executes MacOS merger program
Summary: Mercurial merge conflicts executes MacOS merger program
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: mercurial
Version: 9
Hardware: All
OS: Linux
low
high
Target Milestone: ---
Assignee: Neal Becker
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-12-24 07:20 UTC by alberth289346
Modified: 2008-12-24 12:29 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-12-24 12:29:10 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description alberth289346 2008-12-24 07:20:24 UTC
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)

How reproducible:
Make a merge conflict

Actual results:
$ 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

merging MicropolisCore/src/MicropolisEngine/utilities.cpp
# This merge was ok, nothing special happened

merging MicropolisCore/src/MicropolisEngine/zone.cpp
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.

Expected results:
I expected Mercurial to dump various file versions of each failed merge onto the disc, so I can figure it out manually.

Additional info:
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)

kdiff3.regkey=Software\KDiff3
kdiff3.regappend=\kdiff3.exe

gvimdiff.regkey=Software\Vim\GVim

tortoisemerge.args=/base: $output /mine:$local /theirs:$other /merged:$output
tortoisemerge.regkey=Software\TortoiseSVN

filemerge.executable=/Developer/Applications/Utilities/FileMerge.app/Contents/MacOS/FileMerge

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.

Comment 1 Neal Becker 2008-12-24 12:29:10 UTC
Will install as mergetools.rc.sample


Note You need to log in before you can comment on or make changes to this bug.