##// END OF EJS Templates
templatekw: compare target context and its parent exactly (issue4690)...
FUJIWARA Katsunori -
r25392:ed18f4ac 3.4.1 stable
parent child Browse files
Show More
@@ -111,7 +111,7 b' def _showlist(name, values, plural=None,'
111 111
112 112 def getfiles(repo, ctx, revcache):
113 113 if 'files' not in revcache:
114 revcache['files'] = repo.status(ctx.p1().node(), ctx.node())[:3]
114 revcache['files'] = repo.status(ctx.p1(), ctx)[:3]
115 115 return revcache['files']
116 116
117 117 def getlatesttags(repo, ctx, cache):
@@ -1000,6 +1000,37 b' Test that "diff()" in committemplate wor'
1000 1000 HG: @@ -0,0 +1,1 @@
1001 1001 HG: +y
1002 1002
1003 $ echo cccc >> cc
1004 $ hg status -amr
1005 M cc
1006 $ HGEDITOR=cat hg commit --amend -e -m "cc should be excluded" -X cc
1007 cc should be excluded
1008
1009 HG: M:
1010 HG: A: foo y
1011 HG: R: a x
1012 HG: diff -r 6de0c1bde1c8 a
1013 HG: --- a/a Thu Jan 01 00:00:00 1970 +0000
1014 HG: +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
1015 HG: @@ -1,2 +0,0 @@
1016 HG: -a
1017 HG: -a
1018 HG: diff -r 6de0c1bde1c8 foo
1019 HG: --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1020 HG: +++ b/foo Thu Jan 01 00:00:00 1970 +0000
1021 HG: @@ -0,0 +1,1 @@
1022 HG: +foo
1023 HG: diff -r 6de0c1bde1c8 x
1024 HG: --- a/x Thu Jan 01 00:00:00 1970 +0000
1025 HG: +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
1026 HG: @@ -1,1 +0,0 @@
1027 HG: -x
1028 HG: diff -r 6de0c1bde1c8 y
1029 HG: --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1030 HG: +++ b/y Thu Jan 01 00:00:00 1970 +0000
1031 HG: @@ -0,0 +1,1 @@
1032 HG: +y
1033
1003 1034 Check for issue4405
1004 1035 -------------------
1005 1036
@@ -441,10 +441,16 b' specific template keywords work well'
441 441 $ cat >> .hg/hgrc <<EOF
442 442 > [committemplate]
443 443 > changeset = {desc}
444 > HG: mods={file_mods}
445 > HG: adds={file_adds}
446 > HG: dels={file_dels}
444 447 > HG: files={files}
445 448 > HG:
446 449 > {splitlines(diff()) % 'HG: {line}\n'
447 450 > }HG:
451 > HG: mods={file_mods}
452 > HG: adds={file_adds}
453 > HG: dels={file_dels}
448 454 > HG: files={files}\n
449 455 > EOF
450 456 $ hg status -amr
@@ -453,6 +459,9 b' specific template keywords work well'
453 459 R removed
454 460 $ HGEDITOR=cat hg commit -q -e -m "foo bar" changed
455 461 foo bar
462 HG: mods=changed
463 HG: adds=
464 HG: dels=
456 465 HG: files=changed
457 466 HG:
458 467 HG: --- a/changed Thu Jan 01 00:00:00 1970 +0000
@@ -461,6 +470,9 b' specific template keywords work well'
461 470 HG: changed
462 471 HG: +changed
463 472 HG:
473 HG: mods=changed
474 HG: adds=
475 HG: dels=
464 476 HG: files=changed
465 477 $ hg status -amr
466 478 A added
@@ -474,25 +486,43 b' specific template keywords work well'
474 486 $ cat >> .hg/hgrc <<EOF
475 487 > [committemplate]
476 488 > changeset = {desc}
489 > HG: mods={file_mods}
490 > HG: adds={file_adds}
491 > HG: dels={file_dels}
477 492 > HG: files={files}
478 493 > HG:
479 494 > {splitlines(diff("changed")) % 'HG: {line}\n'
480 495 > }HG:
496 > HG: mods={file_mods}
497 > HG: adds={file_adds}
498 > HG: dels={file_dels}
481 499 > HG: files={files}
482 500 > HG:
483 501 > {splitlines(diff("added")) % 'HG: {line}\n'
484 502 > }HG:
503 > HG: mods={file_mods}
504 > HG: adds={file_adds}
505 > HG: dels={file_dels}
485 506 > HG: files={files}
486 507 > HG:
487 508 > {splitlines(diff("removed")) % 'HG: {line}\n'
488 509 > }HG:
510 > HG: mods={file_mods}
511 > HG: adds={file_adds}
512 > HG: dels={file_dels}
489 513 > HG: files={files}\n
490 514 > EOF
491 515 $ HGEDITOR=cat hg commit -q -e -m "foo bar" added removed
492 516 foo bar
517 HG: mods=
518 HG: adds=added
519 HG: dels=removed
493 520 HG: files=added removed
494 521 HG:
495 522 HG:
523 HG: mods=
524 HG: adds=added
525 HG: dels=removed
496 526 HG: files=added removed
497 527 HG:
498 528 HG: --- /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -500,6 +530,9 b' specific template keywords work well'
500 530 HG: @@ -0,0 +1,1 @@
501 531 HG: +added
502 532 HG:
533 HG: mods=
534 HG: adds=added
535 HG: dels=removed
503 536 HG: files=added removed
504 537 HG:
505 538 HG: --- a/removed Thu Jan 01 00:00:00 1970 +0000
@@ -507,6 +540,9 b' specific template keywords work well'
507 540 HG: @@ -1,1 +0,0 @@
508 541 HG: -removed
509 542 HG:
543 HG: mods=
544 HG: adds=added
545 HG: dels=removed
510 546 HG: files=added removed
511 547 $ hg status -amr
512 548 M changed
General Comments 0
You need to be logged in to leave comments. Login now