comparison mercurial/commands.py @ 45743:3b23cec4953f

revert: leverage cmdutil.check_incompatible_arguments() Differential Revision: https://phab.mercurial-scm.org/D9221
author Martin von Zweigbergk <martinvonz@google.com>
date Thu, 15 Oct 2020 22:36:08 -0700
parents b5e0746e272b
children 4df5d3965a3e
comparison
equal deleted inserted replaced
45742:b5e0746e272b 45743:3b23cec4953f
6055 Returns 0 on success. 6055 Returns 0 on success.
6056 """ 6056 """
6057 6057
6058 opts = pycompat.byteskwargs(opts) 6058 opts = pycompat.byteskwargs(opts)
6059 if opts.get(b"date"): 6059 if opts.get(b"date"):
6060 if opts.get(b"rev"): 6060 cmdutil.check_incompatible_arguments(opts, b'date', [b'rev'])
6061 raise error.Abort(_(b"you can't specify a revision and a date"))
6062 opts[b"rev"] = cmdutil.finddate(ui, repo, opts[b"date"]) 6061 opts[b"rev"] = cmdutil.finddate(ui, repo, opts[b"date"])
6063 6062
6064 parent, p2 = repo.dirstate.parents() 6063 parent, p2 = repo.dirstate.parents()
6065 if not opts.get(b'rev') and p2 != nullid: 6064 if not opts.get(b'rev') and p2 != nullid:
6066 # revert after merge is a trap for new users (issue2915) 6065 # revert after merge is a trap for new users (issue2915)