Bug 477845 - Mercurial merge conflicts executes MacOS merger program
Mercurial merge conflicts executes MacOS merger program
Status: CLOSED NEXTRELEASE
Product: Fedora
Classification: Fedora
Component: mercurial (Show other bugs)
9
All Linux
low Severity high
: ---
: ---
Assigned To: Neal Becker
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-12-24 02:20 EST by alberth289346
Modified: 2008-12-24 07:29 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-12-24 07:29:10 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description alberth289346 2008-12-24 02:20:24 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)

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 07:29:10 EST
Will install as mergetools.rc.sample

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