Problem with Mercurial and Branches
Arne Babenhauserheide
arne_bab at web.de
Tue Jan 13 11:32:52 CST 2009
I just did a short test which shows a quite strange result:
I am in the copy repository.
$ hg diff -r -2:-1
diff --git a/file-2.txt b/file-2.txt
--- a/file-2.txt
+++ b/file-2.txt
@@ -1,1 +1,5 @@
+<<<<<<< local
2.2
+=======
+2.1.copy
+>>>>>>> other
So the merge patch shows quite clearly the content I'd expect in the file.
But:
$ cat file-2.txt
2.1
The repo history looks like this:
$ hg glog -q
o 7:1f4a3332e450
|\
| o 6:207a6199d2a5
| |\
| | @ 5:1bec637ef669
| | |
o | | 4:c6f5de0b9f82
|\| |
o---+ 3:81d5cd20a928
/ /
o / 2:3384f61cc738
|/
o 1:1e6f09824287
|
o 0:115b72919439
It smelled like a very strange bug to me - 2 seconds ago.
Now I did
$ hg up tip
$ $ cat file-2.txt
<<<<<<< local
2.2
=======
2.1.copy
>>>>>>> other
Seems we're still in branch b1!
I ran the script again to verify it in a clean repository, and verified it:
$ hg branch
b1
No work has been lost and a commit will create a new head.
This was the line which created problems:
------ ------ ------ ------ ------ ------ ------ ------ ------
local-path\copy>hg up b1
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
------ ------ ------ ------ ------ ------ ------ ------ ------
It has to read
$ hg up b2
Since we're now in branch b2 and branch b1 was merged into b2, but it doesn't
continue inside that merge in b2.
Best wishes,
Arne
--
-- Ein Würfel System: http://1w6.org - einfach saubere (Rollenspiel-) Regeln.
-- Infinite Hands: http://infinite-hands.draketo.de - singing a part of the
history of free software.
-- My stuff: http://draketo.de - stories, songs, poems, programs and stuff :)
-- PGP/GnuPG: http://draketo.de/inhalt/ich/pubkey.txt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
Url : http://selenic.com/pipermail/mercurial/attachments/20090113/f8785b5f/attachment.pgp
More information about the Mercurial
mailing list