imerge passes file with conflict markers to merge tool
David Shilvock
davels at telus.net
Thu Nov 6 10:07:05 CST 2008
(Mercurial 1.0.2 on WinXP)
if I use imerge to start a merge process, then try to use a graphical merge
tool to resolve conflicts, the 'orig' file will have conflict markers in it
which messes things up. Example:
> hg imerge -a 4
2 files updated, 0 files merged, 0 files removed, 0 files unresolved
(branch merge, don't forget to commit)
merging fileb
merging filea
warning: conflicts during merge.
merging filea failed!
R fileb
U filea
I now have 'filea' with conflict markers in it and 'filea.orig' which is the
clean version of the file. If I decide to use my graphical merge tool to
fix this it won't do the right thing.
> hg imerge merge filea
The merge tool uses the file with conflict markers as the 'orig' file.
Canceling the merge will show that 'filea.orig' has been overwritten with
'filea', so both files now have conflict markers in them.
The problem seems to be that imerge eventually calls filemerge.filemerge to
do the merge. filemerge assumes that the file is clean and copyies it to
file.orig to start the merge.
One possible solution would be to change the api of filemerge to allow the caller to
specify the clean copy of the file and skip the default logic.
--
DS
More information about the Mercurial
mailing list