changeset 44809:07a6a29d25ea

status: use cmdutil.check_at_most_one_arg() for checking --rev/--change There are apparently no tests for this either. Differential Revision: https://phab.mercurial-scm.org/D8511
author Martin von Zweigbergk <martinvonz@google.com>
date Fri, 08 May 2020 08:55:35 -0700
parents aac816f584ad
children 62435a5b46fe
files mercurial/commands.py
diffstat 1 files changed, 2 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/commands.py	Fri May 08 08:50:47 2020 -0700
+++ b/mercurial/commands.py	Fri May 08 08:55:35 2020 -0700
@@ -6784,6 +6784,7 @@
 
     """
 
+    cmdutil.check_at_most_one_arg(opts, 'rev', 'change')
     opts = pycompat.byteskwargs(opts)
     revs = opts.get(b'rev')
     change = opts.get(b'change')
@@ -6794,10 +6795,7 @@
         else:
             terse = ui.config(b'commands', b'status.terse')
 
-    if revs and change:
-        msg = _(b'cannot specify --rev and --change at the same time')
-        raise error.Abort(msg)
-    elif revs and terse:
+    if revs and terse:
         msg = _(b'cannot use --terse with --rev')
         raise error.Abort(msg)
     elif change: