Problem with Mercurial and Branches
Arne Babenhauserheide
arne_bab at web.de
Wed Jan 14 15:01:07 UTC 2009
Am Mittwoch 14 Januar 2009 12:19:54 schrieb Christian Krebs:
> # Create the source repo with the branches b1 and b2
> hg init source
> cd source
...
I just changed the script to switch back to source before merging and we get
the same problem, just with exchanged files:
------ ------ ------ ------ ------ ------ ------ ------ ------
> check file 1 on b2, expected '1.1.src'
1.1.src
> check file 2 on b2, expected '2.1.copy'
2.1.copy
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
> check file 1 on b1, expected '1.1.src'
1
> check file 2 on b1, expected '2.1.copy'
2.1.copy
------ ------ ------ ------ ------ ------ ------ ------ ------
It looks to me as if the first merge of b1 into b2 makes b1 cease to exist in
source.
The second merging of b1 in copy then has the same effects in copy, so when we
look only at branch b1 that branch has two unconnected "branch heads" and
Mercurial chooses the "branch head" which was added later in repo history [1].
That head is always the "branch head" which originates from the other
repository, and both "branch heads" are incomplete.
So updating to b1 is in fact ambigous, and I think Mercurial should warn about
that instead of updating to the tipmost revision in b1 - at least if none of
the "branch heads" is an ancestor of the other "branch head" and the older
"branch head" is no real head.
[1]: http://www.selenic.com/mercurial/wiki/index.cgi/NamedBranches
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: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.mercurial-scm.org/pipermail/mercurial/attachments/20090114/f0bb5410/attachment-0001.asc>
More information about the Mercurial
mailing list