Mercurial > hg
comparison tests/test-commit.t @ 23604:bb304f9b05d0
memctx: remove redundant test for issue4470 from test-commit.t
Because:
- the test to avoid regression for issue4470 was already added to
test-commit-amend.t by previous patch
It is also a part of test series about manifest calculation issues
of memctx in test-commit-amend.t.
- this is the only test using "commit --amend" in test-commit.t
author | FUJIWARA Katsunori <foozy@lares.dti.ne.jp> |
---|---|
date | Fri, 19 Dec 2014 00:11:56 +0900 |
parents | a4679a74df14 |
children | 7aaf987d9e88 |
comparison
equal
deleted
inserted
replaced
23603:d74eb8d477d5 | 23604:bb304f9b05d0 |
---|---|
427 HG: Leave message empty to abort commit. | 427 HG: Leave message empty to abort commit. |
428 HG: no bookmark is activated | 428 HG: no bookmark is activated |
429 abort: empty commit message | 429 abort: empty commit message |
430 [255] | 430 [255] |
431 | 431 |
432 prove that we can show a diff of an amend using committemplate: | |
433 | |
434 $ hg init issue4470 | |
435 $ cd issue4470 | |
436 $ cat >> .hg/hgrc <<EOF | |
437 > [committemplate] | |
438 > changeset = {desc}\n\n | |
439 > HG: {extramsg} | |
440 > HG: user: {author}\n{ifeq(p2rev, "-1", "", | |
441 > "HG: branch merge\n") | |
442 > }HG: branch '{branch}'\n{if(currentbookmark, | |
443 > "HG: bookmark '{currentbookmark}'\n") }{subrepos % | |
444 > "HG: subrepo {subrepo}\n" } | |
445 > {splitlines(diff()) % 'HG: {line}\n'} | |
446 > EOF | |
447 $ echo a > a | |
448 $ echo b > b | |
449 $ hg addr | |
450 adding a | |
451 adding b | |
452 $ hg ci -m 'init' | |
453 $ hg rm b | |
454 $ hg ci -m 'rm b' | |
455 $ hg export . | |
456 # HG changeset patch | |
457 # User test | |
458 # Date 0 0 | |
459 # Thu Jan 01 00:00:00 1970 +0000 | |
460 # Node ID 88d0ffa85e7a92ccc7c9cc187f9b17858bd206a7 | |
461 # Parent 9118d25c26b1ca5cab5683b02100e7eb2c0d9471 | |
462 rm b | |
463 | |
464 diff -r 9118d25c26b1 -r 88d0ffa85e7a b | |
465 --- a/b Thu Jan 01 00:00:00 1970 +0000 | |
466 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
467 @@ -1,1 +0,0 @@ | |
468 -b | |
469 $ echo a >> a | |
470 $ HGEDITOR=cat hg commit --amend | |
471 rm b | |
472 | |
473 | |
474 HG: Leave message empty to abort commit. | |
475 HG: user: test | |
476 HG: branch 'default' | |
477 | |
478 HG: diff -r 9118d25c26b1 a | |
479 HG: --- a/a Thu Jan 01 00:00:00 1970 +0000 | |
480 HG: +++ b/a Thu Jan 01 00:00:00 1970 +0000 | |
481 HG: @@ -1,1 +1,2 @@ | |
482 HG: a | |
483 HG: +a | |
484 HG: diff -r 9118d25c26b1 b | |
485 HG: --- a/b Thu Jan 01 00:00:00 1970 +0000 | |
486 HG: +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
487 HG: @@ -1,1 +0,0 @@ | |
488 HG: -b | |
489 saved backup bundle to $TESTTMP/*/*-amend-backup.hg (glob) | |
490 $ cd .. | |
491 | |
492 cleanup | |
493 $ cat >> .hg/hgrc <<EOF | 432 $ cat >> .hg/hgrc <<EOF |
494 > # disable customizing for subsequent tests | 433 > # disable customizing for subsequent tests |
495 > [committemplate] | 434 > [committemplate] |
496 > changeset = | 435 > changeset = |
497 > EOF | 436 > EOF |