graft: check for missing revision first before scanning working copy
Differential Revision: https://phab.mercurial-scm.org/D2753
--- 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()