D3752: graft: move `if continue` to elif and add new line
pulkit (Pulkit Goyal)
phabricator at mercurial-scm.org
Fri Jun 15 20:09:42 UTC 2018
pulkit created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.
REVISION SUMMARY
This will make upcoming patch where we introduce a new elif for the abort case
more readable. Also added a new line before the if-else starts.
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D3752
AFFECTED FILES
mercurial/commands.py
CHANGE DETAILS
diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -2201,6 +2201,7 @@
cont = False
graftstate = statemod.cmdstate(repo, 'graftstate')
+
if opts.get('stop'):
if opts.get('continue'):
raise error.Abort(_("cannot use '--continue' and "
@@ -2210,7 +2211,7 @@
opts.get('currentuser'), opts.get('rev'))):
raise error.Abort(_("cannot specify any other flag with '--stop'"))
return _stopgraft(ui, repo, graftstate)
- if opts.get('continue'):
+ elif opts.get('continue'):
cont = True
if revs:
raise error.Abort(_("can't specify --continue and revisions"))
To: pulkit, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list