Proposal: make hg up update to @ if was absent

Matt Mackall mpm at selenic.com
Mon Apr 28 21:24:16 UTC 2014


On Mon, 2014-04-28 at 13:57 +0200, David Demelier wrote:
> Hello,
> 
> I like to use bookmarks for short-lived developments. I usually set 
> bookmarks on code which may break existing features or similar. But I 
> also want that a default bookmark exists so that "normal" users are not 
> taking this bookmark by default.
> 
> It is said in the documentation that a bookmark named @ will be the 
> default once cloned. But it is not when you update on an existing 
> repository which have not this bookmark.
> 
> I think it would be nice if an existing repository (without any 
> bookmark) call hg pull ; hg up automatically switch to @ if one ore more 
> bookmarks are incoming.

Sorry, no, this won't work.

First off, bookmarks are not intended to replace or supersede named
branches. It's perfectly reasonable today to have some branches with
bookmarks and some branches without. Suddenly jumping away from
someone's (anonymous?) development branch to a bookmark is not an
acceptable behavior.

Secondly, we'd have to store additional single-use state between pull
and update to even make this idea work, and it's unclear what the
behavior should be if things happen between the two.

-- 
Mathematics is the supreme nostalgia of our time.





More information about the Mercurial mailing list