Bookmarks with hg update question
David Demelier
demelier.david at gmail.com
Fri Jun 17 07:06:40 UTC 2016
Le 14/06/2016 17:48, James Reynolds a écrit :
> This isn't so bad if it's caught early, but now that current has
> "moved", the next time they do hg up current; hg bo bug/ticketnumber;
> they are now descended from the wrong place - tying these two tickets
> together and causing a lot of confusion amongst the developers.
>
> Asking my developers to always do hg log -r . seems like an
> unnecessary burden for topic branch management.
>
> Anyway, to summarize:
>
> 1. Is there a setting or something else that already exists that will
> prevent this behavior when doing hg up from a bookmark?
> 2. If not, is this a known problem / is this a problem at all?
> 3. Are we just abusing bookmarks in a way they weren't intended to be
> used?
>
> Ultimately, it's important for me and my team to maintain a topic
> branch system - this is the best way that we've found to collaborate
> across tickets, maintain rapid deploys, and generally keep the
> velocity at a high pace.
>
> I'd rather not have to fight with my VCS system for my team to productive.
>
> Any incite any of you can provide would be of great value to me.
>
> James Reynolds
Unfortunately, this is the expected behaviour. When using bookmarks, hg
update with no argument should be avoided except if you really know what
you are doing. The problem is that most users are used to call hg up
with no arguments because even hg pull write a hint to do 'hg update' to
update the working directory.
The easiest is to tell to your team to always update to the specified
bookmark, and if someone invoked hg update with no argument you can
recover the original bookmark location by doing hg pull -B
the_bookmark_name.
By the way, if I understand correctly, the current bookmark is the main
bookmark where new development takes place right? I suggest to name it
'@' because this bookmark name has the advantage of being activated by
default on brand new clones :)
Regards,
--
David Demelier
More information about the Mercurial
mailing list