Comments
Patch
@@ -246,6 +246,7 @@ def createcmd(ui, repo, pats, opts):
try:
wlock = repo.wlock()
lock = repo.lock()
+ dsguard = cmdutil.dirstateguard(repo, 'shelve')
bms = repo._bookmarks.copy()
# use an uncommitted transaction to generate the bundle to avoid
@@ -302,6 +303,7 @@ def createcmd(ui, repo, pats, opts):
desc = util.ellipsis(desc, ui.termwidth())
ui.status(_('shelved as %s\n') % name)
hg.update(repo, parent.node())
+ dsguard.close()
finally:
if bms:
# restore old bookmarks
@@ -309,6 +311,8 @@ def createcmd(ui, repo, pats, opts):
repo._bookmarks.write()
if tr:
tr.abort()
+ if dsguard:
+ dsguard.release()
lockmod.release(lock, wlock)
def cleanupcmd(ui, repo):