D2753: graft: check for missing revision first before scanning working copy

joerg.sonnenberger (Joerg Sonnenberger) phabricator at mercurial-scm.org
Sun Mar 11 05:58:57 EDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rHGff541b8cdee0: graft: check for missing revision first before scanning working copy (authored by joerg.sonnenberger, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D2753?vs=6763&id=6869

REVISION DETAIL
  https://phab.mercurial-scm.org/D2753

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
@@ -2181,10 +2181,10 @@
                 raise
             cmdutil.wrongtooltocontinue(repo, _('graft'))
     else:
+        if not revs:
+            raise error.Abort(_('no revisions specified'))
         cmdutil.checkunfinished(repo)
         cmdutil.bailifchanged(repo)
-        if not revs:
-            raise error.Abort(_('no revisions specified'))
         revs = scmutil.revrange(repo, revs)
 
     skipped = set()



To: joerg.sonnenberger, #hg-reviewers
Cc: mercurial-devel


More information about the Mercurial-devel mailing list