Mercurial > hg
changeset 18479:0efd5686f80c stable
bookmarks: show active bookmark even if not at working dir
If the active bookmark doesn't point at a parent of the working dir
(e.g. a pull moved it out from under us), we nonetheless show it as
active. This follows on 2096e025a728 in removing the dichotomy (at least
in the UI) between "current" and "active" bookmarks.
author | Kevin Bullock <kbullock@ringworld.org> |
---|---|
date | Sun, 27 Jan 2013 11:29:14 -0600 |
parents | 886936ecc21b |
children | 5ef3c7081008 |
files | mercurial/commands.py tests/test-bookmarks-pushpull.t |
diffstat | 2 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/commands.py Fri Jan 25 11:43:54 2013 -0600 +++ b/mercurial/commands.py Sun Jan 27 11:29:14 2013 -0600 @@ -873,7 +873,7 @@ else: # show bookmarks for bmark, n in sorted(marks.iteritems()): current = repo._bookmarkcurrent - if bmark == current and n == cur: + if bmark == current: prefix, label = '*', 'bookmarks.current' else: prefix, label = ' ', ''
--- a/tests/test-bookmarks-pushpull.t Fri Jan 25 11:43:54 2013 -0600 +++ b/tests/test-bookmarks-pushpull.t Sun Jan 27 11:29:14 2013 -0600 @@ -47,7 +47,7 @@ (run 'hg update' to get a working copy) $ hg bookmarks X 0:4e3505fd9583 - Y 0:4e3505fd9583 + * Y 0:4e3505fd9583 Z 0:4e3505fd9583 $ hg debugpushkey ../a namespaces bookmarks @@ -64,7 +64,7 @@ importing bookmark X $ hg bookmark X 0:4e3505fd9583 - Y 0:4e3505fd9583 + * Y 0:4e3505fd9583 Z 0:4e3505fd9583 export bookmark by name