diff mercurial/commands.py @ 14189:328422b0380d

bookmarks: allow deactivating current bookmark with -i
author Kevin Bullock <kbullock@ringworld.org>
date Wed, 04 May 2011 10:43:47 -0500
parents 9029b1a38c30
children c124341c4cea
line wrap: on
line diff
--- a/mercurial/commands.py	Sat Dec 11 18:08:55 2010 +0100
+++ b/mercurial/commands.py	Wed May 04 10:43:47 2011 -0500
@@ -539,6 +539,9 @@
         if not mark:
             raise util.Abort(_("bookmark names cannot consist entirely of "
                                "whitespace"))
+        if inactive and mark == repo._bookmarkcurrent:
+            bookmarks.setcurrent(repo, None)
+            return
         if mark in marks and not force:
             raise util.Abort(_("bookmark '%s' already exists "
                                "(use -f to force)") % mark)