[PATCH 3 of 8 shelve-ext] shelve: move argument processing out of the locked code
Kostia Balytskyi
ikostia at fb.com
Tue Nov 8 08:51:39 EST 2016
# HG changeset patch
# User Kostia Balytskyi <ikostia at fb.com>
# Date 1478527237 28800
# Mon Nov 07 06:00:37 2016 -0800
# Node ID b75505c45921802d9480f1629fca4fdd7f9394d3
# Parent 334f462a1c345e5fa453ea641281ef9713789718
shelve: move argument processing out of the locked code
diff --git a/hgext/shelve.py b/hgext/shelve.py
--- a/hgext/shelve.py
+++ b/hgext/shelve.py
@@ -298,7 +298,8 @@ def _docreatecmd(ui, repo, pats, opts):
parent = parents[0]
origbranch = wctx.branch()
- # we never need the user, so we use a generic user for all shelve operations
+ # we never need the user, so we use a
+ # generic user for all shelve operations
user = 'shelve at localhost'
if parent.node() != nodemod.nullid:
@@ -309,6 +310,9 @@ def _docreatecmd(ui, repo, pats, opts):
if not opts.get('message'):
opts['message'] = desc
name = getshelvename(repo, parent, opts)
+ interactive = opts.get('interactive', False)
+ includeunknown = (opts.get('unknown', False) and
+ not opts.get('addremove', False))
lock = tr = None
try:
@@ -318,10 +322,6 @@ def _docreatecmd(ui, repo, pats, opts):
# pull races. ensure we don't print the abort message to stderr.
tr = repo.transaction('commit', report=lambda x: None)
- interactive = opts.get('interactive', False)
- includeunknown = (opts.get('unknown', False) and
- not opts.get('addremove', False))
-
extra={}
if includeunknown:
s = repo.status(match=scmutil.match(repo[None], pats, opts),
More information about the Mercurial-devel
mailing list