Show More
@@ -646,3 +646,12 b' def markersusers(markers):' | |||
|
646 | 646 | users = set(meta.get('user') for meta in markersmeta if meta.get('user')) |
|
647 | 647 | |
|
648 | 648 | return sorted(users) |
|
649 | ||
|
650 | def markersoperations(markers): | |
|
651 | """ Returns a sorted list of markers operations without duplicates | |
|
652 | """ | |
|
653 | markersmeta = [dict(m[3]) for m in markers] | |
|
654 | operations = set(meta.get('operation') for meta in markersmeta | |
|
655 | if meta.get('operation')) | |
|
656 | ||
|
657 | return sorted(operations) |
@@ -878,6 +878,23 b' def mod(context, mapping, args):' | |||
|
878 | 878 | func = lambda a, b: a % b |
|
879 | 879 | return runarithmetic(context, mapping, (func, args[0], args[1])) |
|
880 | 880 | |
|
881 | @templatefunc('obsfateoperations(markers)') | |
|
882 | def obsfateoperations(context, mapping, args): | |
|
883 | """Compute obsfate related information based on markers (EXPERIMENTAL)""" | |
|
884 | if len(args) != 1: | |
|
885 | # i18n: "obsfateoperations" is a keyword | |
|
886 | raise error.ParseError(_("obsfateoperations expects one arguments")) | |
|
887 | ||
|
888 | markers = evalfuncarg(context, mapping, args[0]) | |
|
889 | ||
|
890 | try: | |
|
891 | data = obsutil.markersoperations(markers) | |
|
892 | return templatekw.hybridlist(data, name='operation') | |
|
893 | except (TypeError, KeyError): | |
|
894 | # i18n: "obsfateoperations" is a keyword | |
|
895 | errmsg = _("obsfateoperations first argument should be an iterable") | |
|
896 | raise error.ParseError(errmsg) | |
|
897 | ||
|
881 | 898 | @templatefunc('obsfatedate(markers)') |
|
882 | 899 | def obsfatedate(context, mapping, args): |
|
883 | 900 | """Compute obsfate related information based on markers (EXPERIMENTAL)""" |
@@ -14,9 +14,10 b' Global setup' | |||
|
14 | 14 | > [templates] |
|
15 | 15 | > obsfatesuccessors = "{if(successors, " as ")}{join(successors, ", ")}" |
|
16 | 16 | > obsfateverb = "{obsfateverb(successors)}" |
|
17 | > obsfateoperations = "{if(obsfateoperations(markers), " using {join(obsfateoperations(markers), ", ")}")}" | |
|
17 | 18 | > obsfateusers = "{if(obsfateusers(markers), " by {join(obsfateusers(markers), ", ")}")}" |
|
18 | 19 | > obsfatedate = "{if(obsfatedate(markers), "{ifeq(min(obsfatedate(markers)), max(obsfatedate(markers)), " (at {min(obsfatedate(markers))|isodate})", " (between {min(obsfatedate(markers))|isodate} and {max(obsfatedate(markers))|isodate})")}")}" |
|
19 | > obsfate = "{obsfateverb}{obsfatesuccessors}{obsfateusers}{obsfatedate}; " | |
|
20 | > obsfate = "{obsfateverb}{obsfateoperations}{obsfatesuccessors}{obsfateusers}{obsfatedate}; " | |
|
20 | 21 | > [alias] |
|
21 | 22 | > tlog = log -G -T '{node|short}\ |
|
22 | 23 | > {if(predecessors, "\n Predecessors: {predecessors}")}\ |
@@ -90,21 +91,21 b' Predecessors template should show curren' | |||
|
90 | 91 | o d004c8f274b9 |
|
91 | 92 | | |
|
92 | 93 | | @ 471f378eab4c |
|
93 | |/ Obsfate: rewritten as 3:d004c8f274b9 by test1, test2 (between 2001-04-19 04:25 +0000 and 2009-02-13 23:31 +0000); | |
|
94 | |/ Obsfate: rewritten using amend as 3:d004c8f274b9 by test1, test2 (between 2001-04-19 04:25 +0000 and 2009-02-13 23:31 +0000); | |
|
94 | 95 | o ea207398892e |
|
95 | 96 | |
|
96 | 97 | $ hg fatelog |
|
97 | 98 | o d004c8f274b9 |
|
98 | 99 | | |
|
99 | 100 | | @ 471f378eab4c |
|
100 | |/ Obsfate: rewritten as 3:d004c8f274b9 by test1, test2 (between 2001-04-19 04:25 +0000 and 2009-02-13 23:31 +0000); | |
|
101 | |/ Obsfate: rewritten using amend as 3:d004c8f274b9 by test1, test2 (between 2001-04-19 04:25 +0000 and 2009-02-13 23:31 +0000); | |
|
101 | 102 | o ea207398892e |
|
102 | 103 | |
|
103 | 104 | $ hg fatelog -v |
|
104 | 105 | o d004c8f274b9 |
|
105 | 106 | | |
|
106 | 107 | | @ 471f378eab4c |
|
107 | |/ Obsfate: rewritten as 3:d004c8f274b9 by test1, test2 (between 2001-04-19 04:25 +0000 and 2009-02-13 23:31 +0000); | |
|
108 | |/ Obsfate: rewritten using amend as 3:d004c8f274b9 by test1, test2 (between 2001-04-19 04:25 +0000 and 2009-02-13 23:31 +0000); | |
|
108 | 109 | o ea207398892e |
|
109 | 110 | |
|
110 | 111 | $ hg up 'desc(A1)' --hidden |
@@ -127,7 +128,7 b' Predecessors template should show curren' | |||
|
127 | 128 | o d004c8f274b9 |
|
128 | 129 | | |
|
129 | 130 | | @ a468dc9b3633 |
|
130 | |/ Obsfate: rewritten as 3:d004c8f274b9 by test2 (at 2001-04-19 04:25 +0000); | |
|
131 | |/ Obsfate: rewritten using amend as 3:d004c8f274b9 by test2 (at 2001-04-19 04:25 +0000); | |
|
131 | 132 | o ea207398892e |
|
132 | 133 | |
|
133 | 134 | Predecessors template should show all the predecessors as we force their display |
@@ -156,9 +157,9 b' with --hidden' | |||
|
156 | 157 | o d004c8f274b9 |
|
157 | 158 | | |
|
158 | 159 | | @ a468dc9b3633 |
|
159 | |/ Obsfate: rewritten as 3:d004c8f274b9 by test2 (at 2001-04-19 04:25 +0000); | |
|
160 | |/ Obsfate: rewritten using amend as 3:d004c8f274b9 by test2 (at 2001-04-19 04:25 +0000); | |
|
160 | 161 | | x 471f378eab4c |
|
161 | |/ Obsfate: rewritten as 2:a468dc9b3633 by test1 (at 2009-02-13 23:31 +0000); | |
|
162 | |/ Obsfate: rewritten using amend as 2:a468dc9b3633 by test1 (at 2009-02-13 23:31 +0000); | |
|
162 | 163 | o ea207398892e |
|
163 | 164 | |
|
164 | 165 | |
@@ -201,9 +202,9 b' visible.' | |||
|
201 | 202 | @ d004c8f274b9 |
|
202 | 203 | | |
|
203 | 204 | | x a468dc9b3633 |
|
204 | |/ Obsfate: rewritten as 3:d004c8f274b9 by test2 (at 2001-04-19 04:25 +0000); | |
|
205 | |/ Obsfate: rewritten using amend as 3:d004c8f274b9 by test2 (at 2001-04-19 04:25 +0000); | |
|
205 | 206 | | x 471f378eab4c |
|
206 | |/ Obsfate: rewritten as 2:a468dc9b3633 by test1 (at 2009-02-13 23:31 +0000); | |
|
207 | |/ Obsfate: rewritten using amend as 2:a468dc9b3633 by test1 (at 2009-02-13 23:31 +0000); | |
|
207 | 208 | o ea207398892e |
|
208 | 209 | |
|
209 | 210 | $ hg fatelogjson --hidden |
@@ -653,7 +654,7 b' Predecessors template should show curren' | |||
|
653 | 654 | | o fdf9bde5129a |
|
654 | 655 | |/ |
|
655 | 656 | | @ 471f378eab4c |
|
656 | |/ Obsfate: rewritten as 2:fdf9bde5129a by test (at 1970-01-01 00:00 +0000); rewritten as 4:019fadeab383 by test (at 1970-01-01 00:00 +0000); | |
|
657 | |/ Obsfate: rewritten using amend as 2:fdf9bde5129a by test (at 1970-01-01 00:00 +0000); rewritten using amend as 4:019fadeab383 by test (at 1970-01-01 00:00 +0000); | |
|
657 | 658 | o ea207398892e |
|
658 | 659 | |
|
659 | 660 | $ hg up 'desc(A1)' |
@@ -709,11 +710,11 b' Predecessors template should the predece' | |||
|
709 | 710 | o 019fadeab383 |
|
710 | 711 | | |
|
711 | 712 | | x 65b757b745b9 |
|
712 | |/ Obsfate: rewritten as 4:019fadeab383 by test (at 1970-01-01 00:00 +0000); | |
|
713 | |/ Obsfate: rewritten using amend as 4:019fadeab383 by test (at 1970-01-01 00:00 +0000); | |
|
713 | 714 | | @ fdf9bde5129a |
|
714 | 715 | |/ |
|
715 | 716 | | x 471f378eab4c |
|
716 | |/ Obsfate: rewritten as 2:fdf9bde5129a by test (at 1970-01-01 00:00 +0000); rewritten as 3:65b757b745b9 by test (at 1970-01-01 00:00 +0000); | |
|
717 | |/ Obsfate: rewritten using amend as 2:fdf9bde5129a by test (at 1970-01-01 00:00 +0000); rewritten using amend as 3:65b757b745b9 by test (at 1970-01-01 00:00 +0000); | |
|
717 | 718 | o ea207398892e |
|
718 | 719 | |
|
719 | 720 | |
@@ -859,7 +860,7 b' Predecessors template should both predec' | |||
|
859 | 860 | o eb5a0daa2192 |
|
860 | 861 | | |
|
861 | 862 | | @ 0dec01379d3b |
|
862 | | | Obsfate: rewritten as 4:eb5a0daa2192 by test (at 1970-01-01 00:00 +0000); | |
|
863 | | | Obsfate: rewritten using amend as 4:eb5a0daa2192 by test (at 1970-01-01 00:00 +0000); | |
|
863 | 864 | | x 471f378eab4c |
|
864 | 865 | |/ Obsfate: rewritten as 4:eb5a0daa2192 by test (at 1970-01-01 00:00 +0000); |
|
865 | 866 | o ea207398892e |
@@ -942,7 +943,7 b' with --hidden' | |||
|
942 | 943 | | x b7ea6d14e664 |
|
943 | 944 | | | Obsfate: rewritten as 4:eb5a0daa2192 by test (at 1970-01-01 00:00 +0000); |
|
944 | 945 | | | x 0dec01379d3b |
|
945 | | |/ Obsfate: rewritten as 3:b7ea6d14e664 by test (at 1970-01-01 00:00 +0000); | |
|
946 | | |/ Obsfate: rewritten using amend as 3:b7ea6d14e664 by test (at 1970-01-01 00:00 +0000); | |
|
946 | 947 | | x 471f378eab4c |
|
947 | 948 | |/ Obsfate: rewritten as 4:eb5a0daa2192 by test (at 1970-01-01 00:00 +0000); |
|
948 | 949 | o ea207398892e |
@@ -1068,7 +1069,7 b' Predecessors template should show curren' | |||
|
1068 | 1069 | o 7a230b46bf61 |
|
1069 | 1070 | | |
|
1070 | 1071 | | @ 471f378eab4c |
|
1071 | |/ Obsfate: rewritten as 2:7a230b46bf61 by test (at 1970-01-01 00:00 +0000); | |
|
1072 | |/ Obsfate: rewritten using amend as 2:7a230b46bf61 by test (at 1970-01-01 00:00 +0000); | |
|
1072 | 1073 | o ea207398892e |
|
1073 | 1074 | |
|
1074 | 1075 | $ hg up 'desc(A2)' |
@@ -1105,7 +1106,7 b' with --hidden' | |||
|
1105 | 1106 | @ 7a230b46bf61 |
|
1106 | 1107 | | |
|
1107 | 1108 | | x 471f378eab4c |
|
1108 | |/ Obsfate: rewritten as 2:7a230b46bf61 by test (at 1970-01-01 00:00 +0000); | |
|
1109 | |/ Obsfate: rewritten using amend as 2:7a230b46bf61 by test (at 1970-01-01 00:00 +0000); | |
|
1109 | 1110 | o ea207398892e |
|
1110 | 1111 | |
|
1111 | 1112 | |
@@ -1438,7 +1439,7 b' Check templates' | |||
|
1438 | 1439 | | o ba2ed02b0c9a |
|
1439 | 1440 | | | |
|
1440 | 1441 | | x 4a004186e638 |
|
1441 | |/ Obsfate: rewritten as 8:b18bc8331526 by test (at 1970-01-01 00:00 +0000); rewritten as 9:0b997eb7ceee by test (at 1970-01-01 00:00 +0000); | |
|
1442 | |/ Obsfate: rewritten using amend as 8:b18bc8331526 by test (at 1970-01-01 00:00 +0000); rewritten using amend as 9:0b997eb7ceee by test (at 1970-01-01 00:00 +0000); | |
|
1442 | 1443 | o dd800401bd8c |
|
1443 | 1444 | | |
|
1444 | 1445 | o f897c6137566 |
@@ -1511,7 +1512,7 b' Check templates' | |||
|
1511 | 1512 | | o ba2ed02b0c9a |
|
1512 | 1513 | | | |
|
1513 | 1514 | | x 4a004186e638 |
|
1514 | |/ Obsfate: rewritten as 8:b18bc8331526 by test (at 1970-01-01 00:00 +0000); rewritten as 9:0b997eb7ceee by test (at 1970-01-01 00:00 +0000); | |
|
1515 | |/ Obsfate: rewritten using amend as 8:b18bc8331526 by test (at 1970-01-01 00:00 +0000); rewritten using amend as 9:0b997eb7ceee by test (at 1970-01-01 00:00 +0000); | |
|
1515 | 1516 | o dd800401bd8c |
|
1516 | 1517 | | |
|
1517 | 1518 | | x 9bd10a0775e4 |
@@ -1590,7 +1591,7 b' Check templates' | |||
|
1590 | 1591 | o dd800401bd8c |
|
1591 | 1592 | | |
|
1592 | 1593 | | @ 9bd10a0775e4 |
|
1593 | |/ Obsfate: split as 5:dd800401bd8c, 9:0b997eb7ceee, 10:eceed8f98ffc by test (at 1970-01-01 00:00 +0000); split as 5:dd800401bd8c, 8:b18bc8331526, 10:eceed8f98ffc by test (at 1970-01-01 00:00 +0000); | |
|
1594 | |/ Obsfate: split using amend, rebase as 5:dd800401bd8c, 9:0b997eb7ceee, 10:eceed8f98ffc by test (at 1970-01-01 00:00 +0000); split using amend, rebase as 5:dd800401bd8c, 8:b18bc8331526, 10:eceed8f98ffc by test (at 1970-01-01 00:00 +0000); | |
|
1594 | 1595 | o f897c6137566 |
|
1595 | 1596 | | |
|
1596 | 1597 | o ea207398892e |
@@ -1670,7 +1671,7 b' Check output' | |||
|
1670 | 1671 | | x fdf9bde5129a |
|
1671 | 1672 | |/ Obsfate: pruned by test (at 1970-01-01 00:00 +0000); |
|
1672 | 1673 | | @ 471f378eab4c |
|
1673 | |/ Obsfate: rewritten as 2:fdf9bde5129a by test (at 1970-01-01 00:00 +0000); rewritten as 3:65b757b745b9 by test (at 1970-01-01 00:00 +0000); | |
|
1674 | |/ Obsfate: rewritten using amend as 2:fdf9bde5129a by test (at 1970-01-01 00:00 +0000); rewritten using amend as 3:65b757b745b9 by test (at 1970-01-01 00:00 +0000); | |
|
1674 | 1675 | o ea207398892e |
|
1675 | 1676 | |
|
1676 | 1677 |
General Comments 0
You need to be logged in to leave comments.
Login now