Tag keyword (keyword extension)

Benno Dielmann lists at benno-dielmann.de
Sat Jul 12 18:46:33 CDT 2008


Hi all, 

is there any keyword of the keyword extension that expands to the tag of a 
revision? 

I tried $Tags$, which gets in fact extended. Although always to $Tags: tip $.

I'd like to do something like this

__version__ = ' $Tags: tip $'.strip(' $').split(': ')[-1]

in my python script to automatically keep version numbers synchronized.

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?

Thanks in advance for any answer, 

Benno. 


More information about the Mercurial mailing list