New tag behavior

Matt Mackall mpm at selenic.com
Thu Mar 15 16:36:19 UTC 2007


I've put an improved tag-handling algorithm in mainline and -stable.
It works like this:

Tags are computed by reading the .hgtags file from each head in
revision number order (ending with the tip), followed by reading
.hg/localtags.

In a given .hgtag file, if two or more tags of the same name appear,
the last one "supercedes" the others.

If a tag in one head supercedes a tag in another, it takes precedence.
If two tags mutually supercede each other, the one with the largest
superceding set wins. Otherwise the tipmost tag takes precedence.

Finally, a tag to the null revision is considered to delete a tag,
which can now be done with 'hg tag --remove foo'. Before, it was
necessary to manually edit your tag files on each head where the tag
was present.

-- 
Mathematics is the supreme nostalgia of our time.



More information about the Mercurial mailing list