comparison mercurial/commands.py @ 22248:75618a223e18

commit: change "editform" to distinguish merge commits from others "editform" argument for "getcommiteditor" is decided according to the format below: COMMAND[.ROUTE] - COMMAND: name of command - ROUTE: name of route, if there are two or more routes in COMMAND This patch uses "normal.normal" and "normal.merge" as ROUTE of "editform" instead of "normal", to distinguish merge commits from others in "hg commit" without "--amend" case. This patch assumes "editform" variations for "hg commit" below: commit.normal.normal commit.normal.merge commit.amend.normal commit.amend.merge "mergeeditform" is factored out for subsequent patches. It takes "ctxorbool" argument, because context object can't be passed in some cases.
author FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
date Sat, 16 Aug 2014 10:43:59 +0900
parents b629397ca15f
children 711de9dcb1d3
comparison
equal deleted inserted replaced
22247:8341c677c204 22248:75618a223e18
1446 if opts.get('secret'): 1446 if opts.get('secret'):
1447 ui.setconfig('phases', 'new-commit', 'secret', 'commit') 1447 ui.setconfig('phases', 'new-commit', 'secret', 'commit')
1448 # Propagate to subrepos 1448 # Propagate to subrepos
1449 baseui.setconfig('phases', 'new-commit', 'secret', 'commit') 1449 baseui.setconfig('phases', 'new-commit', 'secret', 'commit')
1450 1450
1451 editform = 'commit.normal' 1451 editform = cmdutil.mergeeditform(repo[None], 'commit.normal')
1452 editor = cmdutil.getcommiteditor(editform=editform, **opts) 1452 editor = cmdutil.getcommiteditor(editform=editform, **opts)
1453 return repo.commit(message, opts.get('user'), opts.get('date'), 1453 return repo.commit(message, opts.get('user'), opts.get('date'),
1454 match, 1454 match,
1455 editor=editor, 1455 editor=editor,
1456 extra=extra) 1456 extra=extra)