##// 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 def getfiles(repo, ctx, revcache):
112 def getfiles(repo, ctx, revcache):
113 if 'files' not in revcache:
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 return revcache['files']
115 return revcache['files']
116
116
117 def getlatesttags(repo, ctx, cache):
117 def getlatesttags(repo, ctx, cache):
@@ -1000,6 +1000,37 b' Test that "diff()" in committemplate wor'
1000 HG: @@ -0,0 +1,1 @@
1000 HG: @@ -0,0 +1,1 @@
1001 HG: +y
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 Check for issue4405
1034 Check for issue4405
1004 -------------------
1035 -------------------
1005
1036
@@ -441,10 +441,16 b' specific template keywords work well'
441 $ cat >> .hg/hgrc <<EOF
441 $ cat >> .hg/hgrc <<EOF
442 > [committemplate]
442 > [committemplate]
443 > changeset = {desc}
443 > changeset = {desc}
444 > HG: mods={file_mods}
445 > HG: adds={file_adds}
446 > HG: dels={file_dels}
444 > HG: files={files}
447 > HG: files={files}
445 > HG:
448 > HG:
446 > {splitlines(diff()) % 'HG: {line}\n'
449 > {splitlines(diff()) % 'HG: {line}\n'
447 > }HG:
450 > }HG:
451 > HG: mods={file_mods}
452 > HG: adds={file_adds}
453 > HG: dels={file_dels}
448 > HG: files={files}\n
454 > HG: files={files}\n
449 > EOF
455 > EOF
450 $ hg status -amr
456 $ hg status -amr
@@ -453,6 +459,9 b' specific template keywords work well'
453 R removed
459 R removed
454 $ HGEDITOR=cat hg commit -q -e -m "foo bar" changed
460 $ HGEDITOR=cat hg commit -q -e -m "foo bar" changed
455 foo bar
461 foo bar
462 HG: mods=changed
463 HG: adds=
464 HG: dels=
456 HG: files=changed
465 HG: files=changed
457 HG:
466 HG:
458 HG: --- a/changed Thu Jan 01 00:00:00 1970 +0000
467 HG: --- a/changed Thu Jan 01 00:00:00 1970 +0000
@@ -461,6 +470,9 b' specific template keywords work well'
461 HG: changed
470 HG: changed
462 HG: +changed
471 HG: +changed
463 HG:
472 HG:
473 HG: mods=changed
474 HG: adds=
475 HG: dels=
464 HG: files=changed
476 HG: files=changed
465 $ hg status -amr
477 $ hg status -amr
466 A added
478 A added
@@ -474,25 +486,43 b' specific template keywords work well'
474 $ cat >> .hg/hgrc <<EOF
486 $ cat >> .hg/hgrc <<EOF
475 > [committemplate]
487 > [committemplate]
476 > changeset = {desc}
488 > changeset = {desc}
489 > HG: mods={file_mods}
490 > HG: adds={file_adds}
491 > HG: dels={file_dels}
477 > HG: files={files}
492 > HG: files={files}
478 > HG:
493 > HG:
479 > {splitlines(diff("changed")) % 'HG: {line}\n'
494 > {splitlines(diff("changed")) % 'HG: {line}\n'
480 > }HG:
495 > }HG:
496 > HG: mods={file_mods}
497 > HG: adds={file_adds}
498 > HG: dels={file_dels}
481 > HG: files={files}
499 > HG: files={files}
482 > HG:
500 > HG:
483 > {splitlines(diff("added")) % 'HG: {line}\n'
501 > {splitlines(diff("added")) % 'HG: {line}\n'
484 > }HG:
502 > }HG:
503 > HG: mods={file_mods}
504 > HG: adds={file_adds}
505 > HG: dels={file_dels}
485 > HG: files={files}
506 > HG: files={files}
486 > HG:
507 > HG:
487 > {splitlines(diff("removed")) % 'HG: {line}\n'
508 > {splitlines(diff("removed")) % 'HG: {line}\n'
488 > }HG:
509 > }HG:
510 > HG: mods={file_mods}
511 > HG: adds={file_adds}
512 > HG: dels={file_dels}
489 > HG: files={files}\n
513 > HG: files={files}\n
490 > EOF
514 > EOF
491 $ HGEDITOR=cat hg commit -q -e -m "foo bar" added removed
515 $ HGEDITOR=cat hg commit -q -e -m "foo bar" added removed
492 foo bar
516 foo bar
517 HG: mods=
518 HG: adds=added
519 HG: dels=removed
493 HG: files=added removed
520 HG: files=added removed
494 HG:
521 HG:
495 HG:
522 HG:
523 HG: mods=
524 HG: adds=added
525 HG: dels=removed
496 HG: files=added removed
526 HG: files=added removed
497 HG:
527 HG:
498 HG: --- /dev/null Thu Jan 01 00:00:00 1970 +0000
528 HG: --- /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -500,6 +530,9 b' specific template keywords work well'
500 HG: @@ -0,0 +1,1 @@
530 HG: @@ -0,0 +1,1 @@
501 HG: +added
531 HG: +added
502 HG:
532 HG:
533 HG: mods=
534 HG: adds=added
535 HG: dels=removed
503 HG: files=added removed
536 HG: files=added removed
504 HG:
537 HG:
505 HG: --- a/removed Thu Jan 01 00:00:00 1970 +0000
538 HG: --- a/removed Thu Jan 01 00:00:00 1970 +0000
@@ -507,6 +540,9 b' specific template keywords work well'
507 HG: @@ -1,1 +0,0 @@
540 HG: @@ -1,1 +0,0 @@
508 HG: -removed
541 HG: -removed
509 HG:
542 HG:
543 HG: mods=
544 HG: adds=added
545 HG: dels=removed
510 HG: files=added removed
546 HG: files=added removed
511 $ hg status -amr
547 $ hg status -amr
512 M changed
548 M changed
General Comments 0
You need to be logged in to leave comments. Login now