diff tests/test-commit.t @ 22205:9fa429723f26

ui: invoke editor for committing with HGEDITFORM environment variable At the external editor invocation for committing, the value specified as "editform" for "cmdutil.getcommiteditor" is in "HGEDITFORM". This enables external editor to do own customization according to commit types.
author FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
date Fri, 15 Aug 2014 23:05:53 +0900
parents 9d92b9d1e282
children 75618a223e18
line wrap: on
line diff
--- a/tests/test-commit.t	Fri Aug 15 04:37:46 2014 +0200
+++ b/tests/test-commit.t	Fri Aug 15 23:05:53 2014 +0900
@@ -4,7 +4,12 @@
   $ cd test
   $ echo foo > foo
   $ hg add foo
-  $ HGEDITOR=true hg commit -m ""
+  $ cat > $TESTTMP/checkeditform.sh <<EOF
+  > env | grep HGEDITFORM
+  > true
+  > EOF
+  $ HGEDITOR="sh $TESTTMP/checkeditform.sh" hg commit -m ""
+  HGEDITFORM=commit.normal
   abort: empty commit message
   [255]
   $ hg commit -d '0 0' -m commit-1