imerge loosing changes?
Andreas Bernauer
bernauer at informatik.uni-tuebingen.de
Sat Apr 12 12:45:51 CDT 2008
Hi!
While playing around with the imerge extension, I saw imerge loosing
changes when merging.
In the following scenario
[0]--[1]--\
\ imerge to [3]
--[2]--/
while sitting at [2] and merging [1], in [3] some changes of a file from
[0]-->[1] are lost. I expected imerge to raise a conflict instead. Am
I missing something?
Here's an example:
Setup test directory and add file "hello.txt" containing "hello\nmy
friend". This leads to rev [1]:
#/------------------------------
~/tmp$ mkdir test2
~/tmp$ cd test2
~/tmp/test2$ echo hello > hello.txt
~/tmp/test2$ hg init
~/tmp/test2$ hg commit -Am hello
adding hello.txt
~/tmp/test2$ echo "my friend" >> hello.txt
~/tmp/test2$ hg commit -m 'added friend'
#\------------------------------
Then branch at rev [0] and change "hello.txt" to contain "hello\nmy
friends" (note the last 's'). This leads to head [2].
#/------------------------------
~/tmp/test2$ hg update -C 0
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
~/tmp/test2$ echo "my friends" >> hello.txt
~/tmp/test2$ hg commit -m 'added friends'
created new head
~/tmp/test2$ hg glog
@ changeset: 2:4ba0c9cf23a7
| tag: tip
| parent: 0:8304a5b15aff
| user: Andreas Bernauer <bernauer at informatik.uni-tuebingen.de>
| date: Sat Apr 12 19:22:42 2008 +0200
| summary: added friends
|
| o changeset: 1:a0c7e779d70b
|/ user: Andreas Bernauer
<bernauer at informatik.uni-tuebingen.de>
| date: Sat Apr 12 19:22:16 2008 +0200
| summary: added friend
|
o changeset: 0:8304a5b15aff
user: Andreas Bernauer <bernauer at informatik.uni-tuebingen.de>
date: Sat Apr 12 19:21:57 2008 +0200
summary: hello
#\------------------------------
Now I want to merge the two heads rev [1] and rev [2].
imerge gives me no conflicts, and hello.txt contains the text of rev 2:
#/------------------------------
~/tmp/test2$ hg imerge -r1
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
(branch merge, don't forget to commit)
U hello.txt
~/tmp/test2$ cat hello.txt
hello
my friends
#\------------------------------
However, I expected a conflict in hello.txt, as if I did 'hg merge':
#/------------------------------
~/tmp/test2$ hg update -C 2
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
~/tmp/test2$ cat hello.txt
hello
my friends
~/tmp/test2$ hg merge -r1
merging hello.txt
warning: conflicts during merge.
merging hello.txt failed!
0 files updated, 0 files merged, 0 files removed, 1 files unresolved
There are unresolved merges, you can redo the full merge using:
hg update -C 2
hg merge 1
Exit 1
~/tmp/test2$ cat hello.txt
hello
<<<<<<< local
my friends
=======
my friend
>>>>>>> other
~/tmp/test2$
#\------------------------------
Is this a bug in imerge or am I missing something? The archives and the
imerge web page did not help me.
Thank you for any input!
Andreas.
--
WSI/TI, Sand 13, B203, 72076 Tübingen
+49 70 71 29 75 940
http://www.ti.uni-tuebingen.de/Andreas_Bernauer.227.0.html
More information about the Mercurial
mailing list