diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py --- a/mercurial/cmdutil.py +++ b/mercurial/cmdutil.py @@ -2106,9 +2106,10 @@ def amend(ui, repo, commitfunc, old, ext user = opts.get('user') or old.user() date = opts.get('date') or old.date() - editor = getcommiteditor(**opts) + editform = 'commit.amend' + editor = getcommiteditor(editform=editform, **opts) if not message: - editor = getcommiteditor(edit=True) + editor = getcommiteditor(edit=True, editform=editform) message = old.description() pureextra = extra.copy() diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -1449,9 +1449,11 @@ def commit(ui, repo, *pats, **opts): repo.baseui.setconfig('phases', 'new-commit', 'secret', 'commit') + editform = 'commit.normal' + editor = cmdutil.getcommiteditor(editform=editform, **opts) return repo.commit(message, opts.get('user'), opts.get('date'), match, - editor=cmdutil.getcommiteditor(**opts), + editor=editor, extra=extra) finally: ui.setconfig('phases', 'new-commit', oldcommitphase, 'commit')