[issue2007] hg pull --rebase merges in the wrong direction

Justin Lebar bugs at mercurial.selenic.com
Sat Jan 30 03:55:59 UTC 2010


New submission from Justin Lebar <justin.lebar at gmail.com>:

When using merge=internal:merge, merge conflicts in an hg pull --rebase are
labeled incorrectly.  The chunk local to the current repository is labeled
"other", and the chunk from the remote repository is labeled "local".

Steps to reproduce:

~$ mkdir repo1
~$ cd repo1
~/repo1$ hg init
~/repo1$ echo 'ABC' > file
~/repo1$ hg add file
~/repo1$ hg ci -m "file contains ABC"
~/repo1$ cd ..
~$ hg clone repo1 repo2
~$ cd repo2
~/repo2$ echo '111' > file
~/repo2$ hg ci -m "file contains 111"
~/repo2$ cd ../repo1
~/repo1$ echo '222' > file
~/repo1$ hg ci -m "file contains 222"
~/repo1$ cd ../repo2
~/repo2$ hg pull --rebase
pulling from /home/jlebar/repo1
searching for changes
adding changesets
adding manifests
adding file changes
added 1 changesets with 1 changes to 1 files (+1 heads)
(run 'hg heads' to see heads, 'hg merge' to merge)
merging file
warning: conflicts during merge.
merging file failed!
abort: fix unresolved conflicts with hg resolve then run hg rebase --continue

~/repo2$ cat file
<<<<<<< local
222
=======
111
>>>>>>> other

----------
messages: 11542
nosy: jlebar
priority: bug
status: unread
title: hg pull --rebase merges in the wrong direction

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


More information about the Mercurial-devel mailing list