374 |
374 |
375 $ cat >> .hg/hgrc <<EOF |
375 $ cat >> .hg/hgrc <<EOF |
376 > [committemplate] |
376 > [committemplate] |
377 > changeset.commit.normal = HG: this is "commit.normal" template |
377 > changeset.commit.normal = HG: this is "commit.normal" template |
378 > HG: {extramsg} |
378 > HG: {extramsg} |
379 > {if(currentbookmark, |
379 > {if(activebookmark, |
380 > "HG: bookmark '{currentbookmark}' is activated\n", |
380 > "HG: bookmark '{activebookmark}' is activated\n", |
381 > "HG: no bookmark is activated\n")}{subrepos % |
381 > "HG: no bookmark is activated\n")}{subrepos % |
382 > "HG: subrepo '{subrepo}' is changed\n"} |
382 > "HG: subrepo '{subrepo}' is changed\n"} |
383 > |
383 > |
384 > changeset.commit = HG: this is "commit" template |
384 > changeset.commit = HG: this is "commit" template |
385 > HG: {extramsg} |
385 > HG: {extramsg} |
386 > {if(currentbookmark, |
386 > {if(activebookmark, |
387 > "HG: bookmark '{currentbookmark}' is activated\n", |
387 > "HG: bookmark '{activebookmark}' is activated\n", |
388 > "HG: no bookmark is activated\n")}{subrepos % |
388 > "HG: no bookmark is activated\n")}{subrepos % |
389 > "HG: subrepo '{subrepo}' is changed\n"} |
389 > "HG: subrepo '{subrepo}' is changed\n"} |
390 > |
390 > |
391 > changeset = HG: this is customized commit template |
391 > changeset = HG: this is customized commit template |
392 > HG: {extramsg} |
392 > HG: {extramsg} |
393 > {if(currentbookmark, |
393 > {if(activebookmark, |
394 > "HG: bookmark '{currentbookmark}' is activated\n", |
394 > "HG: bookmark '{activebookmark}' is activated\n", |
395 > "HG: no bookmark is activated\n")}{subrepos % |
395 > "HG: no bookmark is activated\n")}{subrepos % |
396 > "HG: subrepo '{subrepo}' is changed\n"} |
396 > "HG: subrepo '{subrepo}' is changed\n"} |
397 > EOF |
397 > EOF |
398 |
398 |
399 $ hg init sub2 |
399 $ hg init sub2 |
402 $ echo 'sub2 = sub2' >> .hgsub |
402 $ echo 'sub2 = sub2' >> .hgsub |
403 |
403 |
404 $ HGEDITOR=cat hg commit -S -q |
404 $ HGEDITOR=cat hg commit -S -q |
405 HG: this is "commit.normal" template |
405 HG: this is "commit.normal" template |
406 HG: Leave message empty to abort commit. |
406 HG: Leave message empty to abort commit. |
407 HG: bookmark 'currentbookmark' is activated |
407 HG: bookmark 'activebookmark' is activated |
408 HG: subrepo 'sub' is changed |
408 HG: subrepo 'sub' is changed |
409 HG: subrepo 'sub2' is changed |
409 HG: subrepo 'sub2' is changed |
410 abort: empty commit message |
410 abort: empty commit message |
411 [255] |
411 [255] |
412 |
412 |
414 > [committemplate] |
414 > [committemplate] |
415 > changeset.commit.normal = |
415 > changeset.commit.normal = |
416 > # now, "changeset.commit" should be chosen for "hg commit" |
416 > # now, "changeset.commit" should be chosen for "hg commit" |
417 > EOF |
417 > EOF |
418 |
418 |
419 $ hg bookmark --inactive currentbookmark |
419 $ hg bookmark --inactive activebookmark |
420 $ hg forget .hgsub |
420 $ hg forget .hgsub |
421 $ HGEDITOR=cat hg commit -q |
421 $ HGEDITOR=cat hg commit -q |
422 HG: this is "commit" template |
422 HG: this is "commit" template |
423 HG: Leave message empty to abort commit. |
423 HG: Leave message empty to abort commit. |
424 HG: no bookmark is activated |
424 HG: no bookmark is activated |