same name for bookmark, tag and branch

Sean Farley sean at farley.io
Tue Jun 28 05:27:11 UTC 2016


Uwe Brauer <oub at mat.ucm.es> writes:

> Hi
> Date: Sat, 25 Jun 2016 09:30:08 +0000
>
> This is just an experiment, I would never do that in real live
>
> I started a fresh repo added a file and 2 commits.
>
>     -  Then I added the tag master, edit and commit,
>
>     -  then the branch master, edit and commit,
>
>     - and then the bookmark master (abort: a bookmark cannot have the
>       name of an existing branch) that seemed logical.
>
> So I tried it the other way around
>
> I started a fresh repo added a file and 2 commits.
>
>     -  Then I added the tag master, edit and commit,
>
>     -  then the bookmark master
>     
>     -  then the branch master, edit and commit,
>
> That was accepted, but now
>
> Hg update master *always* ended where the bookmark was, the tag was ignored.

The order is defined in context.py:changectx:__init__()

> Shouldn't there be a warning as well, 
>
>     - once a tag is given the same name should not be used as a branch
>       or as a bookmark,
>
>     -  once a bookmark is chosen, that name should not be used for a tag
>        or a branch?

Yeah, that's something we should at least talk about.



More information about the Mercurial mailing list