Tag keyword (keyword extension)

Martin Geisler mg at daimi.au.dk
Sun Jul 13 07:07:15 CDT 2008


Benno Dielmann <lists at benno-dielmann.de> writes:

> Am Sonntag, 13. Juli 2008 schrieb Martin Geisler:
> | Benno Dielmann <lists at benno-dielmann.de> writes:
> | > Another issue: When I do
> | >
> | > $ hg tag "v0.1.1"
> | >
> | > and
> | >
> | > $ hg log
> | > changeset:   15:41ef68337479
> | > user:        Benno Dielmann <mail at benno-dielmann.de>
> | > date:        Sun Jul 13 00:12:03 2008 +0200
> | > summary:     Added tag v0.1.1 for changeset b96acc0afdd5
> | >
> | > changeset:   14:b96acc0afdd5
> | > tag:         v0.1.1
> | > user:        Benno Dielmann <mail at benno-dielmann.de>
> | > date:        Sun Jul 13 00:11:54 2008 +0200
> | > summary:     Tag und Revisionsnummer werden im Fenstertitel angezeigt
> | >
> | > ...
> | >
> | > the $Revision$ still expands to b96acc0afdd5. Shouldn't it be
> | > 41ef68337479? Other revisions work well, but changesets caused
> | > by tagging always evaluate to one changeset before the actual
> | > parent. Is this a bug or a feature?
> |
> | It's a feature :-) The effect you see is simply the result of how
> | tags are implemented in Mercurial: they are just recorded in a
> | .hgtags file which is versioned like any other file.
> |
> | The file contains (changeset, tag) pairs, one on each line. When
> | you create a new tag a new line is added to the file which is then
> | committed. That unfortunately means that the tag for revision 14
> | becomes effective in revision 15 (when .hgtags was committed).
>
> Yes, I know how tagging works in Mercurial. But since creating a tag
> is followed by a normal commit, the repository gets a new changeset
> number. So why doesn't it appear in the expanded Revision keyword?

That I don't know -- I have never used the keyword extension so I
didn't comment on your first question, and I guess I misread your
second question :-)

-- 
Martin Geisler

VIFF (Virtual Ideal Functionality Framework) brings easy and efficient
SMPC (Secure Multi-Party Computation) to Python. See: http://viff.dk/.


More information about the Mercurial mailing list