changeset 17736:1c523c4008f7

merge with crew-stable
author Thomas Arendsen Hein <thomas@intevation.de>
date Tue, 09 Oct 2012 09:45:44 +0200
parents 619068c280fd (current diff) 605fe310691f (diff)
children 4720d2c903a2
files mercurial/commands.py
diffstat 2 files changed, 13 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/commands.py	Mon Oct 08 15:57:21 2012 -0700
+++ b/mercurial/commands.py	Tue Oct 09 09:45:44 2012 +0200
@@ -846,6 +846,12 @@
             raise util.Abort(_("bookmark name required"))
         if len(marks) == 0:
             ui.status(_("no bookmarks set\n"))
+        if inactive:
+            if not repo._bookmarkcurrent:
+                ui.status(_("no active bookmark\n"))
+            else:
+                bookmarks.setcurrent(repo, None)
+            return
         else:
             for bmark, n in sorted(marks.iteritems()):
                 current = repo._bookmarkcurrent
--- a/tests/test-bookmarks-current.t	Mon Oct 08 15:57:21 2012 -0700
+++ b/tests/test-bookmarks-current.t	Tue Oct 09 09:45:44 2012 +0200
@@ -115,6 +115,13 @@
      Z                         0:719295282060
 
   $ hg up -q Y
+  $ hg bookmark -i
+  $ hg bookmarks
+     Y                         0:719295282060
+     Z                         0:719295282060
+  $ hg bookmark -i
+  no active bookmark
+  $ hg up -q Y
   $ hg bookmarks
    * Y                         0:719295282060
      Z                         0:719295282060