[Request] [+ ] D8511: status: use cmdutil.check_at_most_one_arg() for checking --rev/--change
martinvonz (Martin von Zweigbergk)
phabricator at mercurial-scm.org
Fri May 8 16:01:39 UTC 2020
martinvonz created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.
REVISION SUMMARY
There are apparently no tests for this either.
REPOSITORY
rHG Mercurial
BRANCH
default
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, mercurial-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mercurial-scm.org/pipermail/mercurial-patches/attachments/20200508/0a6d2fa8/attachment.html>
More information about the Mercurial-patches
mailing list