Patchwork D7636: export: use cmdutil.check_unique_argument()

login
register
mail settings
Submitter phabricator
Date Dec. 13, 2019, 7:56 a.m.
Message ID <differential-rev-PHID-DREV-tpcznqadb5fzwqrji5fc-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/43784/
State Superseded
Headers show

Comments

phabricator - Dec. 13, 2019, 7:56 a.m.
martinvonz created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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_unique_argument(opts, b'rev', b'bookmark')
 
     if bookmark:
         if bookmark not in repo._bookmarks: