Mercurial > hg
diff mercurial/cmdutil.py @ 43893:2e672ccc2220
commit: use cmdutil.check_at_most_one_arg()
Differential Revision: https://phab.mercurial-scm.org/D7634
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Thu, 12 Dec 2019 14:54:38 -0800 |
parents | d587937600be |
children | 774cee0e95c6 |
line wrap: on
line diff
--- a/mercurial/cmdutil.py Thu Dec 12 15:16:13 2019 -0800 +++ b/mercurial/cmdutil.py Thu Dec 12 14:54:38 2019 -0800 @@ -278,10 +278,8 @@ The return value indicates that ``rewrite.update-timestamp`` is the reason the ``date`` option is set. """ - if opts.get(b'date') and opts.get(b'currentdate'): - raise error.Abort(_(b'--date and --currentdate are mutually exclusive')) - if opts.get(b'user') and opts.get(b'currentuser'): - raise error.Abort(_(b'--user and --currentuser are mutually exclusive')) + check_at_most_one_arg(opts, b'date', b'currentdate') + check_at_most_one_arg(opts, b'user', b'currentuser') datemaydiffer = False # date-only change should be ignored?