[PATCH STABLE] strip: set current bookmark to None if stripped
Sean Farley
sean.michael.farley at gmail.com
Tue Sep 17 20:18:17 UTC 2013
# HG changeset patch
# User Sean Farley <sean.michael.farley at gmail.com>
# Date 1378584430 18000
# Sat Sep 07 15:07:10 2013 -0500
# Branch stable
# Node ID f33dec43e9afbdf966abbb1a290fdc38efb09d59
# Parent fd4f612f7cb6413940d4cf2052334cd23f60e042
strip: set current bookmark to None if stripped
diff --git a/hgext/mq.py b/hgext/mq.py
--- a/hgext/mq.py
+++ b/hgext/mq.py
@@ -61,11 +61,11 @@
from mercurial.i18n import _
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
commands.norepo += " qclone"
@@ -3059,10 +3059,12 @@
update = False
finally:
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)
repo.mq.strip(repo, revs, backup=backup, update=update,
More information about the Mercurial-devel
mailing list