[PATCH 0 of 2 RFC] forward current bookmark on hg update

Idan K idankk86 at gmail.com
Wed Apr 20 11:29:29 CDT 2011


On Wed, Apr 20, 2011 at 6:11 PM, Benoit Boissinot <bboissin at gmail.com>wrote:

> On Wed, Apr 20, 2011 at 5:04 PM, Matt Mackall <mpm at selenic.com> wrote:
> > On Tue, 2011-04-19 at 15:34 +0300, Idan Kamara wrote:
> >> 1. if you're currently updated to a bookmark and you try to 'hg update'
> >> (e.g. after a pull), the bookmark won't move:
> >>
> >>   $ hg glog
> >>   o  changeset:   1:e6a79fe2dd00
> >>   |
> >>   @  changeset:   0:bb12bb026c04
> >>      bookmark:    foo
> >>
> >>   $ hg upd
> >>   $ hg glog
> >>   @  changeset:   1:e6a79fe2dd00
> >>   |
> >>   o  changeset:   0:bb12bb026c04
> >>      bookmark:    foo
> >>
> >> this changes the behaviour to:
> >>
> >>   $ hg upd
> >>   $ hg glog
> >>   @  changeset:   1:e6a79fe2dd00
> >>   |  bookmark:    foo
> >>   |
> >>   o  changeset:   0:bb12bb026c04
> >>
> >> 2. unbundle currently does this behind your back, I'm not sure why this
> was
> >> decided but it felt unintuitive to me so I changed that too. instead you
> should
> >> 'hg upd' after unbundling (as suggested by the output) to move the
> bookmark.
> >
> > David, could you look at these?
>
> FYI, personally I prefer having bookmarks move on
> pull/unbundle/commit. Idan why do you find it unintuitive?


I actually didn't know pull will move the current bookmark, just noticed
that
after you mentioned it. FWIW I'm not entirely sure I would expect it to.

If I'm working on something using a bookmark and I incidentally decide to
pull,
that doesn't mean my next step would be a 'hg update' (or merge for that
matter).
So if I continue working without a hg update, I basically need to 'hg
bookmark -f...' to
get it back.
I would expect it to move when (if) I actually decide to update my working
copy to what I just pulled.

Also, I may be thinking ahead here but if we ever introduce bookmark
namespaces
(per entry in paths for example), the way I see things the consequence of a
pull would be to move
the remote bookmark rather than the local one (much like git does for that
matter).
Only if I follow up with a 'hg upd/merge remote/bookmark-name', the local
bookmark should be moved.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20110420/081c0a62/attachment.htm>


More information about the Mercurial-devel mailing list