From patchwork Sun Jan 27 18:09:55 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [2,of,2] summary: show when active bookmark moved From: Kevin Bullock X-Patchwork-Id: 746 Message-Id: To: mercurial-devel@selenic.com Date: Sun, 27 Jan 2013 12:09:55 -0600 # HG changeset patch # User Kevin Bullock # 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