Comments
Patch
@@ -1448,7 +1448,10 @@
# Propagate to subrepos
baseui.setconfig('phases', 'new-commit', 'secret', 'commit')
- editform = 'commit.normal'
+ if 1 < len(repo[None].parents()):
+ editform = 'commit.normal.merge'
+ else:
+ editform = 'commit.normal.normal'
editor = cmdutil.getcommiteditor(editform=editform, **opts)
return repo.commit(message, opts.get('user'), opts.get('date'),
match,
@@ -395,7 +395,8 @@
- ``changeset.backout`` for :hg:`backout`
- ``changeset.commit.amend`` for :hg:`commit --amend`
-- ``changeset.commit.normal`` for :hg:`commit` without ``--amend``
+- ``changeset.commit.normal.merge`` for :hg:`commit` on merges
+- ``changeset.commit.normal.normal`` for :hg:`commit` on other
- ``changeset.fetch`` for :hg:`fetch` (impling merge commit)
- ``changeset.gpg.sign`` for :hg:`sign`
- ``changeset.graft`` for :hg:`graft`
@@ -422,7 +423,7 @@
At the external editor invocation for committing, corresponding
dot-separated list of names without ``changeset.`` prefix
-(e.g. ``commit.normal``) is in ``HGEDITFORM`` environment variable.
+(e.g. ``commit.normal.normal``) is in ``HGEDITFORM`` environment variable.
In this section, items other than ``changeset`` can be referred from
others. For example, the configuration to list committed files up
@@ -9,7 +9,7 @@
> true
> EOF
$ HGEDITOR="sh $TESTTMP/checkeditform.sh" hg commit -m ""
- HGEDITFORM=commit.normal
+ HGEDITFORM=commit.normal.normal
abort: empty commit message
[255]
$ hg commit -d '0 0' -m commit-1
@@ -282,7 +282,8 @@
should succeed
- $ hg ci -mmerge
+ $ HGEDITOR="sh $TESTTMP/checkeditform.sh" hg ci -mmerge --edit
+ HGEDITFORM=commit.normal.merge
$ cd ..