[Updated] D8511: status: use cmdutil.check_at_most_one_arg() for checking --rev/--change

martinvonz (Martin von Zweigbergk) phabricator at mercurial-scm.org
Mon May 11 21:19:59 UTC 2020


Closed by commit rHG07a6a29d25ea: status: use cmdutil.check_at_most_one_arg() for checking --rev/--change (authored by martinvonz).
This revision was automatically updated to reflect the committed changes.
This revision was not accepted when it landed; it landed in state "Needs Review".

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D8511?vs=21328&id=21338

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D8511/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D8511

AFFECTED FILES
  mercurial/commands.py

CHANGE DETAILS

diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -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:



To: martinvonz, #hg-reviewers
Cc: mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20200511/6121817f/attachment-0002.html>


More information about the Mercurial-patches mailing list