[PATCH 2 of 2 V2] update: update to current bookmark if it moved out from under us (issue3682)

Matt Mackall mpm at selenic.com
Tue Jan 22 18:46:49 CST 2013


On Tue, 2013-01-22 at 10:32 -0600, Kevin Bullock wrote:
> On Jan 22, 2013, at 9:25 AM, Kevin Bullock wrote:
> 
> > On 21 Jan 2013, at 5:29 PM, Matt Mackall wrote:
> > 
> >> On Mon, 2013-01-21 at 14:15 -0600, Kevin Bullock wrote:
> >>> # HG changeset patch
> >>> # User Kevin Bullock <kbullock at ringworld.org>
> >>> # Date 1358797630 21600
> >>> # Branch stable
> >>> # Node ID 669c7ba6f12dde14cfededf3f2c9a2fa9be8690f
> >>> # Parent  911229b0565cb0c031baaae36f21a5829f78e3b1
> >>> update: update to current bookmark if it moved out from under us (issue3682)
> >>> 
> >>> If the current bookmark (the one listed in .hg/bookmarks.current)
> >>> doesn't point to a parent of the working directory, e.g. if it was moved
> >>> by a pull, use that as the update target instead of the tipmost
> >>> descendent.
> >>> 
> >>> A small predicate is (finally) added to the bookmarks module to check
> >>> whether the current bookmark is also active.
> >> 
> >> Confused. I thought we were going to erase the distinction between
> >> current and active.
> > 
> > Yes, that's the idea of this patch, although it's phrased differently. I thought this was the behavior you were suggesting?
> > 
> > Going thru the code to unify the usage of "current" and "active" terms feels like too much churn for stable.
> 
> To elaborate on this, if we erase the distinction between current and
> active, we introduce a new distinction: between active and
> active-but-not-at-the-working-dir. The new predicate distinguishes
> between these two states.

Alright. We'll have to discuss later how to bring some API and possibly
UI clarity to that distinction. I've queued both patches for stable,
thanks.

> I have another patch pending that changes `hg bookmarks` to show the latter state.

By that, I assume you mean "put a * next to the active bookmark even if
it's not .".

-- 
Mathematics is the supreme nostalgia of our time.




More information about the Mercurial-devel mailing list