strip: set current bookmark to None if stripped stable
authorSean Farley <sean.michael.farley@gmail.com>
Sat, 07 Sep 2013 15:07:10 -0500
branchstable
changeset 19751 478f3379768a
parent 19749 f2871c30e6a7
child 19763 ea35caf324bb
child 19764 e92650e39f1c
strip: set current bookmark to None if stripped
hgext/mq.py
--- a/hgext/mq.py	Wed Sep 18 14:40:17 2013 -0400
+++ b/hgext/mq.py	Sat Sep 07 15:07:10 2013 -0500
@@ -63,7 +63,7 @@
 from mercurial.node import bin, hex, short, nullid, nullrev
 from mercurial.lock import release
 from mercurial import commands, cmdutil, hg, scmutil, util, revset
-from mercurial import repair, extensions, error, phases
+from mercurial import repair, extensions, error, phases, bookmarks
 from mercurial import patch as patchmod
 from mercurial import localrepo
 import os, re, errno, shutil
@@ -3061,6 +3061,8 @@
             wlock.release()
 
     if opts.get('bookmark'):
+        if mark == repo._bookmarkcurrent:
+            bookmarks.setcurrent(repo, None)
         del marks[mark]
         marks.write()
         ui.write(_("bookmark '%s' deleted\n") % mark)