From patchwork Tue Sep 17 20:18:17 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [STABLE] strip: set current bookmark to None if stripped From: Sean Farley X-Patchwork-Id: 2512 Message-Id: To: mercurial-devel@selenic.com Date: Tue, 17 Sep 2013 15:18:17 -0500 # HG changeset patch # User Sean Farley # 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,