multiple tags for a changeset (was Re: jdk7/MASTER/hotspot: 2 new changesets)

Kelly O'Hair Kelly.Ohair at Sun.COM
Fri Nov 16 21:57:17 UTC 2007


Actually, by having these be separate changesets, if you ask for the
tag "ea" you get a repository that includes the "jdk7-b98" tag but not
the changeset that creates the "ea" tag.
Making them in one changeset means the same sources, but no changeset
identifying it as jdk7-b98 or ea.

Also, 'hg tag -f' was used to force the replacement of any older tags
with the same name that might exist. Not sure your script deal with that.

Not sure it matters a great deal either way.

-kto


John Coomes wrote:
> Xiomara.Jayasena at Sun.COM (Xiomara.Jayasena at Sun.COM) wrote:
>> Changeset: 38b77760d8e2
>> Author:    xdono
>> Date:      2007-11-15 17:12 -0800
>> URL:       http://hg.openjdk.java.net/jdk7/MASTER/hotspot/rev/38b77760d8e2
>>
>> Added tag jdk7-b98 for changeset 280051e520a0
>>
>> + .hgtags
>>
>> Changeset: de9a59a5e8da
>> Author:    xdono
>> Date:      2007-11-15 17:21 -0800
>> URL:       http://hg.openjdk.java.net/jdk7/MASTER/hotspot/rev/de9a59a5e8da
>>
>> Added tag ea for changeset 38b77760d8e2
>>
>> ! .hgtags
> 
> In this case, the tags represent the same thing, but they refer to
> different changesets.  Seems like they should refer to the same
> changeset.  In addition, you get two changesets instead of one for a
> trivial operation.
> 
> Unfortunately, "hg tag" only allows one tag to be created per
> invocation.  (Seems ripe for a fix, but I'm currently
> python-illiterate.)  So for now I think this should be done by
> updating .hgtags directly.  Here's a script that does the basics; it
> needs error checking and polish, but you get the idea.
> 
> 	#!/bin/ksh
> 	hg_short=`hg log -l 1 --template "{node|short}"`
> 	hg_node=`hg log -r $hg_short --template "{node}"`
> 	for tag
> 	do
> 		echo $hg_node "$tag"
> 	done >> .hgtags
> 	hg commit -m "Added tags $* for changeset $hg_short"
> 
> -John
> 



More information about the build-dev mailing list