--- a/tests/test-mq-qrefresh-replace-log-message.t Fri Jul 18 23:15:28 2014 -0500
+++ b/tests/test-mq-qrefresh-replace-log-message.t Tue Jul 15 23:34:13 2014 +0900
@@ -26,10 +26,28 @@
First commit message
Testing changing message with -m
-(this tests also that '--edit' can be used with '--message')
+(this tests also that '--edit' can be used with '--message', and
+that '[committemplate] changeset' definition and commit log specific
+template keyword 'extramsg' work well)
+
+ $ cat >> .hg/hgrc <<EOF
+ > [committemplate]
+ > changeset = HG: this is customized commit template
+ > {desc}\n\n
+ > HG: Enter commit message. Lines beginning with 'HG:' are removed.
+ > HG: {extramsg}
+ > HG: --
+ > HG: user: {author}
+ > HG: branch '{branch}'\n{file_adds %
+ > "HG: added {file}\n" }{file_mods %
+ > "HG: changed {file}\n" }{file_dels %
+ > "HG: removed {file}\n" }{if(files, "",
+ > "HG: no files changed\n")}
+ > EOF
$ echo bbbb > file
$ HGEDITOR=cat hg qrefresh -m "Second commit message" -e
+ HG: this is customized commit template
Second commit message
@@ -40,6 +58,12 @@
HG: branch 'default'
HG: added file
+ $ cat >> .hg/hgrc <<EOF
+ > # disable customizing for subsequent tests
+ > [committemplate]
+ > changeset =
+ > EOF
+
Should display 'Second commit message'
$ hg log -l1 --template "{desc}\n"