summary: simplify handling of active bookmark
authorKevin Bullock <kbullock@ringworld.org>
Sun, 27 Jan 2013 11:53:46 -0600
changeset 18621 b1e949f6c17d
parent 18620 7da487b0256a
child 18622 f9eebf5629fa
summary: simplify handling of active bookmark
mercurial/commands.py
--- a/mercurial/commands.py	Fri Feb 08 21:32:43 2013 +0000
+++ b/mercurial/commands.py	Sun Jan 27 11:53:46 2013 -0600
@@ -5574,13 +5574,9 @@
         current = repo._bookmarkcurrent
         # i18n: column positioning for "hg summary"
         ui.write(_('bookmarks:'), label='log.bookmark')
-        if current is not None:
-            try:
-                marks.remove(current)
-                ui.write(' *' + current, label='bookmarks.current')
-            except ValueError:
-                # current bookmark not in parent ctx marks
-                pass
+        if current is not None and current in marks:
+            ui.write(' *' + current, label='bookmarks.current')
+            marks.remove(current)
         for m in marks:
             ui.write(' ' + m, label='log.bookmark')
         ui.write('\n', label='log.bookmark')