[issue1740] Incorrect merge of deleted and resurrected files

Jesse Glick mercurial-bugs at selenic.com
Thu Jul 16 15:16:06 UTC 2009


New submission from Jesse Glick <jesse.glick at sun.com>:

Observed in the http://hg.netbeans.org/main-silver/ repository. Seems to be
the same in Hg 1.2.1 or 1.3.

Update to 954fd2978ace and merge with 5c4f8f0e5379. Two problems emerge.


1. There are 50 questions of the form

remote changed nbbuild/test/unit/src/org/netbeans/nbbuild/TestDeps.xml which
local deleted
use (c)hanged version or leave (d)eleted? 

This is incorrect as far as I know. These files were accidentally deleted in
2e37fbc109a4, then resurrected in be85c2e1048d (parented to the former for
ease of backing out). 954fd2978ace has as an ancestor the buggy 2e37fbc109a4
but not the fix be85c2e1048d; 5c4f8f0e5379 has the fix as an ancestor. The
merge algorithm should have realized that the deletion in one parent was
already superseded by the resurrection in the other parent, i.e. there is no
true conflict: the merge should result in these files being present with no
prompt.


2. Although these 50 files are prompted for, the following files are not
prompted for:

nbbuild/test/unit/src/org/netbeans/nbbuild/ModuleStateSelectorTest.java
nbbuild/test/unit/src/org/netbeans/nbbuild/data/Category.png
nbbuild/test/unit/src/org/netbeans/nbbuild/data/columnIndex.gif
nbbuild/test/unit/src/org/netbeans/nbbuild/data/instanceBroken.gif
nbbuild/test/unit/src/org/netbeans/nbbuild/data/instanceObject.gif

and these are (incorrectly) left deleted in the working dir when the merge
finishes. I have no idea why these five are treated differently than the rest.

Also it says

merging
java.kit/test/qa-functional/src/org/netbeans/test/ide/MemoryValidationTest.java

but this file was again an accidental modification and was reverted to its
prior state in the correction fix, so no three-way merge ought to have been
required. In this case the resulting state is correct despite the
unnecessary file merge.

----------
messages: 10057
nosy: jglick
priority: bug
status: unread
title: Incorrect merge of deleted and resurrected files
topic: merge

____________________________________________________
Mercurial issue tracker <mercurial-bugs at selenic.com>
<http://mercurial.selenic.com/bts/issue1740>
____________________________________________________



More information about the Mercurial-devel mailing list