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

John Coomes John.Coomes at
Fri Nov 16 21:49:31 UTC 2007

Xiomara.Jayasena at Sun.COM (Xiomara.Jayasena at Sun.COM) wrote:
> Changeset: 38b77760d8e2
> Author:    xdono
> Date:      2007-11-15 17:12 -0800
> URL:
> Added tag jdk7-b98 for changeset 280051e520a0
> + .hgtags
> Changeset: de9a59a5e8da
> Author:    xdono
> Date:      2007-11-15 17:21 -0800
> URL:
> 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.

	hg_short=`hg log -l 1 --template "{node|short}"`
	hg_node=`hg log -r $hg_short --template "{node}"`
	for tag
		echo $hg_node "$tag"
	done >> .hgtags
	hg commit -m "Added tags $* for changeset $hg_short"


More information about the build-dev mailing list