352 $ cat .hg/last-message.txt |
352 $ cat .hg/last-message.txt |
353 |
353 |
354 |
354 |
355 test saving last-message.txt |
355 test saving last-message.txt |
356 |
356 |
|
357 test that '[committemplate] changeset' definition and commit log |
|
358 specific template keywords work well |
|
359 |
|
360 $ cat >> .hg/hgrc <<EOF |
|
361 > [committemplate] |
|
362 > changeset = HG: this is customized commit template |
|
363 > HG: {extramsg} |
|
364 > {if(currentbookmark, |
|
365 > "HG: bookmark '{currentbookmark}' is activated\n", |
|
366 > "HG: no bookmark is activated\n")}{subrepos % |
|
367 > "HG: subrepo '{subrepo}' is changed\n"} |
|
368 > EOF |
|
369 |
|
370 $ hg init sub2 |
|
371 $ echo a > sub2/a |
|
372 $ hg -R sub2 add sub2/a |
|
373 $ echo 'sub2 = sub2' >> .hgsub |
|
374 |
|
375 $ HGEDITOR=cat hg commit -S -q |
|
376 HG: this is customized commit template |
|
377 HG: Leave message empty to abort commit. |
|
378 HG: bookmark 'currentbookmark' is activated |
|
379 HG: subrepo 'sub' is changed |
|
380 HG: subrepo 'sub2' is changed |
|
381 abort: empty commit message |
|
382 [255] |
|
383 |
|
384 $ hg bookmark --inactive currentbookmark |
|
385 $ hg forget .hgsub |
|
386 $ HGEDITOR=cat hg commit -q |
|
387 HG: this is customized commit template |
|
388 HG: Leave message empty to abort commit. |
|
389 HG: no bookmark is activated |
|
390 abort: empty commit message |
|
391 [255] |
|
392 |
|
393 $ cat >> .hg/hgrc <<EOF |
|
394 > # disable customizing for subsequent tests |
|
395 > [committemplate] |
|
396 > changeset = |
|
397 > EOF |
|
398 |
357 $ cd .. |
399 $ cd .. |
358 |
400 |
359 |
401 |
360 commit copy |
402 commit copy |
361 |
403 |