From patchwork Sat May 10 16:08:46 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [11, of, 19] amend: use "getcommiteditor()" instead of explicit editor choice From: Katsunori FUJIWARA X-Patchwork-Id: 4713 Message-Id: To: mercurial-devel@selenic.com Date: Sun, 11 May 2014 01:08:46 +0900 # HG changeset patch # User FUJIWARA Katsunori # Date 1399736976 -32400 # Sun May 11 00:49:36 2014 +0900 # Node ID c391c15248f4aa3589753d176702e6b9e1b6cd10 # Parent 04c05644ea80a8547a73523b2384f342801793a7 amend: use "getcommiteditor()" instead of explicit editor choice This patch doesn't change any tests like as preceding patches, because editor invocation is already tested in "test-commit-amend.t". diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py --- a/mercurial/cmdutil.py +++ b/mercurial/cmdutil.py @@ -2051,12 +2051,10 @@ user = opts.get('user') or old.user() date = opts.get('date') or old.date() - editor = commiteditor + editor = getcommiteditor(**opts) if not message: - editor = commitforceeditor + editor = getcommiteditor(edit=True) message = old.description() - elif opts.get('edit'): - editor = commitforceeditor pureextra = extra.copy() extra['amend_source'] = old.hex()