revert: leverage cmdutil.check_incompatible_arguments()
authorMartin von Zweigbergk <martinvonz@google.com>
Thu, 15 Oct 2020 22:36:08 -0700
changeset 45743 3b23cec4953f
parent 45742 b5e0746e272b
child 45744 4df5d3965a3e
revert: leverage cmdutil.check_incompatible_arguments() Differential Revision: https://phab.mercurial-scm.org/D9221
mercurial/commands.py
--- a/mercurial/commands.py	Thu Oct 15 22:23:45 2020 -0700
+++ b/mercurial/commands.py	Thu Oct 15 22:36:08 2020 -0700
@@ -6057,8 +6057,7 @@
 
     opts = pycompat.byteskwargs(opts)
     if opts.get(b"date"):
-        if opts.get(b"rev"):
-            raise error.Abort(_(b"you can't specify a revision and a date"))
+        cmdutil.check_incompatible_arguments(opts, b'date', [b'rev'])
         opts[b"rev"] = cmdutil.finddate(ui, repo, opts[b"date"])
 
     parent, p2 = repo.dirstate.parents()