Mercurial > hg
comparison 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 |
comparison
equal
deleted
inserted
replaced
21020:5041163ee382 | 21021:422981492ace |
---|---|
118 $ mkdir bar | 118 $ mkdir bar |
119 $ echo bar > bar/bar | 119 $ echo bar > bar/bar |
120 $ hg add | 120 $ hg add |
121 adding bar/bar (glob) | 121 adding bar/bar (glob) |
122 adding foo/foo (glob) | 122 adding foo/foo (glob) |
123 $ hg ci -m commit-subdir-1 foo | 123 $ HGEDITOR=cat hg ci -e -m commit-subdir-1 foo |
124 commit-subdir-1 | |
125 | |
126 | |
127 HG: Enter commit message. Lines beginning with 'HG:' are removed. | |
128 HG: Leave message empty to abort commit. | |
129 HG: -- | |
130 HG: user: test | |
131 HG: branch 'default' | |
132 HG: added foo/foo | |
133 | |
134 | |
124 $ hg ci -m commit-subdir-2 bar | 135 $ hg ci -m commit-subdir-2 bar |
125 | 136 |
126 subdir log 1 | 137 subdir log 1 |
127 | 138 |
128 $ hg log -v foo | 139 $ hg log -v foo |
172 | 183 |
173 | 184 |
174 dot and subdir commit test | 185 dot and subdir commit test |
175 | 186 |
176 $ hg init test3 | 187 $ hg init test3 |
188 $ echo commit-foo-subdir > commit-log-test | |
177 $ cd test3 | 189 $ cd test3 |
178 $ mkdir foo | 190 $ mkdir foo |
179 $ echo foo content > foo/plain-file | 191 $ echo foo content > foo/plain-file |
180 $ hg add foo/plain-file | 192 $ hg add foo/plain-file |
181 $ hg ci -m commit-foo-subdir foo | 193 $ HGEDITOR=cat hg ci --edit -l ../commit-log-test foo |
194 commit-foo-subdir | |
195 | |
196 | |
197 HG: Enter commit message. Lines beginning with 'HG:' are removed. | |
198 HG: Leave message empty to abort commit. | |
199 HG: -- | |
200 HG: user: test | |
201 HG: branch 'default' | |
202 HG: added foo/plain-file | |
203 | |
204 | |
182 $ echo modified foo content > foo/plain-file | 205 $ echo modified foo content > foo/plain-file |
183 $ hg ci -m commit-foo-dot . | 206 $ hg ci -m commit-foo-dot . |
184 | 207 |
185 full log | 208 full log |
186 | 209 |