Patchwork D3752: graft: move `if continue` to elif and add new line

login
register
mail settings
Submitter phabricator
Date June 15, 2018, 8:09 p.m.
Message ID <differential-rev-PHID-DREV-gsav4nkb5cbl7ipvh5et-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/32183/
State Superseded
Headers show

Comments

phabricator - June 15, 2018, 8:09 p.m.
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




To: pulkit, #hg-reviewers
Cc: mercurial-devel

Patch

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"))