Patchwork D7636: export: use cmdutil.check_at_most_one_arg()

login
register
mail settings
Submitter phabricator
Date Dec. 17, 2019, 7:58 a.m.
Message ID <9541123b3e334ba151402dac81a388eb@localhost.localdomain>
Download mbox | patch
Permalink /patch/43902/
State Not Applicable
Headers show

Comments

phabricator - Dec. 17, 2019, 7:58 a.m.
Closed by commit rHG287556e71f85: export: use cmdutil.check_at_most_one_arg() (authored by martinvonz).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

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

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, pulkit
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: