atom feed10 messages in com.selenic.mercurial-develRe: [PATCH 2 of 2] summary: show when...
FromSent OnAttachments
Kevin BullockJan 27, 2013 10:09 am 
Kevin BullockJan 27, 2013 10:09 am 
Kevin BullockJan 28, 2013 7:18 pm 
Bryan O'SullivanJan 30, 2013 9:47 am 
Kevin BullockJan 30, 2013 10:22 am 
Matt MackallJan 30, 2013 4:22 pm 
Kevin BullockJan 30, 2013 5:29 pm 
Augie FacklerJan 31, 2013 6:07 am 
Kevin BullockJan 31, 2013 8:11 am 
Matt MackallJan 31, 2013 12:21 pm 
Subject:Re: [PATCH 2 of 2] summary: show when active bookmark moved
From:Matt Mackall (
Date:Jan 30, 2013 4:22:56 pm

On Wed, 2013-01-30 at 12:22 -0600, Kevin Bullock wrote:

Thus we now have the situation that 'hg bookmarks' shows the current-but-not-active bookmark, but 'hg summary' gives no indication that an update will go to said bookmark. I'd like to fix this, but my patch isn't the right way to do it (as I mentioned before).

It probably ought to look like this:

$ hg sum parent: 18473:692cbda1eb50 tip revset: evaluate sub expressions correctly (issue3775) branch: stable bookmarks: *@ commit: 15 unknown (clean) update: (current)

$ hg pull <some pull that moves @ out from under us>

$ hg sum parent: 18472:37100f30590f test-rebase: add another test for rebase with multiple roots branch: stable bookmarks: (@) commit: 15 unknown (clean) update: 1 new changesets (update)

Note the last line in particular: summary's calculation of the default update target probably needs attention. We possibly even want something like an update() revset predicate that tells us where we're going.

Also, something I encountered while constructing the last example: when we update to an ancestor of the active bookmark, we might want the bookmark to remain active, but not move:

$ hg up @ <- we're on @ $ hg up <- we go to @ if @ moved $ hg up @^ <- we hop off @, oops $ hg up <- we go to the branch tip, @ stops getting updated

Or, more expansively, we might want to only drop the active bookmark if we move to a commit outside of (::x or x::). So, for instance:

o-a-o-o-@-o-o-x (. = @) \ \ u o-o-y

hg up -> no-op, we're at @ hg up a -> we leave @ active, but go backwards hg up x -> we advance @ to x hg up y -> we advance @ to y hg up u -> @ is deactivated

But we probably don't want to do this in the case of updating to symbolic markers like tags, branches, other bookmarks, so this might be too complex.