From patchwork Mon Dec 16 06:31:48 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: D7632: graft: reuse cmdutl.resolvecommitoptions() From: phabricator X-Patchwork-Id: 43856 Message-Id: To: Phabricator Cc: mercurial-devel@mercurial-scm.org Date: Mon, 16 Dec 2019 06:31:48 +0000 Closed by commit rHG8376d5d62d36: graft: reuse cmdutl.resolvecommitoptions() (authored by martinvonz). This revision was automatically updated to reflect the committed changes. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7632?vs=18667&id=18744 CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7632/new/ REVISION DETAIL https://phab.mercurial-scm.org/D7632 AFFECTED FILES mercurial/commands.py CHANGE DETAILS To: martinvonz, #hg-reviewers, pulkit Cc: pulkit, mercurial-devel diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -2971,14 +2971,7 @@ # list of new nodes created by ongoing graft statedata[b'newnodes'] = [] - if opts.get(b'user') and opts.get(b'currentuser'): - raise error.Abort(_(b'--user and --currentuser are mutually exclusive')) - if opts.get(b'date') and opts.get(b'currentdate'): - raise error.Abort(_(b'--date and --currentdate are mutually exclusive')) - if not opts.get(b'user') and opts.get(b'currentuser'): - opts[b'user'] = ui.username() - if not opts.get(b'date') and opts.get(b'currentdate'): - opts[b'date'] = b"%d %d" % dateutil.makedate() + cmdutil.resolvecommitoptions(ui, opts) editor = cmdutil.getcommiteditor( editform=b'graft', **pycompat.strkwargs(opts)