Tagging idea

Greg Ward greg-hg at gerg.ca
Fri Nov 6 10:13:57 CST 2009


On Fri, Nov 6, 2009 at 7:09 AM, Martin Geisler <mg at lazybytes.net> wrote:
> But we talked some more, and came up with an idea: instead of letting
> tags *point* to revisions, we can let tags *be* revisions.
>
> What we mean by this is that a tag is a commit. So given
>
>  o --- o
>
> I can make a tag A by making a new commit with extra['tag'] = 'A':
>
>  o --- o --- A

Interesting idea.  But it might be purely academic unless you have a
really amazing time machine: we have to support .hgtags forever, so
adding a second tagging mechanism could be a real headache.

Also, this scheme would make a persistent tag cache utterly essential
rather than "nice to have for those people with 100+ heads".

One thing that occurred to me is that you could use .hgtags as an
amendment mechanism.  If tag A never changes, it stays in the 'extra'
field for the tagged changeset.  But if you need to point it to a
different, existing changeset, that update goes in .hgtags.

Cute, but I suspect the implementation would be ferociously complex.

Greg



More information about the Mercurial-devel mailing list