Unexpected parent after 'hg tag'
Benoit Boissinot
bboissin at gmail.com
Wed Oct 15 10:58:06 CDT 2008
On Wed, Oct 15, 2008 at 5:45 PM, Kauker, Hubert
<Hubert.Kauker at travelbasys.de> wrote:
> Hello,
>
> I have observed the tip getting an unexpected parent after 'hg tag'.
> This occurs when 'hg pull' and 'hg push' were done before.
>
> [snip]
> then tagging again, one should expect that the tag is applied to changeset 2
> and just the following new changeset appears at the top:
>
> Strangely, I have observed a case where I got the following result:
>
> $ hg tag v2
>
> $ hg log
> changeset: 3:191420634eb4
> tag: tip
> parent: 1:b4bb35d70814
> summary: Added tag v2 for changeset b4bb35d70814
>
> changeset: 2:423ea6cde59c
> summary: some change
>
> changeset: 1:b4bb35d70814
> tag: v2
> summary: Added tag v1 for changeset 1c9966c3286b
>
> changeset: 0:1c9966c3286b
> tag: v1
> summary: original version
>
> NOTE: the tag is given to changeset 1 and the tip has a different parent
> now.
>
> This can be reproduced in Mercurial Distributed SCM (version 1.0.2+20080813)
> by the following Windows script:
>
> hg init repo
> cd repo
> echo 000 >>file0
> hg addremove
> hg commit -u demo -m "original version"
> hg tag -u demo v1
> cd..
>
> hg clone repo repo1
> cd repo1
> echo 111 >>file1
> hg addremove
> hg commit -u demo -m "some change"
> hg pull ..\repo
> hg push ..\repo
> cd..
>
> cd repo
> hg log
hg parents will say "1:xxx"
whereas tip is "3:xxx"
> hg tag -u demo v2
this will create the tag as the parent of the working dir.
And it will tag the parent of the working dir (ie: 1:xxx)
regards,
Benoit
More information about the Mercurial
mailing list