changeset 38457:afb7e15392b9

graft: move `if continue` to elif and add new line 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. Differential Revision: https://phab.mercurial-scm.org/D3752
author Pulkit Goyal <7895pulkit@gmail.com>
date Fri, 15 Jun 2018 02:46:34 +0530
parents 3c07e0b1f6c6
children 5cdfc20bfd5f
files mercurial/commands.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/commands.py	Fri Jun 15 02:34:27 2018 +0530
+++ b/mercurial/commands.py	Fri Jun 15 02:46:34 2018 +0530
@@ -2199,6 +2199,7 @@
 
     cont = False
     graftstate = statemod.cmdstate(repo, 'graftstate')
+
     if opts.get('stop'):
         if opts.get('continue'):
             raise error.Abort(_("cannot use '--continue' and "
@@ -2208,7 +2209,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"))