[PATCH RFC] update: skip bookmarked heads when running a bare "hg update"

Matt Mackall mpm at selenic.com
Wed Jun 13 14:53:15 CDT 2012


On Fri, 2012-06-08 at 11:40 +0200, Angel Ezquerra wrote:
> On Thu, Jun 7, 2012 at 4:37 AM, Matt Mackall <mpm at selenic.com> wrote:
> > On Fri, 2012-05-25 at 16:25 +0200, Angel Ezquerra wrote:
> >> # HG changeset patch
> >> # User Angel Ezquerra <angel.ezquerra at gmail.com>
> >> # Date 1337955724 -7200
> >> # Node ID cb06046e10797e569bed05850318068f4a5d535c
> >> # Parent  2ac08d8b21aa7b6e0a062afed5a3f357ccef67f9
> >> update: skip bookmarked heads when running a bare "hg update"
> >>
> >> When running a bare "hg update" without specifying a revision, we used to
> >> update to the tip of the current branch, even if it were bookmarked. This is
> >> inconvenient when using bookmarks for feature branches, since pulling new
> >> bookmarks will make "hg update" update to those bookmarked "feature branches".
> >
> > Interesting. This seems in line with what I've proposed here:
> >
> > http://markmail.org/message/qugvrgamwudgsdbq
> >
> > and our recent change to the behavior of merge with bookmarks:
> >
> > http://www.selenic.com/hg/rev/4a02cf4fbb2e
> >
> > So I'm inclined to accept it. But I think we need an informative error
> > message here rather than simply saying "up to date", something like:
> 
> When you say that mercurial says "up to date" you mean that it shows:
> 
> 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
> 
> right?
> 
> > abort: branch head is on a bookmark
> > (use 'hg update <branch>' to update anyway)
> 
> Do you mean: "(use 'hg update <bookmark>' to update anyway)"

No, because updating to a bookmark makes the bookmark active. We asked
to go to the branch head, and haven't indicated any interest in moving
to a bookmark.

> Would it make sense to show the bookmark the head is on instead? That is:
> 
> abort: branch head is on bookmark 'mybookmark'

Maybe.

-- 
Mathematics is the supreme nostalgia of our time.




More information about the Mercurial-devel mailing list