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

login
register
mail settings
Submitter phabricator
Date March 11, 2018, 9:58 a.m.
Message ID <2a627abc1e1a7e4ce58ea9c1d96d413a@localhost.localdomain>
Download mbox | patch
Permalink /patch/29303/
State Not Applicable
Headers show

Comments

phabricator - March 11, 2018, 9:58 a.m.
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




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

Patch

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