Patchwork D7645: rebase: use cmdutil.check_unique_argument() for action+revision

login
register
mail settings
Submitter phabricator
Date Dec. 13, 2019, 11 p.m.
Message ID <cb1bb1cc0bfad2667fcec62bf5a38166@localhost.localdomain>
Download mbox | patch
Permalink /patch/43826/
State Not Applicable
Headers show

Comments

phabricator - Dec. 13, 2019, 11 p.m.
martinvonz updated this revision to Diff 18715.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D7645?vs=18680&id=18715

BRANCH
  default

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D7645/new/

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

AFFECTED FILES
  hgext/rebase.py
  tests/test-rebase-parameters.t

CHANGE DETAILS




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

Patch

diff --git a/tests/test-rebase-parameters.t b/tests/test-rebase-parameters.t
--- a/tests/test-rebase-parameters.t
+++ b/tests/test-rebase-parameters.t
@@ -69,7 +69,7 @@ 
   [255]
 
   $ hg rebase --continue --dest 4
-  abort: abort and continue do not allow specifying revisions
+  abort: cannot specify both --continue and --dest
   [255]
 
   $ hg rebase --base 5 --source 4
diff --git a/hgext/rebase.py b/hgext/rebase.py
--- a/hgext/rebase.py
+++ b/hgext/rebase.py
@@ -1024,6 +1024,9 @@ 
         cmdutil.check_incompatible_arguments(
             opts, action, b'confirm', b'dry-run'
         )
+        cmdutil.check_incompatible_arguments(
+            opts, action, b'rev', b'source', b'base', b'dest'
+        )
     cmdutil.check_unique_argument(opts, b'confirm', b'dry-run')
     cmdutil.check_unique_argument(opts, b'rev', b'source', b'base')
 
@@ -1192,10 +1195,6 @@ 
                 raise error.Abort(
                     _(b'cannot use collapse with continue or abort')
                 )
-            if srcf or basef or destf:
-                raise error.Abort(
-                    _(b'abort and continue do not allow specifying revisions')
-                )
             if action == b'abort' and opts.get(b'tool', False):
                 ui.warn(_(b'tool option will be ignored\n'))
             if action == b'continue':