##// END OF EJS Templates
commit: change "editform" to distinguish merge commits from other (--amend)...
FUJIWARA Katsunori -
r22249:f5ff18f6 default
parent child Browse files
Show More
@@ -2133,7 +2133,7 b' def amend(ui, repo, commitfunc, old, ext'
2133 2133
2134 2134 user = opts.get('user') or old.user()
2135 2135 date = opts.get('date') or old.date()
2136 editform = 'commit.amend'
2136 editform = mergeeditform(old, 'commit.amend')
2137 2137 editor = getcommiteditor(editform=editform, **opts)
2138 2138 if not message:
2139 2139 editor = getcommiteditor(edit=True, editform=editform)
@@ -394,7 +394,8 b' customized message only for specific act'
394 394 messages for each actions.
395 395
396 396 - ``changeset.backout`` for :hg:`backout`
397 - ``changeset.commit.amend`` for :hg:`commit --amend`
397 - ``changeset.commit.amend.merge`` for :hg:`commit --amend` on merges
398 - ``changeset.commit.amend.normal`` for :hg:`commit --amend` on other
398 399 - ``changeset.commit.normal.merge`` for :hg:`commit` on merges
399 400 - ``changeset.commit.normal.normal`` for :hg:`commit` on other
400 401 - ``changeset.fetch`` for :hg:`fetch` (impling merge commit)
@@ -145,7 +145,12 b' Disable default date on commit so when -'
145 145
146 146 Test -u/-d:
147 147
148 $ hg ci --amend -u foo -d '1 0'
148 $ cat > .hg/checkeditform.sh <<EOF
149 > env | grep HGEDITFORM
150 > true
151 > EOF
152 $ HGEDITOR="sh .hg/checkeditform.sh" hg ci --amend -u foo -d '1 0'
153 HGEDITFORM=commit.amend.normal
149 154 saved backup bundle to $TESTTMP/.hg/strip-backup/1cd866679df8-amend-backup.hg (glob)
150 155 $ echo a >> a
151 156 $ hg ci --amend -u foo -d '1 0'
@@ -619,7 +624,8 b' Amend a merge changeset (with renames an'
619 624 zz renamed from z:69a1b67522704ec122181c0890bd16e9d3e7516a
620 625 $ hg debugrename cc
621 626 cc not renamed
622 $ hg ci --amend -m 'merge bar (amend message)'
627 $ HGEDITOR="sh .hg/checkeditform.sh" hg ci --amend -m 'merge bar (amend message)' --edit
628 HGEDITFORM=commit.amend.merge
623 629 $ hg log --config diff.git=1 -pr .
624 630 changeset: 24:832b50f2c271
625 631 tag: tip
General Comments 0
You need to be logged in to leave comments. Login now