Show More
@@ -568,8 +568,9 b' def showpredecessors(repo, ctx, **args):' | |||
|
568 | 568 | predecessors = sorted(obsutil.closestpredecessors(repo, ctx.node())) |
|
569 | 569 | predecessors = map(hex, predecessors) |
|
570 | 570 | |
|
571 |
return _hybrid(None, predecessors, |
|
|
572 |
lambda |
|
|
571 | return _hybrid(None, predecessors, | |
|
572 | lambda x: {'ctx': repo[x], 'revcache': {}}, | |
|
573 | lambda d: short(scmutil.binnode(d['ctx']))) | |
|
573 | 574 | |
|
574 | 575 | @templatekeyword('p1rev') |
|
575 | 576 | def showp1rev(repo, ctx, templ, **args): |
@@ -16,7 +16,7 b' Global setup' | |||
|
16 | 16 | > {if(predecessors, "\n Predecessors: {predecessors}")}\ |
|
17 | 17 | > {if(predecessors, "\n semi-colon: {join(predecessors, "; ")}")}\ |
|
18 | 18 | > {if(predecessors, "\n json: {predecessors|json}")}\ |
|
19 | > {if(predecessors, "\n map: {join(predecessors % "{node}", " ")}")}\n' | |
|
19 | > {if(predecessors, "\n map: {join(predecessors % "{rev}:{node}", " ")}")}\n' | |
|
20 | 20 | > EOF |
|
21 | 21 | |
|
22 | 22 | Test templates on amended commit |
@@ -73,7 +73,7 b' Predecessors template should show curren' | |||
|
73 | 73 | | Predecessors: 471f378eab4c |
|
74 | 74 | | semi-colon: 471f378eab4c |
|
75 | 75 | | json: ["471f378eab4c5e25f6c77f785b27c936efb22874"] |
|
76 | | map: 471f378eab4c5e25f6c77f785b27c936efb22874 | |
|
76 | | map: 1:471f378eab4c5e25f6c77f785b27c936efb22874 | |
|
77 | 77 | | @ 471f378eab4c |
|
78 | 78 | |/ |
|
79 | 79 | o ea207398892e |
@@ -87,7 +87,7 b' Predecessors template should show curren' | |||
|
87 | 87 | | Predecessors: a468dc9b3633 |
|
88 | 88 | | semi-colon: a468dc9b3633 |
|
89 | 89 | | json: ["a468dc9b36338b14fdb7825f55ce3df4e71517ad"] |
|
90 | | map: a468dc9b36338b14fdb7825f55ce3df4e71517ad | |
|
90 | | map: 3:a468dc9b36338b14fdb7825f55ce3df4e71517ad | |
|
91 | 91 | | @ a468dc9b3633 |
|
92 | 92 | |/ |
|
93 | 93 | o ea207398892e |
@@ -99,12 +99,12 b' with --hidden' | |||
|
99 | 99 | | Predecessors: a468dc9b3633 |
|
100 | 100 | | semi-colon: a468dc9b3633 |
|
101 | 101 | | json: ["a468dc9b36338b14fdb7825f55ce3df4e71517ad"] |
|
102 | | map: a468dc9b36338b14fdb7825f55ce3df4e71517ad | |
|
102 | | map: 3:a468dc9b36338b14fdb7825f55ce3df4e71517ad | |
|
103 | 103 | | @ a468dc9b3633 |
|
104 | 104 | |/ Predecessors: 471f378eab4c |
|
105 | 105 | | semi-colon: 471f378eab4c |
|
106 | 106 | | json: ["471f378eab4c5e25f6c77f785b27c936efb22874"] |
|
107 | | map: 471f378eab4c5e25f6c77f785b27c936efb22874 | |
|
107 | | map: 1:471f378eab4c5e25f6c77f785b27c936efb22874 | |
|
108 | 108 | | x f137d23bb3e1 |
|
109 | 109 | | | |
|
110 | 110 | | x 471f378eab4c |
@@ -126,12 +126,12 b' visible.' | |||
|
126 | 126 | | Predecessors: a468dc9b3633 |
|
127 | 127 | | semi-colon: a468dc9b3633 |
|
128 | 128 | | json: ["a468dc9b36338b14fdb7825f55ce3df4e71517ad"] |
|
129 | | map: a468dc9b36338b14fdb7825f55ce3df4e71517ad | |
|
129 | | map: 3:a468dc9b36338b14fdb7825f55ce3df4e71517ad | |
|
130 | 130 | | x a468dc9b3633 |
|
131 | 131 | |/ Predecessors: 471f378eab4c |
|
132 | 132 | | semi-colon: 471f378eab4c |
|
133 | 133 | | json: ["471f378eab4c5e25f6c77f785b27c936efb22874"] |
|
134 | | map: 471f378eab4c5e25f6c77f785b27c936efb22874 | |
|
134 | | map: 1:471f378eab4c5e25f6c77f785b27c936efb22874 | |
|
135 | 135 | | x f137d23bb3e1 |
|
136 | 136 | | | |
|
137 | 137 | | x 471f378eab4c |
@@ -209,12 +209,12 b' Predecessors template should show curren' | |||
|
209 | 209 | | Predecessors: 471597cad322 |
|
210 | 210 | | semi-colon: 471597cad322 |
|
211 | 211 | | json: ["471597cad322d1f659bb169751be9133dad92ef3"] |
|
212 | | map: 471597cad322d1f659bb169751be9133dad92ef3 | |
|
212 | | map: 1:471597cad322d1f659bb169751be9133dad92ef3 | |
|
213 | 213 | o 337fec4d2edc |
|
214 | 214 | | Predecessors: 471597cad322 |
|
215 | 215 | | semi-colon: 471597cad322 |
|
216 | 216 | | json: ["471597cad322d1f659bb169751be9133dad92ef3"] |
|
217 | | map: 471597cad322d1f659bb169751be9133dad92ef3 | |
|
217 | | map: 1:471597cad322d1f659bb169751be9133dad92ef3 | |
|
218 | 218 | | @ 471597cad322 |
|
219 | 219 | |/ |
|
220 | 220 | o ea207398892e |
@@ -238,12 +238,12 b' with --hidden' | |||
|
238 | 238 | | Predecessors: 471597cad322 |
|
239 | 239 | | semi-colon: 471597cad322 |
|
240 | 240 | | json: ["471597cad322d1f659bb169751be9133dad92ef3"] |
|
241 | | map: 471597cad322d1f659bb169751be9133dad92ef3 | |
|
241 | | map: 1:471597cad322d1f659bb169751be9133dad92ef3 | |
|
242 | 242 | o 337fec4d2edc |
|
243 | 243 | | Predecessors: 471597cad322 |
|
244 | 244 | | semi-colon: 471597cad322 |
|
245 | 245 | | json: ["471597cad322d1f659bb169751be9133dad92ef3"] |
|
246 | | map: 471597cad322d1f659bb169751be9133dad92ef3 | |
|
246 | | map: 1:471597cad322d1f659bb169751be9133dad92ef3 | |
|
247 | 247 | | x 471597cad322 |
|
248 | 248 | |/ |
|
249 | 249 | o ea207398892e |
@@ -323,7 +323,7 b' Predecessors template should show curren' | |||
|
323 | 323 | | Predecessors: 471f378eab4c |
|
324 | 324 | | semi-colon: 471f378eab4c |
|
325 | 325 | | json: ["471f378eab4c5e25f6c77f785b27c936efb22874"] |
|
326 | | map: 471f378eab4c5e25f6c77f785b27c936efb22874 | |
|
326 | | map: 1:471f378eab4c5e25f6c77f785b27c936efb22874 | |
|
327 | 327 | | @ 471f378eab4c |
|
328 | 328 | |/ |
|
329 | 329 | o ea207398892e |
@@ -338,7 +338,7 b' displayed' | |||
|
338 | 338 | | Predecessors: 0dec01379d3b 471f378eab4c |
|
339 | 339 | | semi-colon: 0dec01379d3b; 471f378eab4c |
|
340 | 340 | | json: ["0dec01379d3be6318c470ead31b1fe7ae7cb53d5", "471f378eab4c5e25f6c77f785b27c936efb22874"] |
|
341 | | map: 0dec01379d3be6318c470ead31b1fe7ae7cb53d5 471f378eab4c5e25f6c77f785b27c936efb22874 | |
|
341 | | map: 2:0dec01379d3be6318c470ead31b1fe7ae7cb53d5 1:471f378eab4c5e25f6c77f785b27c936efb22874 | |
|
342 | 342 | | @ 0dec01379d3b |
|
343 | 343 | | | |
|
344 | 344 | | x 471f378eab4c |
@@ -362,7 +362,7 b' with --hidden' | |||
|
362 | 362 | | Predecessors: 0dec01379d3b 471f378eab4c |
|
363 | 363 | | semi-colon: 0dec01379d3b; 471f378eab4c |
|
364 | 364 | | json: ["0dec01379d3be6318c470ead31b1fe7ae7cb53d5", "471f378eab4c5e25f6c77f785b27c936efb22874"] |
|
365 | | map: 0dec01379d3be6318c470ead31b1fe7ae7cb53d5 471f378eab4c5e25f6c77f785b27c936efb22874 | |
|
365 | | map: 2:0dec01379d3be6318c470ead31b1fe7ae7cb53d5 1:471f378eab4c5e25f6c77f785b27c936efb22874 | |
|
366 | 366 | | x 0dec01379d3b |
|
367 | 367 | | | |
|
368 | 368 | | x 471f378eab4c |
@@ -474,12 +474,12 b' Predecessors template should show curren' | |||
|
474 | 474 | | Predecessors: 471f378eab4c |
|
475 | 475 | | semi-colon: 471f378eab4c |
|
476 | 476 | | json: ["471f378eab4c5e25f6c77f785b27c936efb22874"] |
|
477 | | map: 471f378eab4c5e25f6c77f785b27c936efb22874 | |
|
477 | | map: 1:471f378eab4c5e25f6c77f785b27c936efb22874 | |
|
478 | 478 | | o fdf9bde5129a |
|
479 | 479 | |/ Predecessors: 471f378eab4c |
|
480 | 480 | | semi-colon: 471f378eab4c |
|
481 | 481 | | json: ["471f378eab4c5e25f6c77f785b27c936efb22874"] |
|
482 | | map: 471f378eab4c5e25f6c77f785b27c936efb22874 | |
|
482 | | map: 1:471f378eab4c5e25f6c77f785b27c936efb22874 | |
|
483 | 483 | | @ 471f378eab4c |
|
484 | 484 | |/ |
|
485 | 485 | o ea207398892e |
@@ -503,17 +503,17 b' Predecessors template should the predece' | |||
|
503 | 503 | | Predecessors: 65b757b745b9 |
|
504 | 504 | | semi-colon: 65b757b745b9 |
|
505 | 505 | | json: ["65b757b745b935093c87a2bccd877521cccffcbd"] |
|
506 | | map: 65b757b745b935093c87a2bccd877521cccffcbd | |
|
506 | | map: 3:65b757b745b935093c87a2bccd877521cccffcbd | |
|
507 | 507 | | x 65b757b745b9 |
|
508 | 508 | |/ Predecessors: 471f378eab4c |
|
509 | 509 | | semi-colon: 471f378eab4c |
|
510 | 510 | | json: ["471f378eab4c5e25f6c77f785b27c936efb22874"] |
|
511 | | map: 471f378eab4c5e25f6c77f785b27c936efb22874 | |
|
511 | | map: 1:471f378eab4c5e25f6c77f785b27c936efb22874 | |
|
512 | 512 | | @ fdf9bde5129a |
|
513 | 513 | |/ Predecessors: 471f378eab4c |
|
514 | 514 | | semi-colon: 471f378eab4c |
|
515 | 515 | | json: ["471f378eab4c5e25f6c77f785b27c936efb22874"] |
|
516 | | map: 471f378eab4c5e25f6c77f785b27c936efb22874 | |
|
516 | | map: 1:471f378eab4c5e25f6c77f785b27c936efb22874 | |
|
517 | 517 | | x 471f378eab4c |
|
518 | 518 | |/ |
|
519 | 519 | o ea207398892e |
@@ -607,7 +607,7 b' Predecessors template should show curren' | |||
|
607 | 607 | | Predecessors: 471f378eab4c |
|
608 | 608 | | semi-colon: 471f378eab4c |
|
609 | 609 | | json: ["471f378eab4c5e25f6c77f785b27c936efb22874"] |
|
610 | | map: 471f378eab4c5e25f6c77f785b27c936efb22874 | |
|
610 | | map: 1:471f378eab4c5e25f6c77f785b27c936efb22874 | |
|
611 | 611 | | @ 471f378eab4c |
|
612 | 612 | |/ |
|
613 | 613 | o ea207398892e |
@@ -621,7 +621,7 b' Predecessors template should both predec' | |||
|
621 | 621 | | Predecessors: 0dec01379d3b 471f378eab4c |
|
622 | 622 | | semi-colon: 0dec01379d3b; 471f378eab4c |
|
623 | 623 | | json: ["0dec01379d3be6318c470ead31b1fe7ae7cb53d5", "471f378eab4c5e25f6c77f785b27c936efb22874"] |
|
624 | | map: 0dec01379d3be6318c470ead31b1fe7ae7cb53d5 471f378eab4c5e25f6c77f785b27c936efb22874 | |
|
624 | | map: 2:0dec01379d3be6318c470ead31b1fe7ae7cb53d5 1:471f378eab4c5e25f6c77f785b27c936efb22874 | |
|
625 | 625 | | @ 0dec01379d3b |
|
626 | 626 | | | |
|
627 | 627 | | x 471f378eab4c |
@@ -637,7 +637,7 b' Predecessors template should both predec' | |||
|
637 | 637 | | Predecessors: 471f378eab4c b7ea6d14e664 |
|
638 | 638 | | semi-colon: 471f378eab4c; b7ea6d14e664 |
|
639 | 639 | | json: ["471f378eab4c5e25f6c77f785b27c936efb22874", "b7ea6d14e664bdc8922221f7992631b50da3fb07"] |
|
640 | | map: 471f378eab4c5e25f6c77f785b27c936efb22874 b7ea6d14e664bdc8922221f7992631b50da3fb07 | |
|
640 | | map: 1:471f378eab4c5e25f6c77f785b27c936efb22874 3:b7ea6d14e664bdc8922221f7992631b50da3fb07 | |
|
641 | 641 | | @ b7ea6d14e664 |
|
642 | 642 | | | |
|
643 | 643 | | x 471f378eab4c |
@@ -660,12 +660,12 b' with --hidden' | |||
|
660 | 660 | | Predecessors: 471f378eab4c b7ea6d14e664 |
|
661 | 661 | | semi-colon: 471f378eab4c; b7ea6d14e664 |
|
662 | 662 | | json: ["471f378eab4c5e25f6c77f785b27c936efb22874", "b7ea6d14e664bdc8922221f7992631b50da3fb07"] |
|
663 | | map: 471f378eab4c5e25f6c77f785b27c936efb22874 b7ea6d14e664bdc8922221f7992631b50da3fb07 | |
|
663 | | map: 1:471f378eab4c5e25f6c77f785b27c936efb22874 3:b7ea6d14e664bdc8922221f7992631b50da3fb07 | |
|
664 | 664 | | x b7ea6d14e664 |
|
665 | 665 | | | Predecessors: 0dec01379d3b |
|
666 | 666 | | | semi-colon: 0dec01379d3b |
|
667 | 667 | | | json: ["0dec01379d3be6318c470ead31b1fe7ae7cb53d5"] |
|
668 | | | map: 0dec01379d3be6318c470ead31b1fe7ae7cb53d5 | |
|
668 | | | map: 2:0dec01379d3be6318c470ead31b1fe7ae7cb53d5 | |
|
669 | 669 | | | x 0dec01379d3b |
|
670 | 670 | | |/ |
|
671 | 671 | | x 471f378eab4c |
@@ -768,7 +768,7 b' Predecessors template should show curren' | |||
|
768 | 768 | | Predecessors: 471f378eab4c |
|
769 | 769 | | semi-colon: 471f378eab4c |
|
770 | 770 | | json: ["471f378eab4c5e25f6c77f785b27c936efb22874"] |
|
771 | | map: 471f378eab4c5e25f6c77f785b27c936efb22874 | |
|
771 | | map: 1:471f378eab4c5e25f6c77f785b27c936efb22874 | |
|
772 | 772 | | @ 471f378eab4c |
|
773 | 773 | |/ |
|
774 | 774 | o ea207398892e |
@@ -789,7 +789,7 b' with --hidden' | |||
|
789 | 789 | | Predecessors: 471f378eab4c |
|
790 | 790 | | semi-colon: 471f378eab4c |
|
791 | 791 | | json: ["471f378eab4c5e25f6c77f785b27c936efb22874"] |
|
792 | | map: 471f378eab4c5e25f6c77f785b27c936efb22874 | |
|
792 | | map: 1:471f378eab4c5e25f6c77f785b27c936efb22874 | |
|
793 | 793 | | x 471f378eab4c |
|
794 | 794 | |/ |
|
795 | 795 | o ea207398892e |
@@ -833,17 +833,17 b' Check templates' | |||
|
833 | 833 | | Predecessors: 0dec01379d3b |
|
834 | 834 | | semi-colon: 0dec01379d3b |
|
835 | 835 | | json: ["0dec01379d3be6318c470ead31b1fe7ae7cb53d5"] |
|
836 | | map: 0dec01379d3be6318c470ead31b1fe7ae7cb53d5 | |
|
836 | | map: 2:0dec01379d3be6318c470ead31b1fe7ae7cb53d5 | |
|
837 | 837 | | @ 0dec01379d3b |
|
838 | 838 | | | Predecessors: 471f378eab4c |
|
839 | 839 | | | semi-colon: 471f378eab4c |
|
840 | 840 | | | json: ["471f378eab4c5e25f6c77f785b27c936efb22874"] |
|
841 | | | map: 471f378eab4c5e25f6c77f785b27c936efb22874 | |
|
841 | | | map: 1:471f378eab4c5e25f6c77f785b27c936efb22874 | |
|
842 | 842 | | x 471f378eab4c |
|
843 | 843 | |/ Predecessors: 0dec01379d3b |
|
844 | 844 | | semi-colon: 0dec01379d3b |
|
845 | 845 | | json: ["0dec01379d3be6318c470ead31b1fe7ae7cb53d5"] |
|
846 | | map: 0dec01379d3be6318c470ead31b1fe7ae7cb53d5 | |
|
846 | | map: 2:0dec01379d3be6318c470ead31b1fe7ae7cb53d5 | |
|
847 | 847 | o ea207398892e |
|
848 | 848 | |
|
849 | 849 | |
@@ -854,7 +854,7 b' Check templates' | |||
|
854 | 854 | | Predecessors: 471f378eab4c |
|
855 | 855 | | semi-colon: 471f378eab4c |
|
856 | 856 | | json: ["471f378eab4c5e25f6c77f785b27c936efb22874"] |
|
857 | | map: 471f378eab4c5e25f6c77f785b27c936efb22874 | |
|
857 | | map: 1:471f378eab4c5e25f6c77f785b27c936efb22874 | |
|
858 | 858 | | @ 471f378eab4c |
|
859 | 859 | |/ |
|
860 | 860 | o ea207398892e |
@@ -873,16 +873,16 b' Check templates' | |||
|
873 | 873 | | Predecessors: 0dec01379d3b |
|
874 | 874 | | semi-colon: 0dec01379d3b |
|
875 | 875 | | json: ["0dec01379d3be6318c470ead31b1fe7ae7cb53d5"] |
|
876 | | map: 0dec01379d3be6318c470ead31b1fe7ae7cb53d5 | |
|
876 | | map: 2:0dec01379d3be6318c470ead31b1fe7ae7cb53d5 | |
|
877 | 877 | | x 0dec01379d3b |
|
878 | 878 | | | Predecessors: 471f378eab4c |
|
879 | 879 | | | semi-colon: 471f378eab4c |
|
880 | 880 | | | json: ["471f378eab4c5e25f6c77f785b27c936efb22874"] |
|
881 | | | map: 471f378eab4c5e25f6c77f785b27c936efb22874 | |
|
881 | | | map: 1:471f378eab4c5e25f6c77f785b27c936efb22874 | |
|
882 | 882 | | x 471f378eab4c |
|
883 | 883 | |/ Predecessors: 0dec01379d3b |
|
884 | 884 | | semi-colon: 0dec01379d3b |
|
885 | 885 | | json: ["0dec01379d3be6318c470ead31b1fe7ae7cb53d5"] |
|
886 | | map: 0dec01379d3be6318c470ead31b1fe7ae7cb53d5 | |
|
886 | | map: 2:0dec01379d3be6318c470ead31b1fe7ae7cb53d5 | |
|
887 | 887 | @ ea207398892e |
|
888 | 888 |
General Comments 0
You need to be logged in to leave comments.
Login now