changeset 43895:287556e71f85

export: use cmdutil.check_at_most_one_arg() Differential Revision: https://phab.mercurial-scm.org/D7636
author Martin von Zweigbergk <martinvonz@google.com>
date Thu, 12 Dec 2019 15:48:48 -0800
parents 774cee0e95c6
children 3781da40eaa6
files mercurial/commands.py
diffstat 1 files changed, 1 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/commands.py	Thu Dec 12 15:10:44 2019 -0800
+++ b/mercurial/commands.py	Thu Dec 12 15:48:48 2019 -0800
@@ -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: