export: use cmdutil.check_at_most_one_arg()
authorMartin von Zweigbergk <martinvonz@google.com>
Thu, 12 Dec 2019 15:48:48 -0800
changeset 43895 287556e71f85
parent 43894 774cee0e95c6
child 43896 3781da40eaa6
export: use cmdutil.check_at_most_one_arg() Differential Revision: https://phab.mercurial-scm.org/D7636
mercurial/commands.py
--- 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: