Why are tags in commits

Christophe HENRY listes at sbgodin.fr
Mon Feb 25 11:39:12 UTC 2013


Le Mon, 25 Feb 2013 11:17:19 +0000
"Kastner Masilko, Friedrich" <kastner-masilko at at.festo.com> a écrit :

> You are free to use a dedicated branch if you want. But why
> restricting this in the system? After all, it is part of the history
> to create a tag at a certain position in the DAG. Imagine 2 users
> working on a project. Both work in the default named branch, but
> since we are distributed, both have independent clones. Both add a
> tag for an old changeset (that both have in common in their clones),
> but use different names. Now they push/pull to each other (or a
> common "server" repo). Naturally a merge (or 2 heads) occur.
> Regardless of what tag you now use in the end, the history of both
> actions is registered. If the system would only allow a certain
> branch or some other unifying mechanism, one of the actions is lost.
> Also, since global tag commits are not different to other commits,
> you can always use rebasing and/or grafting to fix such a mistake
> before pushing.

I get the point. I didn't expect tagging to be so not-simple :-o But,
after all, this is a good thing. 


> > Second, provided that we pull all the repository, how does
> > Mercurial knows what is the current state of the tags? Does it
> > take the oldest one? I didn't make an test yet.
> 
> It is described in the documentation I linked to. Please read up on
> it.

In a nutshell, the last changed wins. I made tests and got it.


> I still don't understand what your point is. Is tagging working for
> you or not? Did you migrate from another VCS system, so you are used
> to another form of tagging and just curious about how it was
> implemented the way it is? Are you interested in the reasoning that
> lead to the current tag design?

The tagging is fully working for me. I'm just curious to see what
would happen when workflows get more complex. I'm also looking at
other DVCS and the way they work.


About my idea to keep all tags in a dedicated branch. It would work, I
think, but would be pointless as people put tags related to their
branch. I got the point too.

The situation is now clear for me. Thanks a lot for the explanations.

Regards,

-- 
Christophe HENRY
FR EO EN - http://www.sbgodin.fr
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://lists.mercurial-scm.org/pipermail/mercurial/attachments/20130225/7d8bc550/attachment.asc>


More information about the Mercurial mailing list