# HG changeset patch # User Martin von Zweigbergk # Date 2019-12-12 23:48:48 # Node ID 287556e71f8530e2081784ca37e1cfd47f318113 # Parent 774cee0e95c6c738897e6ed1603b9062beb92840 export: use cmdutil.check_at_most_one_arg() Differential Revision: https://phab.mercurial-scm.org/D7636 diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -2610,8 +2610,7 @@ def export(ui, repo, *changesets, **opts 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: