Bookmarks with hg update question
Steve (Gadget) Barnes
gadgetsteve at hotmail.com
Sat Jun 25 05:05:58 UTC 2016
On 24/06/2016 23:39, Jensen, Aaron wrote:
>> regarding backwards compatibility, I was tinkering around internally
>> in Mercurial and came up with a patch that maintains backwards
>> compatibility via an .hgrc setting (in .hg/hgrc or some other place)
>> you would set:
>>
>> [bookmarks]
>> noupdate =
>
> If a setting like this is introduced, I would prefer that it be used to force Mercurial to use previous behavior. Otherwise, I've got to update everyone's global mercurial.ini and if I miss someone or they remove that setting, there is still a possibility of corruption.
>
> I'd support a `moveonupdate` setting that causes Mercurial to use current "move on update" behavior.
>
> [bookmarks]
> moveonupdate =
> _______________________________________________
> Mercurial mailing list
> Mercurial at mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial
>
The downside of which is, of course, that it changes previous default
behaviour which, for very good reasons, Mercurial very rarely does,
**Thanks Devs this makes life a lot simpler**. Possibly a way to avoid
confusion would be to have both settings, or either with a true/false
value, AND make the default action on every update that would move a
bookmark to prompt the user, preferably with a message that also
reminded them which setting to change to set their default behaviour.
For maximum backwards compatibility this could try to detect if it is
being run from a non-interactive session, (bat file or bash script), and
in that case default to the current behaviour but print a clear warning
if it is moving bookmarks.
Would it be possible in every bookmark move to automatically place a,
possibly temporary, bookmark at the pre-move position and mention its
existence in the output message? This would allow any inadvertent or
erroneous bookmark moves to be undone.
--
Steve (Gadget) Barnes
Any opinions in this message are my personal opinions and do not reflect
those of my employer.
More information about the Mercurial
mailing list