Patchwork D7636: export: use cmdutil.check_at_most_one_arg()

login
register
mail settings
Submitter phabricator
Date Dec. 16, 2019, 11:20 p.m.
Message ID <3b54038d37afcee492c48ce3a7a11705@localhost.localdomain>
Download mbox | patch
Permalink /patch/43874/
State Not Applicable
Headers show

Comments

phabricator - Dec. 16, 2019, 11:20 p.m.
martinvonz retitled this revision from "export: use cmdutil.check_unique_argument()" to "export: use cmdutil.check_at_most_one_arg()".
martinvonz updated this revision to Diff 18762.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D7636?vs=18671&id=18762

BRANCH
  default

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

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

AFFECTED FILES
  mercurial/commands.py

CHANGE DETAILS




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

Patch

diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -2610,8 +2610,7 @@ 
     bookmark = opts.get(b'bookmark')
     changesets += tuple(opts.get(b'rev', []))
 
-    if bookmark and changesets:
-        raise error.Abort(_(b"-r and -B are mutually exclusive"))
+    cmdutil.check_at_most_one_arg(opts, b'rev', b'bookmark')
 
     if bookmark:
         if bookmark not in repo._bookmarks: