equal
deleted
inserted
replaced
283 HG: added added |
283 HG: added added |
284 HG: changed changed |
284 HG: changed changed |
285 HG: removed removed |
285 HG: removed removed |
286 abort: empty commit message |
286 abort: empty commit message |
287 [255] |
287 [255] |
|
288 |
|
289 test saving last-message.txt |
|
290 |
|
291 $ hg init sub |
|
292 $ echo a > sub/a |
|
293 $ hg -R sub add sub/a |
|
294 $ cat > sub/.hg/hgrc <<EOF |
|
295 > [hooks] |
|
296 > precommit.test-saving-last-message = false |
|
297 > EOF |
|
298 |
|
299 $ echo 'sub = sub' > .hgsub |
|
300 $ hg add .hgsub |
|
301 |
|
302 $ cat > $TESTDIR/editor.sh <<EOF |
|
303 > echo "==== before editing:" |
|
304 > cat \$1 |
|
305 > echo "====" |
|
306 > echo "test saving last-message.txt" >> \$1 |
|
307 > EOF |
|
308 |
|
309 $ rm -f .hg/last-message.txt |
|
310 $ HGEDITOR="sh $TESTDIR/editor.sh" hg commit -S -q |
|
311 ==== before editing: |
|
312 |
|
313 |
|
314 HG: Enter commit message. Lines beginning with 'HG:' are removed. |
|
315 HG: Leave message empty to abort commit. |
|
316 HG: -- |
|
317 HG: user: test |
|
318 HG: branch 'default' |
|
319 HG: bookmark 'currentbookmark' |
|
320 HG: subrepo sub |
|
321 HG: added .hgsub |
|
322 HG: added added |
|
323 HG: changed .hgsubstate |
|
324 HG: changed changed |
|
325 HG: removed removed |
|
326 ==== |
|
327 abort: precommit.test-saving-last-message hook exited with status 1 (in subrepo sub) |
|
328 [255] |
|
329 $ cat .hg/last-message.txt |
|
330 |
|
331 |
|
332 test saving last-message.txt |
|
333 |
288 $ cd .. |
334 $ cd .. |
289 |
335 |
290 |
336 |
291 commit copy |
337 commit copy |
292 |
338 |