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 13ea5e437ff8 in removing the dichotomy (at least
in the UI) between "current" and "active" bookmarks.
This commit is contained in:
Kevin Bullock 2013-01-27 11:29:14 -06:00
parent dd5421b6fc
commit 95941cafe7
2 changed files with 3 additions and 3 deletions

View File

@ -873,7 +873,7 @@ def bookmark(ui, repo, mark=None, rev=None, force=False, delete=False,
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 = ' ', ''

View File

@ -47,7 +47,7 @@ import bookmark by name
(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 @@ import bookmark by name
importing bookmark X
$ hg bookmark
X 0:4e3505fd9583
Y 0:4e3505fd9583
* Y 0:4e3505fd9583
Z 0:4e3505fd9583
export bookmark by name