changeset 21415:0b5d6c062774

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".
author FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
date Sun, 11 May 2014 00:49:36 +0900
parents 37a302f0e297
children 3e717c9376fc
files mercurial/cmdutil.py
diffstat 1 files changed, 2 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/cmdutil.py	Sun May 11 00:49:36 2014 +0900
+++ b/mercurial/cmdutil.py	Sun May 11 00:49:36 2014 +0900
@@ -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()