changeset 36842:ff541b8cdee0

graft: check for missing revision first before scanning working copy Differential Revision: https://phab.mercurial-scm.org/D2753
author Joerg Sonnenberger <joerg@bec.de>
date Fri, 09 Mar 2018 15:57:16 +0100
parents 9c636ec1ef37
children 31581528f242
files mercurial/commands.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/commands.py	Sat Mar 10 22:02:58 2018 -0500
+++ b/mercurial/commands.py	Fri Mar 09 15:57:16 2018 +0100
@@ -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()