[PATCH 2 of 2] summary: show when active bookmark moved
Kevin Bullock
kbullock+mercurial at ringworld.org
Sun Jan 27 12:09:55 CST 2013
# HG changeset patch
# User Kevin Bullock <kbullock at ringworld.org>
# Date 1359309800 21600
# Branch stable
# Node ID b404fa103253960824500066dffa2b7d6cff33ee
# Parent a367f06d8c96c2279c500a688ab4ff65ac278b16
summary: show when active bookmark moved
Further breaking down the active/current bookmark dichotomy.
diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -5574,12 +5574,16 @@ def summary(ui, repo, **opts):
current = repo._bookmarkcurrent
# i18n: column positioning for "hg summary"
ui.write(_('bookmarks:'), label='log.bookmark')
- if current is not None and current in marks:
+ bmend = '\n'
+ if current is not None:
ui.write(' *' + current, label='bookmarks.current')
- marks.remove(current)
+ if current in marks:
+ marks.remove(current)
+ else:
+ bmend = _(' (active bookmark moved)\n')
for m in marks:
ui.write(' ' + m, label='log.bookmark')
- ui.write('\n', label='log.bookmark')
+ ui.write(bmend, label='log.bookmark')
st = list(repo.status(unknown=True))[:6]
diff --git a/tests/test-bookmarks.t b/tests/test-bookmarks.t
--- a/tests/test-bookmarks.t
+++ b/tests/test-bookmarks.t
@@ -465,7 +465,7 @@ update to current bookmark if it's not t
parent: 2:db815d6d32e6
2
branch: default
- bookmarks: Y x y
+ bookmarks: *Z Y x y (active bookmark moved)
commit: 1 added, 1 unknown (new branch head)
update: 2 new changesets (update)
$ hg update
More information about the Mercurial-devel
mailing list