# HG changeset patch # User FUJIWARA Katsunori # Date 1406983587 -32400 # Node ID 41e969cb9468d735c9eabba53e282eb3fa44df31 # Parent 0bbe8ef901d1983254bc422fd011b8ca93fbbd78 commit: pass 'editform' argument to 'cmdutil.getcommiteditor' This patch passes 'editform' argument according to the format below: COMMAND[.ROUTE] - ROUTE: name of route, if there are two or more routes in COMMAND In this patch, 'normal' and 'amend' are used as ROUTE. diff -r 0bbe8ef901d1 -r 41e969cb9468 mercurial/cmdutil.py --- a/mercurial/cmdutil.py Sat Aug 02 21:46:27 2014 +0900 +++ b/mercurial/cmdutil.py Sat Aug 02 21:46:27 2014 +0900 @@ -2106,9 +2106,10 @@ 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 -r 0bbe8ef901d1 -r 41e969cb9468 mercurial/commands.py --- a/mercurial/commands.py Sat Aug 02 21:46:27 2014 +0900 +++ b/mercurial/commands.py Sat Aug 02 21:46:27 2014 +0900 @@ -1449,9 +1449,11 @@ 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')