[PATCH 2 of 2] summary: show when active bookmark moved

Kevin Bullock kbullock+mercurial at ringworld.org
Thu Jan 31 10:11:02 CST 2013


On Jan 31, 2013, at 8:07 AM, Augie Fackler wrote:

> On Wed, Jan 30, 2013 at 07:29:33PM -0600, Kevin Bullock wrote:
>> On 30 Jan 2013, at 6:23 PM, Matt Mackall wrote:
>>> $ 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- at -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.
>> 
> 
> I think this would break my current workflow, where I have a bookmark
> for every local topic I'm working on, and then update to "mpm/stable"
> to start a new one. IOW:
> 
>  $ hg sum
>  ...
>  bookmarks: *disallow-three-arg-raise
>  ...
>  $ hg up mpm/stable
>  $ hg book fix-a-horrible-bug
>  [ hack hack ]
>  $ hg commit
> 
> Is how I generally work at present, and moving
> disallow-three-arg-raise backwards when I did the update back to your
> tip would not be helpful.

It wouldn't move backwards, for two reasons:

1. In the new world order, "keep the active bookmark" does not imply *moving* that bookmark. It just means retaining .hg/bookmarks.current, so that we can detect later that we should move back to it on a *bare* 'hg update' (no explicit rev).

2. When you update to an explicit rev, the active bookmark gets deactivated (and in your case, mpm/stable gets made active, and then fix-a-horrible-bug does).

pacem in terris / мир / शान्ति / ‎‫سَلاَم‬ / 平和
Kevin R. Bullock



More information about the Mercurial-devel mailing list