##// END OF EJS Templates
templatekw: add p1rev, p1node, p2rev, p2node keywords...
epriestley -
r17357:bd605568 default
parent child Browse files
Show More
@@ -275,6 +275,28 b' def shownode(repo, ctx, templ, **args):'
275 """
275 """
276 return ctx.hex()
276 return ctx.hex()
277
277
278 def showp1rev(repo, ctx, templ, **args):
279 """:p1rev: Integer. The repository-local revision number of the changeset's
280 first parent, or -1 if the changeset has no parents."""
281 return ctx.p1().rev()
282
283 def showp2rev(repo, ctx, templ, **args):
284 """:p2rev: Integer. The repository-local revision number of the changeset's
285 second parent, or -1 if the changeset has no second parent."""
286 return ctx.p2().rev()
287
288 def showp1node(repo, ctx, templ, **args):
289 """:p1node: String. The identification hash of the changeset's first parent,
290 as a 40 digit hexadecimal string. If the changeset has no parents, all
291 digits are 0."""
292 return ctx.p1().hex()
293
294 def showp2node(repo, ctx, templ, **args):
295 """:p2node: String. The identification hash of the changeset's second
296 parent, as a 40 digit hexadecimal string. If the changeset has no second
297 parent, all digits are 0."""
298 return ctx.p2().hex()
299
278 def showphase(repo, ctx, templ, **args):
300 def showphase(repo, ctx, templ, **args):
279 """:phase: String. The changeset phase name."""
301 """:phase: String. The changeset phase name."""
280 return ctx.phasestr()
302 return ctx.phasestr()
@@ -320,6 +342,10 b' keywords = {'
320 'latesttagdistance': showlatesttagdistance,
342 'latesttagdistance': showlatesttagdistance,
321 'manifest': showmanifest,
343 'manifest': showmanifest,
322 'node': shownode,
344 'node': shownode,
345 'p1rev': showp1rev,
346 'p1node': showp1node,
347 'p2rev': showp2rev,
348 'p2node': showp2node,
323 'phase': showphase,
349 'phase': showphase,
324 'phaseidx': showphaseidx,
350 'phaseidx': showphaseidx,
325 'rev': showrev,
351 'rev': showrev,
@@ -592,7 +592,8 b' Keys work:'
592
592
593 $ for key in author branch branches date desc file_adds file_dels file_mods \
593 $ for key in author branch branches date desc file_adds file_dels file_mods \
594 > file_copies file_copies_switch files \
594 > file_copies file_copies_switch files \
595 > manifest node parents rev tags diffstat extras; do
595 > manifest node parents rev tags diffstat extras \
596 > p1rev p2rev p1node p2node; do
596 > for mode in '' --verbose --debug; do
597 > for mode in '' --verbose --debug; do
597 > hg log $mode --template "$key$mode: {$key}\n"
598 > hg log $mode --template "$key$mode: {$key}\n"
598 > done
599 > done
@@ -1095,7 +1096,114 b' Keys work:'
1095 extras--debug: branch=default
1096 extras--debug: branch=default
1096 extras--debug: branch=default
1097 extras--debug: branch=default
1097 extras--debug: branch=default
1098 extras--debug: branch=default
1098
1099 p1rev: 7
1100 p1rev: -1
1101 p1rev: 5
1102 p1rev: 3
1103 p1rev: 3
1104 p1rev: 2
1105 p1rev: 1
1106 p1rev: 0
1107 p1rev: -1
1108 p1rev--verbose: 7
1109 p1rev--verbose: -1
1110 p1rev--verbose: 5
1111 p1rev--verbose: 3
1112 p1rev--verbose: 3
1113 p1rev--verbose: 2
1114 p1rev--verbose: 1
1115 p1rev--verbose: 0
1116 p1rev--verbose: -1
1117 p1rev--debug: 7
1118 p1rev--debug: -1
1119 p1rev--debug: 5
1120 p1rev--debug: 3
1121 p1rev--debug: 3
1122 p1rev--debug: 2
1123 p1rev--debug: 1
1124 p1rev--debug: 0
1125 p1rev--debug: -1
1126 p2rev: -1
1127 p2rev: -1
1128 p2rev: 4
1129 p2rev: -1
1130 p2rev: -1
1131 p2rev: -1
1132 p2rev: -1
1133 p2rev: -1
1134 p2rev: -1
1135 p2rev--verbose: -1
1136 p2rev--verbose: -1
1137 p2rev--verbose: 4
1138 p2rev--verbose: -1
1139 p2rev--verbose: -1
1140 p2rev--verbose: -1
1141 p2rev--verbose: -1
1142 p2rev--verbose: -1
1143 p2rev--verbose: -1
1144 p2rev--debug: -1
1145 p2rev--debug: -1
1146 p2rev--debug: 4
1147 p2rev--debug: -1
1148 p2rev--debug: -1
1149 p2rev--debug: -1
1150 p2rev--debug: -1
1151 p2rev--debug: -1
1152 p2rev--debug: -1
1153 p1node: 29114dbae42b9f078cf2714dbe3a86bba8ec7453
1154 p1node: 0000000000000000000000000000000000000000
1155 p1node: 13207e5a10d9fd28ec424934298e176197f2c67f
1156 p1node: 10e46f2dcbf4823578cf180f33ecf0b957964c47
1157 p1node: 10e46f2dcbf4823578cf180f33ecf0b957964c47
1158 p1node: 97054abb4ab824450e9164180baf491ae0078465
1159 p1node: b608e9d1a3f0273ccf70fb85fd6866b3482bf965
1160 p1node: 1e4e1b8f71e05681d422154f5421e385fec3454f
1161 p1node: 0000000000000000000000000000000000000000
1162 p1node--verbose: 29114dbae42b9f078cf2714dbe3a86bba8ec7453
1163 p1node--verbose: 0000000000000000000000000000000000000000
1164 p1node--verbose: 13207e5a10d9fd28ec424934298e176197f2c67f
1165 p1node--verbose: 10e46f2dcbf4823578cf180f33ecf0b957964c47
1166 p1node--verbose: 10e46f2dcbf4823578cf180f33ecf0b957964c47
1167 p1node--verbose: 97054abb4ab824450e9164180baf491ae0078465
1168 p1node--verbose: b608e9d1a3f0273ccf70fb85fd6866b3482bf965
1169 p1node--verbose: 1e4e1b8f71e05681d422154f5421e385fec3454f
1170 p1node--verbose: 0000000000000000000000000000000000000000
1171 p1node--debug: 29114dbae42b9f078cf2714dbe3a86bba8ec7453
1172 p1node--debug: 0000000000000000000000000000000000000000
1173 p1node--debug: 13207e5a10d9fd28ec424934298e176197f2c67f
1174 p1node--debug: 10e46f2dcbf4823578cf180f33ecf0b957964c47
1175 p1node--debug: 10e46f2dcbf4823578cf180f33ecf0b957964c47
1176 p1node--debug: 97054abb4ab824450e9164180baf491ae0078465
1177 p1node--debug: b608e9d1a3f0273ccf70fb85fd6866b3482bf965
1178 p1node--debug: 1e4e1b8f71e05681d422154f5421e385fec3454f
1179 p1node--debug: 0000000000000000000000000000000000000000
1180 p2node: 0000000000000000000000000000000000000000
1181 p2node: 0000000000000000000000000000000000000000
1182 p2node: bbe44766e73d5f11ed2177f1838de10c53ef3e74
1183 p2node: 0000000000000000000000000000000000000000
1184 p2node: 0000000000000000000000000000000000000000
1185 p2node: 0000000000000000000000000000000000000000
1186 p2node: 0000000000000000000000000000000000000000
1187 p2node: 0000000000000000000000000000000000000000
1188 p2node: 0000000000000000000000000000000000000000
1189 p2node--verbose: 0000000000000000000000000000000000000000
1190 p2node--verbose: 0000000000000000000000000000000000000000
1191 p2node--verbose: bbe44766e73d5f11ed2177f1838de10c53ef3e74
1192 p2node--verbose: 0000000000000000000000000000000000000000
1193 p2node--verbose: 0000000000000000000000000000000000000000
1194 p2node--verbose: 0000000000000000000000000000000000000000
1195 p2node--verbose: 0000000000000000000000000000000000000000
1196 p2node--verbose: 0000000000000000000000000000000000000000
1197 p2node--verbose: 0000000000000000000000000000000000000000
1198 p2node--debug: 0000000000000000000000000000000000000000
1199 p2node--debug: 0000000000000000000000000000000000000000
1200 p2node--debug: bbe44766e73d5f11ed2177f1838de10c53ef3e74
1201 p2node--debug: 0000000000000000000000000000000000000000
1202 p2node--debug: 0000000000000000000000000000000000000000
1203 p2node--debug: 0000000000000000000000000000000000000000
1204 p2node--debug: 0000000000000000000000000000000000000000
1205 p2node--debug: 0000000000000000000000000000000000000000
1206 p2node--debug: 0000000000000000000000000000000000000000
1099
1207
1100 Filters work:
1208 Filters work:
1101
1209
General Comments 0
You need to be logged in to leave comments. Login now