##// END OF EJS Templates
templates: add support for filelog webcommand in json style...
Laura Médioni -
r29380:c1b526f5 default
parent child Browse files
Show More
@@ -9,10 +9,13 changelistentry = '\{
9 "node": {node|json},
9 "node": {node|json},
10 "date": {date|json},
10 "date": {date|json},
11 "desc": {desc|utf8|json},
11 "desc": {desc|utf8|json},
12 "branch": {if(branch, branch%changesetbranch, "default"|json)},
12 "bookmarks": [{join(bookmarks%changelistentryname, ", ")}],
13 "bookmarks": [{join(bookmarks%changelistentryname, ", ")}],
13 "tags": [{join(tags%changelistentryname, ", ")}],
14 "tags": [{join(tags%changelistentryname, ", ")}],
14 "user": {author|utf8|json},
15 "user": {author|utf8|json},
15 "parents": [{join(allparents%changesetparent, ", ")}]
16 "phase": {phase|json},
17 "parents": [{if(allparents, join(allparents%changesetparent, ", "),
18 join(parent%changesetparent, ", "))}]
16 }'
19 }'
17 changelistentryname = '{name|utf8|json}'
20 changelistentryname = '{name|utf8|json}'
18 changeset = '\{
21 changeset = '\{
@@ -156,7 +159,9 fileannotation = '\{
156 "lineno": {lineno|json},
159 "lineno": {lineno|json},
157 "revdate": {revdate|json}
160 "revdate": {revdate|json}
158 }'
161 }'
159 filelog = '"not yet implemented"'
162 filelog = '\{
163 "entries": [{join(entries%changelistentry, ", ")}]
164 }'
160 graph = '"not yet implemented"'
165 graph = '"not yet implemented"'
161 helptopics = '\{
166 helptopics = '\{
162 "topics": [{join(topics%helptopicentry, ", ")}],
167 "topics": [{join(topics%helptopicentry, ", ")}],
@@ -169,6 +169,7 changelog/ shows information about sever
169 "changesets": [
169 "changesets": [
170 {
170 {
171 "bookmarks": [],
171 "bookmarks": [],
172 "branch": "default",
172 "date": [
173 "date": [
173 0.0,
174 0.0,
174 0
175 0
@@ -179,6 +180,7 changelog/ shows information about sever
179 "ceed296fe500c3fac9541e31dad860cb49c89e45",
180 "ceed296fe500c3fac9541e31dad860cb49c89e45",
180 "ed66c30e87eb65337c05a4229efaa5f1d5285a90"
181 "ed66c30e87eb65337c05a4229efaa5f1d5285a90"
181 ],
182 ],
183 "phase": "draft",
182 "tags": [
184 "tags": [
183 "tip"
185 "tip"
184 ],
186 ],
@@ -186,6 +188,7 changelog/ shows information about sever
186 },
188 },
187 {
189 {
188 "bookmarks": [],
190 "bookmarks": [],
191 "branch": "test-branch",
189 "date": [
192 "date": [
190 0.0,
193 0.0,
191 0
194 0
@@ -195,11 +198,13 changelog/ shows information about sever
195 "parents": [
198 "parents": [
196 "6ab967a8ab3489227a83f80e920faa039a71819f"
199 "6ab967a8ab3489227a83f80e920faa039a71819f"
197 ],
200 ],
201 "phase": "draft",
198 "tags": [],
202 "tags": [],
199 "user": "test"
203 "user": "test"
200 },
204 },
201 {
205 {
202 "bookmarks": [],
206 "bookmarks": [],
207 "branch": "test-branch",
203 "date": [
208 "date": [
204 0.0,
209 0.0,
205 0
210 0
@@ -209,6 +214,7 changelog/ shows information about sever
209 "parents": [
214 "parents": [
210 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
215 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
211 ],
216 ],
217 "phase": "draft",
212 "tags": [],
218 "tags": [],
213 "user": "test"
219 "user": "test"
214 },
220 },
@@ -216,6 +222,7 changelog/ shows information about sever
216 "bookmarks": [
222 "bookmarks": [
217 "bookmark2"
223 "bookmark2"
218 ],
224 ],
225 "branch": "default",
219 "date": [
226 "date": [
220 0.0,
227 0.0,
221 0
228 0
@@ -225,11 +232,13 changelog/ shows information about sever
225 "parents": [
232 "parents": [
226 "f2890a05fea49bfaf9fb27ed5490894eba32da78"
233 "f2890a05fea49bfaf9fb27ed5490894eba32da78"
227 ],
234 ],
235 "phase": "draft",
228 "tags": [],
236 "tags": [],
229 "user": "test"
237 "user": "test"
230 },
238 },
231 {
239 {
232 "bookmarks": [],
240 "bookmarks": [],
241 "branch": "default",
233 "date": [
242 "date": [
234 0.0,
243 0.0,
235 0
244 0
@@ -239,6 +248,7 changelog/ shows information about sever
239 "parents": [
248 "parents": [
240 "93a8ce14f89156426b7fa981af8042da53f03aa0"
249 "93a8ce14f89156426b7fa981af8042da53f03aa0"
241 ],
250 ],
251 "phase": "draft",
242 "tags": [
252 "tags": [
243 "tag2"
253 "tag2"
244 ],
254 ],
@@ -246,6 +256,7 changelog/ shows information about sever
246 },
256 },
247 {
257 {
248 "bookmarks": [],
258 "bookmarks": [],
259 "branch": "default",
249 "date": [
260 "date": [
250 0.0,
261 0.0,
251 0
262 0
@@ -255,11 +266,13 changelog/ shows information about sever
255 "parents": [
266 "parents": [
256 "78896eb0e102174ce9278438a95e12543e4367a7"
267 "78896eb0e102174ce9278438a95e12543e4367a7"
257 ],
268 ],
269 "phase": "public",
258 "tags": [],
270 "tags": [],
259 "user": "test"
271 "user": "test"
260 },
272 },
261 {
273 {
262 "bookmarks": [],
274 "bookmarks": [],
275 "branch": "default",
263 "date": [
276 "date": [
264 0.0,
277 0.0,
265 0
278 0
@@ -269,6 +282,7 changelog/ shows information about sever
269 "parents": [
282 "parents": [
270 "8d7c456572acf3557e8ed8a07286b10c408bcec5"
283 "8d7c456572acf3557e8ed8a07286b10c408bcec5"
271 ],
284 ],
285 "phase": "public",
272 "tags": [
286 "tags": [
273 "tag1"
287 "tag1"
274 ],
288 ],
@@ -278,6 +292,7 changelog/ shows information about sever
278 "bookmarks": [
292 "bookmarks": [
279 "bookmark1"
293 "bookmark1"
280 ],
294 ],
295 "branch": "default",
281 "date": [
296 "date": [
282 0.0,
297 0.0,
283 0
298 0
@@ -287,11 +302,13 changelog/ shows information about sever
287 "parents": [
302 "parents": [
288 "f8bbb9024b10f93cdbb8d940337398291d40dea8"
303 "f8bbb9024b10f93cdbb8d940337398291d40dea8"
289 ],
304 ],
305 "phase": "public",
290 "tags": [],
306 "tags": [],
291 "user": "test"
307 "user": "test"
292 },
308 },
293 {
309 {
294 "bookmarks": [],
310 "bookmarks": [],
311 "branch": "default",
295 "date": [
312 "date": [
296 0.0,
313 0.0,
297 0
314 0
@@ -301,11 +318,13 changelog/ shows information about sever
301 "parents": [
318 "parents": [
302 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
319 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
303 ],
320 ],
321 "phase": "public",
304 "tags": [],
322 "tags": [],
305 "user": "test"
323 "user": "test"
306 },
324 },
307 {
325 {
308 "bookmarks": [],
326 "bookmarks": [],
327 "branch": "default",
309 "date": [
328 "date": [
310 0.0,
329 0.0,
311 0
330 0
@@ -313,6 +332,7 changelog/ shows information about sever
313 "desc": "initial",
332 "desc": "initial",
314 "node": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
333 "node": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
315 "parents": [],
334 "parents": [],
335 "phase": "public",
316 "tags": [],
336 "tags": [],
317 "user": "test"
337 "user": "test"
318 }
338 }
@@ -330,6 +350,7 changelog/{revision} shows information s
330 "changesets": [
350 "changesets": [
331 {
351 {
332 "bookmarks": [],
352 "bookmarks": [],
353 "branch": "default",
333 "date": [
354 "date": [
334 0.0,
355 0.0,
335 0
356 0
@@ -339,11 +360,13 changelog/{revision} shows information s
339 "parents": [
360 "parents": [
340 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
361 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
341 ],
362 ],
363 "phase": "public",
342 "tags": [],
364 "tags": [],
343 "user": "test"
365 "user": "test"
344 },
366 },
345 {
367 {
346 "bookmarks": [],
368 "bookmarks": [],
369 "branch": "default",
347 "date": [
370 "date": [
348 0.0,
371 0.0,
349 0
372 0
@@ -351,6 +374,7 changelog/{revision} shows information s
351 "desc": "initial",
374 "desc": "initial",
352 "node": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
375 "node": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
353 "parents": [],
376 "parents": [],
377 "phase": "public",
354 "tags": [],
378 "tags": [],
355 "user": "test"
379 "user": "test"
356 }
380 }
@@ -368,6 +392,7 shortlog/ shows information about a set
368 "changesets": [
392 "changesets": [
369 {
393 {
370 "bookmarks": [],
394 "bookmarks": [],
395 "branch": "default",
371 "date": [
396 "date": [
372 0.0,
397 0.0,
373 0
398 0
@@ -378,6 +403,7 shortlog/ shows information about a set
378 "ceed296fe500c3fac9541e31dad860cb49c89e45",
403 "ceed296fe500c3fac9541e31dad860cb49c89e45",
379 "ed66c30e87eb65337c05a4229efaa5f1d5285a90"
404 "ed66c30e87eb65337c05a4229efaa5f1d5285a90"
380 ],
405 ],
406 "phase": "draft",
381 "tags": [
407 "tags": [
382 "tip"
408 "tip"
383 ],
409 ],
@@ -385,6 +411,7 shortlog/ shows information about a set
385 },
411 },
386 {
412 {
387 "bookmarks": [],
413 "bookmarks": [],
414 "branch": "test-branch",
388 "date": [
415 "date": [
389 0.0,
416 0.0,
390 0
417 0
@@ -394,11 +421,13 shortlog/ shows information about a set
394 "parents": [
421 "parents": [
395 "6ab967a8ab3489227a83f80e920faa039a71819f"
422 "6ab967a8ab3489227a83f80e920faa039a71819f"
396 ],
423 ],
424 "phase": "draft",
397 "tags": [],
425 "tags": [],
398 "user": "test"
426 "user": "test"
399 },
427 },
400 {
428 {
401 "bookmarks": [],
429 "bookmarks": [],
430 "branch": "test-branch",
402 "date": [
431 "date": [
403 0.0,
432 0.0,
404 0
433 0
@@ -408,6 +437,7 shortlog/ shows information about a set
408 "parents": [
437 "parents": [
409 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
438 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
410 ],
439 ],
440 "phase": "draft",
411 "tags": [],
441 "tags": [],
412 "user": "test"
442 "user": "test"
413 },
443 },
@@ -415,6 +445,7 shortlog/ shows information about a set
415 "bookmarks": [
445 "bookmarks": [
416 "bookmark2"
446 "bookmark2"
417 ],
447 ],
448 "branch": "default",
418 "date": [
449 "date": [
419 0.0,
450 0.0,
420 0
451 0
@@ -424,11 +455,13 shortlog/ shows information about a set
424 "parents": [
455 "parents": [
425 "f2890a05fea49bfaf9fb27ed5490894eba32da78"
456 "f2890a05fea49bfaf9fb27ed5490894eba32da78"
426 ],
457 ],
458 "phase": "draft",
427 "tags": [],
459 "tags": [],
428 "user": "test"
460 "user": "test"
429 },
461 },
430 {
462 {
431 "bookmarks": [],
463 "bookmarks": [],
464 "branch": "default",
432 "date": [
465 "date": [
433 0.0,
466 0.0,
434 0
467 0
@@ -438,6 +471,7 shortlog/ shows information about a set
438 "parents": [
471 "parents": [
439 "93a8ce14f89156426b7fa981af8042da53f03aa0"
472 "93a8ce14f89156426b7fa981af8042da53f03aa0"
440 ],
473 ],
474 "phase": "draft",
441 "tags": [
475 "tags": [
442 "tag2"
476 "tag2"
443 ],
477 ],
@@ -445,6 +479,7 shortlog/ shows information about a set
445 },
479 },
446 {
480 {
447 "bookmarks": [],
481 "bookmarks": [],
482 "branch": "default",
448 "date": [
483 "date": [
449 0.0,
484 0.0,
450 0
485 0
@@ -454,11 +489,13 shortlog/ shows information about a set
454 "parents": [
489 "parents": [
455 "78896eb0e102174ce9278438a95e12543e4367a7"
490 "78896eb0e102174ce9278438a95e12543e4367a7"
456 ],
491 ],
492 "phase": "public",
457 "tags": [],
493 "tags": [],
458 "user": "test"
494 "user": "test"
459 },
495 },
460 {
496 {
461 "bookmarks": [],
497 "bookmarks": [],
498 "branch": "default",
462 "date": [
499 "date": [
463 0.0,
500 0.0,
464 0
501 0
@@ -468,6 +505,7 shortlog/ shows information about a set
468 "parents": [
505 "parents": [
469 "8d7c456572acf3557e8ed8a07286b10c408bcec5"
506 "8d7c456572acf3557e8ed8a07286b10c408bcec5"
470 ],
507 ],
508 "phase": "public",
471 "tags": [
509 "tags": [
472 "tag1"
510 "tag1"
473 ],
511 ],
@@ -477,6 +515,7 shortlog/ shows information about a set
477 "bookmarks": [
515 "bookmarks": [
478 "bookmark1"
516 "bookmark1"
479 ],
517 ],
518 "branch": "default",
480 "date": [
519 "date": [
481 0.0,
520 0.0,
482 0
521 0
@@ -486,11 +525,13 shortlog/ shows information about a set
486 "parents": [
525 "parents": [
487 "f8bbb9024b10f93cdbb8d940337398291d40dea8"
526 "f8bbb9024b10f93cdbb8d940337398291d40dea8"
488 ],
527 ],
528 "phase": "public",
489 "tags": [],
529 "tags": [],
490 "user": "test"
530 "user": "test"
491 },
531 },
492 {
532 {
493 "bookmarks": [],
533 "bookmarks": [],
534 "branch": "default",
494 "date": [
535 "date": [
495 0.0,
536 0.0,
496 0
537 0
@@ -500,11 +541,13 shortlog/ shows information about a set
500 "parents": [
541 "parents": [
501 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
542 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
502 ],
543 ],
544 "phase": "public",
503 "tags": [],
545 "tags": [],
504 "user": "test"
546 "user": "test"
505 },
547 },
506 {
548 {
507 "bookmarks": [],
549 "bookmarks": [],
550 "branch": "default",
508 "date": [
551 "date": [
509 0.0,
552 0.0,
510 0
553 0
@@ -512,6 +555,7 shortlog/ shows information about a set
512 "desc": "initial",
555 "desc": "initial",
513 "node": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
556 "node": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
514 "parents": [],
557 "parents": [],
558 "phase": "public",
515 "tags": [],
559 "tags": [],
516 "user": "test"
560 "user": "test"
517 }
561 }
@@ -862,7 +906,98 filelog/{revision}/{path} shows history
862 $ request json-filelog/f8bbb9024b10/foo
906 $ request json-filelog/f8bbb9024b10/foo
863 200 Script output follows
907 200 Script output follows
864
908
865 "not yet implemented"
909 {
910 "entries": [
911 {
912 "bookmarks": [],
913 "branch": "default",
914 "date": [
915 0.0,
916 0
917 ],
918 "desc": "modify foo",
919 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
920 "parents": [
921 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
922 ],
923 "phase": "public",
924 "tags": [],
925 "user": "test"
926 },
927 {
928 "bookmarks": [],
929 "branch": "default",
930 "date": [
931 0.0,
932 0
933 ],
934 "desc": "initial",
935 "node": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
936 "parents": [],
937 "phase": "public",
938 "tags": [],
939 "user": "test"
940 }
941 ]
942 }
943
944 $ request json-filelog/cc725e08502a/da/foo
945 200 Script output follows
946
947 {
948 "entries": [
949 {
950 "bookmarks": [],
951 "branch": "default",
952 "date": [
953 0.0,
954 0
955 ],
956 "desc": "another commit to da/foo",
957 "node": "f2890a05fea49bfaf9fb27ed5490894eba32da78",
958 "parents": [
959 "8d7c456572acf3557e8ed8a07286b10c408bcec5"
960 ],
961 "phase": "draft",
962 "tags": [
963 "tag2"
964 ],
965 "user": "test"
966 },
967 {
968 "bookmarks": [
969 "bookmark1"
970 ],
971 "branch": "default",
972 "date": [
973 0.0,
974 0
975 ],
976 "desc": "modify da/foo",
977 "node": "8d7c456572acf3557e8ed8a07286b10c408bcec5",
978 "parents": [
979 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
980 ],
981 "phase": "public",
982 "tags": [],
983 "user": "test"
984 },
985 {
986 "bookmarks": [],
987 "branch": "default",
988 "date": [
989 0.0,
990 0
991 ],
992 "desc": "initial",
993 "node": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
994 "parents": [],
995 "phase": "public",
996 "tags": [],
997 "user": "test"
998 }
999 ]
1000 }
866
1001
867 (archive/ doesn't use templating, so ignore it)
1002 (archive/ doesn't use templating, so ignore it)
868
1003
General Comments 0
You need to be logged in to leave comments. Login now