diff tests/test-commit.t @ 21021:422981492ace

commit: --edit/-e to force edit of otherwise-supplied commit message The --edit/-e option for the 'commit' command forces editor, even when a commit message has been provided already by other means, such as by the -m or -l options.
author "Bradley M. Kuhn" <bkuhn@ebb.org>
date Sun, 08 Sep 2013 19:02:08 -0400
parents 81d6dc8c3c63
children 5375ba75df40
line wrap: on
line diff
--- a/tests/test-commit.t	Sat Apr 12 00:38:15 2014 -0400
+++ b/tests/test-commit.t	Sun Sep 08 19:02:08 2013 -0400
@@ -120,7 +120,18 @@
   $ hg add
   adding bar/bar (glob)
   adding foo/foo (glob)
-  $ hg ci -m commit-subdir-1 foo
+  $ HGEDITOR=cat hg ci -e -m commit-subdir-1 foo
+  commit-subdir-1
+  
+  
+  HG: Enter commit message.  Lines beginning with 'HG:' are removed.
+  HG: Leave message empty to abort commit.
+  HG: --
+  HG: user: test
+  HG: branch 'default'
+  HG: added foo/foo
+
+
   $ hg ci -m commit-subdir-2 bar
 
 subdir log 1
@@ -174,11 +185,23 @@
 dot and subdir commit test
 
   $ hg init test3
+  $ echo commit-foo-subdir > commit-log-test
   $ cd test3
   $ mkdir foo
   $ echo foo content > foo/plain-file
   $ hg add foo/plain-file
-  $ hg ci -m commit-foo-subdir foo
+  $ HGEDITOR=cat hg ci --edit -l ../commit-log-test foo
+  commit-foo-subdir
+  
+  
+  HG: Enter commit message.  Lines beginning with 'HG:' are removed.
+  HG: Leave message empty to abort commit.
+  HG: --
+  HG: user: test
+  HG: branch 'default'
+  HG: added foo/plain-file
+
+
   $ echo modified foo content > foo/plain-file
   $ hg ci -m commit-foo-dot .