author | Anton Shestakov <av6@dwimlabs.net> |
Thu, 31 Mar 2016 18:09:09 +0800 | |
changeset 28709 | 94494031f659 |
parent 28268 | 3643b66d7f71 |
child 29380 | c1b526f55116 |
permissions | -rw-r--r-- |
24544
71e96b9fd3fd
templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1 |
mimetype = 'application/json' |
71e96b9fd3fd
templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
2 |
filerevision = '"not yet implemented"' |
71e96b9fd3fd
templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
3 |
search = '"not yet implemented"' |
24588
0bf54479a9eb
json: implement {shortlog} and {changelog} templates
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24564
diff
changeset
|
4 |
# changelog and shortlog are the same web API but with different |
0bf54479a9eb
json: implement {shortlog} and {changelog} templates
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24564
diff
changeset
|
5 |
# number of entries. |
0bf54479a9eb
json: implement {shortlog} and {changelog} templates
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24564
diff
changeset
|
6 |
changelog = changelist.tmpl |
0bf54479a9eb
json: implement {shortlog} and {changelog} templates
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24564
diff
changeset
|
7 |
shortlog = changelist.tmpl |
0bf54479a9eb
json: implement {shortlog} and {changelog} templates
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24564
diff
changeset
|
8 |
changelistentry = '\{ |
0bf54479a9eb
json: implement {shortlog} and {changelog} templates
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24564
diff
changeset
|
9 |
"node": {node|json}, |
0bf54479a9eb
json: implement {shortlog} and {changelog} templates
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24564
diff
changeset
|
10 |
"date": {date|json}, |
28212
d4419c01532b
templatefilters: make json filter be byte-transparent (BC) (issue4926)
Yuya Nishihara <yuya@tcha.org>
parents:
24715
diff
changeset
|
11 |
"desc": {desc|utf8|json}, |
24588
0bf54479a9eb
json: implement {shortlog} and {changelog} templates
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24564
diff
changeset
|
12 |
"bookmarks": [{join(bookmarks%changelistentryname, ", ")}], |
0bf54479a9eb
json: implement {shortlog} and {changelog} templates
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24564
diff
changeset
|
13 |
"tags": [{join(tags%changelistentryname, ", ")}], |
28709
94494031f659
hgweb: add parents to json-log (issue5074)
Anton Shestakov <av6@dwimlabs.net>
parents:
28268
diff
changeset
|
14 |
"user": {author|utf8|json}, |
94494031f659
hgweb: add parents to json-log (issue5074)
Anton Shestakov <av6@dwimlabs.net>
parents:
28268
diff
changeset
|
15 |
"parents": [{join(allparents%changesetparent, ", ")}] |
24588
0bf54479a9eb
json: implement {shortlog} and {changelog} templates
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24564
diff
changeset
|
16 |
}' |
28212
d4419c01532b
templatefilters: make json filter be byte-transparent (BC) (issue4926)
Yuya Nishihara <yuya@tcha.org>
parents:
24715
diff
changeset
|
17 |
changelistentryname = '{name|utf8|json}' |
24563
830280536946
json: implement {changeset} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24547
diff
changeset
|
18 |
changeset = '\{ |
830280536946
json: implement {changeset} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24547
diff
changeset
|
19 |
"node": {node|json}, |
830280536946
json: implement {changeset} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24547
diff
changeset
|
20 |
"date": {date|json}, |
28212
d4419c01532b
templatefilters: make json filter be byte-transparent (BC) (issue4926)
Yuya Nishihara <yuya@tcha.org>
parents:
24715
diff
changeset
|
21 |
"desc": {desc|utf8|json}, |
24563
830280536946
json: implement {changeset} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24547
diff
changeset
|
22 |
"branch": {if(branch, branch%changesetbranch, "default"|json)}, |
830280536946
json: implement {changeset} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24547
diff
changeset
|
23 |
"bookmarks": [{join(changesetbookmark, ", ")}], |
830280536946
json: implement {changeset} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24547
diff
changeset
|
24 |
"tags": [{join(changesettag, ", ")}], |
28212
d4419c01532b
templatefilters: make json filter be byte-transparent (BC) (issue4926)
Yuya Nishihara <yuya@tcha.org>
parents:
24715
diff
changeset
|
25 |
"user": {author|utf8|json}, |
24564
5ec4bda3097a
hgweb: add phase to {changeset} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24563
diff
changeset
|
26 |
"parents": [{join(parent%changesetparent, ", ")}], |
5ec4bda3097a
hgweb: add phase to {changeset} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24563
diff
changeset
|
27 |
"phase": {phase|json} |
24563
830280536946
json: implement {changeset} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24547
diff
changeset
|
28 |
}' |
28212
d4419c01532b
templatefilters: make json filter be byte-transparent (BC) (issue4926)
Yuya Nishihara <yuya@tcha.org>
parents:
24715
diff
changeset
|
29 |
changesetbranch = '{name|utf8|json}' |
d4419c01532b
templatefilters: make json filter be byte-transparent (BC) (issue4926)
Yuya Nishihara <yuya@tcha.org>
parents:
24715
diff
changeset
|
30 |
changesetbookmark = '{bookmark|utf8|json}' |
d4419c01532b
templatefilters: make json filter be byte-transparent (BC) (issue4926)
Yuya Nishihara <yuya@tcha.org>
parents:
24715
diff
changeset
|
31 |
changesettag = '{tag|utf8|json}' |
24563
830280536946
json: implement {changeset} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24547
diff
changeset
|
32 |
changesetparent = '{node|json}' |
24589
30a737ae9b7d
json: implement {manifest} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24588
diff
changeset
|
33 |
manifest = '\{ |
30a737ae9b7d
json: implement {manifest} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24588
diff
changeset
|
34 |
"node": {node|json}, |
30a737ae9b7d
json: implement {manifest} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24588
diff
changeset
|
35 |
"abspath": {path|json}, |
30a737ae9b7d
json: implement {manifest} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24588
diff
changeset
|
36 |
"directories": [{join(dentries%direntry, ", ")}], |
30a737ae9b7d
json: implement {manifest} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24588
diff
changeset
|
37 |
"files": [{join(fentries%fileentry, ", ")}], |
30a737ae9b7d
json: implement {manifest} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24588
diff
changeset
|
38 |
"bookmarks": [{join(bookmarks%name, ", ")}], |
30a737ae9b7d
json: implement {manifest} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24588
diff
changeset
|
39 |
"tags": [{join(tags%name, ", ")}] |
30a737ae9b7d
json: implement {manifest} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24588
diff
changeset
|
40 |
}' |
28212
d4419c01532b
templatefilters: make json filter be byte-transparent (BC) (issue4926)
Yuya Nishihara <yuya@tcha.org>
parents:
24715
diff
changeset
|
41 |
name = '{name|utf8|json}' |
24589
30a737ae9b7d
json: implement {manifest} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24588
diff
changeset
|
42 |
direntry = '\{ |
30a737ae9b7d
json: implement {manifest} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24588
diff
changeset
|
43 |
"abspath": {path|json}, |
30a737ae9b7d
json: implement {manifest} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24588
diff
changeset
|
44 |
"basename": {basename|json}, |
30a737ae9b7d
json: implement {manifest} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24588
diff
changeset
|
45 |
"emptydirs": {emptydirs|json} |
30a737ae9b7d
json: implement {manifest} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24588
diff
changeset
|
46 |
}' |
30a737ae9b7d
json: implement {manifest} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24588
diff
changeset
|
47 |
fileentry = '\{ |
30a737ae9b7d
json: implement {manifest} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24588
diff
changeset
|
48 |
"abspath": {file|json}, |
30a737ae9b7d
json: implement {manifest} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24588
diff
changeset
|
49 |
"basename": {basename|json}, |
30a737ae9b7d
json: implement {manifest} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24588
diff
changeset
|
50 |
"date": {date|json}, |
30a737ae9b7d
json: implement {manifest} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24588
diff
changeset
|
51 |
"size": {size|json}, |
30a737ae9b7d
json: implement {manifest} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24588
diff
changeset
|
52 |
"flags": {permissions|json} |
30a737ae9b7d
json: implement {manifest} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24588
diff
changeset
|
53 |
}' |
24545
9e0c67e84896
json: implement {tags} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24544
diff
changeset
|
54 |
tags = '\{ |
9e0c67e84896
json: implement {tags} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24544
diff
changeset
|
55 |
"node": {node|json}, |
9e0c67e84896
json: implement {tags} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24544
diff
changeset
|
56 |
"tags": [{join(entriesnotip%tagentry, ", ")}] |
9e0c67e84896
json: implement {tags} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24544
diff
changeset
|
57 |
}' |
9e0c67e84896
json: implement {tags} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24544
diff
changeset
|
58 |
tagentry = '\{ |
28212
d4419c01532b
templatefilters: make json filter be byte-transparent (BC) (issue4926)
Yuya Nishihara <yuya@tcha.org>
parents:
24715
diff
changeset
|
59 |
"tag": {tag|utf8|json}, |
24545
9e0c67e84896
json: implement {tags} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24544
diff
changeset
|
60 |
"node": {node|json}, |
9e0c67e84896
json: implement {tags} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24544
diff
changeset
|
61 |
"date": {date|json} |
9e0c67e84896
json: implement {tags} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24544
diff
changeset
|
62 |
}' |
24546
adfd808c123f
json: implement {bookmarks} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24545
diff
changeset
|
63 |
bookmarks = '\{ |
adfd808c123f
json: implement {bookmarks} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24545
diff
changeset
|
64 |
"node": {node|json}, |
adfd808c123f
json: implement {bookmarks} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24545
diff
changeset
|
65 |
"bookmarks": [{join(entries%bookmarkentry, ", ")}] |
adfd808c123f
json: implement {bookmarks} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24545
diff
changeset
|
66 |
}' |
adfd808c123f
json: implement {bookmarks} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24545
diff
changeset
|
67 |
bookmarkentry = '\{ |
28212
d4419c01532b
templatefilters: make json filter be byte-transparent (BC) (issue4926)
Yuya Nishihara <yuya@tcha.org>
parents:
24715
diff
changeset
|
68 |
"bookmark": {bookmark|utf8|json}, |
24546
adfd808c123f
json: implement {bookmarks} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24545
diff
changeset
|
69 |
"node": {node|json}, |
adfd808c123f
json: implement {bookmarks} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24545
diff
changeset
|
70 |
"date": {date|json} |
adfd808c123f
json: implement {bookmarks} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24545
diff
changeset
|
71 |
}' |
24547
495f3e665b27
json: implement {branches} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24546
diff
changeset
|
72 |
branches = '\{ |
495f3e665b27
json: implement {branches} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24546
diff
changeset
|
73 |
"branches": [{join(entries%branchentry, ", ")}] |
495f3e665b27
json: implement {branches} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24546
diff
changeset
|
74 |
}' |
495f3e665b27
json: implement {branches} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24546
diff
changeset
|
75 |
branchentry = '\{ |
28212
d4419c01532b
templatefilters: make json filter be byte-transparent (BC) (issue4926)
Yuya Nishihara <yuya@tcha.org>
parents:
24715
diff
changeset
|
76 |
"branch": {branch|utf8|json}, |
24547
495f3e665b27
json: implement {branches} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24546
diff
changeset
|
77 |
"node": {node|json}, |
495f3e665b27
json: implement {branches} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24546
diff
changeset
|
78 |
"date": {date|json}, |
495f3e665b27
json: implement {branches} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24546
diff
changeset
|
79 |
"status": {status|json} |
495f3e665b27
json: implement {branches} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24546
diff
changeset
|
80 |
}' |
24544
71e96b9fd3fd
templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
81 |
summary = '"not yet implemented"' |
24713
2f43f8cf8219
json: implement {filediff} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24591
diff
changeset
|
82 |
filediff = '\{ |
2f43f8cf8219
json: implement {filediff} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24591
diff
changeset
|
83 |
"path": {file|json}, |
2f43f8cf8219
json: implement {filediff} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24591
diff
changeset
|
84 |
"node": {node|json}, |
2f43f8cf8219
json: implement {filediff} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24591
diff
changeset
|
85 |
"date": {date|json}, |
28212
d4419c01532b
templatefilters: make json filter be byte-transparent (BC) (issue4926)
Yuya Nishihara <yuya@tcha.org>
parents:
24715
diff
changeset
|
86 |
"desc": {desc|utf8|json}, |
d4419c01532b
templatefilters: make json filter be byte-transparent (BC) (issue4926)
Yuya Nishihara <yuya@tcha.org>
parents:
24715
diff
changeset
|
87 |
"author": {author|utf8|json}, |
24713
2f43f8cf8219
json: implement {filediff} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24591
diff
changeset
|
88 |
"parents": [{join(parent%changesetparent, ", ")}], |
2f43f8cf8219
json: implement {filediff} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24591
diff
changeset
|
89 |
"children": [{join(child%changesetparent, ", ")}], |
2f43f8cf8219
json: implement {filediff} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24591
diff
changeset
|
90 |
"diff": [{join(diff%diffblock, ", ")}] |
2f43f8cf8219
json: implement {filediff} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24591
diff
changeset
|
91 |
}' |
2f43f8cf8219
json: implement {filediff} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24591
diff
changeset
|
92 |
diffblock = '\{ |
2f43f8cf8219
json: implement {filediff} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24591
diff
changeset
|
93 |
"blockno": {blockno|json}, |
2f43f8cf8219
json: implement {filediff} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24591
diff
changeset
|
94 |
"lines": [{join(lines, ", ")}] |
2f43f8cf8219
json: implement {filediff} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24591
diff
changeset
|
95 |
}' |
2f43f8cf8219
json: implement {filediff} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24591
diff
changeset
|
96 |
difflineplus = '\{ |
2f43f8cf8219
json: implement {filediff} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24591
diff
changeset
|
97 |
"t": "+", |
2f43f8cf8219
json: implement {filediff} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24591
diff
changeset
|
98 |
"n": {lineno|json}, |
2f43f8cf8219
json: implement {filediff} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24591
diff
changeset
|
99 |
"l": {line|json} |
2f43f8cf8219
json: implement {filediff} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24591
diff
changeset
|
100 |
}' |
2f43f8cf8219
json: implement {filediff} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24591
diff
changeset
|
101 |
difflineminus = '\{ |
2f43f8cf8219
json: implement {filediff} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24591
diff
changeset
|
102 |
"t": "-", |
2f43f8cf8219
json: implement {filediff} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24591
diff
changeset
|
103 |
"n": {lineno|json}, |
2f43f8cf8219
json: implement {filediff} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24591
diff
changeset
|
104 |
"l": {line|json} |
2f43f8cf8219
json: implement {filediff} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24591
diff
changeset
|
105 |
}' |
2f43f8cf8219
json: implement {filediff} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24591
diff
changeset
|
106 |
difflineat = '\{ |
2f43f8cf8219
json: implement {filediff} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24591
diff
changeset
|
107 |
"t": "@", |
2f43f8cf8219
json: implement {filediff} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24591
diff
changeset
|
108 |
"n": {lineno|json}, |
2f43f8cf8219
json: implement {filediff} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24591
diff
changeset
|
109 |
"l": {line|json} |
2f43f8cf8219
json: implement {filediff} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24591
diff
changeset
|
110 |
}' |
2f43f8cf8219
json: implement {filediff} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24591
diff
changeset
|
111 |
diffline = '\{ |
2f43f8cf8219
json: implement {filediff} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24591
diff
changeset
|
112 |
"t": "", |
2f43f8cf8219
json: implement {filediff} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24591
diff
changeset
|
113 |
"n": {lineno|json}, |
2f43f8cf8219
json: implement {filediff} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24591
diff
changeset
|
114 |
"l": {line|json} |
2f43f8cf8219
json: implement {filediff} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24591
diff
changeset
|
115 |
}' |
24714
84859415a4c9
json: implement {comparison} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24713
diff
changeset
|
116 |
filecomparison = '\{ |
84859415a4c9
json: implement {comparison} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24713
diff
changeset
|
117 |
"path": {file|json}, |
84859415a4c9
json: implement {comparison} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24713
diff
changeset
|
118 |
"node": {node|json}, |
84859415a4c9
json: implement {comparison} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24713
diff
changeset
|
119 |
"date": {date|json}, |
28212
d4419c01532b
templatefilters: make json filter be byte-transparent (BC) (issue4926)
Yuya Nishihara <yuya@tcha.org>
parents:
24715
diff
changeset
|
120 |
"desc": {desc|utf8|json}, |
d4419c01532b
templatefilters: make json filter be byte-transparent (BC) (issue4926)
Yuya Nishihara <yuya@tcha.org>
parents:
24715
diff
changeset
|
121 |
"author": {author|utf8|json}, |
24714
84859415a4c9
json: implement {comparison} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24713
diff
changeset
|
122 |
"parents": [{join(parent%changesetparent, ", ")}], |
84859415a4c9
json: implement {comparison} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24713
diff
changeset
|
123 |
"children": [{join(child%changesetparent, ", ")}], |
84859415a4c9
json: implement {comparison} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24713
diff
changeset
|
124 |
"leftnode": {leftnode|json}, |
84859415a4c9
json: implement {comparison} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24713
diff
changeset
|
125 |
"rightnode": {rightnode|json}, |
84859415a4c9
json: implement {comparison} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24713
diff
changeset
|
126 |
"comparison": [{join(comparison, ", ")}] |
84859415a4c9
json: implement {comparison} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24713
diff
changeset
|
127 |
}' |
84859415a4c9
json: implement {comparison} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24713
diff
changeset
|
128 |
comparisonblock = '\{ |
84859415a4c9
json: implement {comparison} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24713
diff
changeset
|
129 |
"lines": [{join(lines, ", ")}] |
84859415a4c9
json: implement {comparison} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24713
diff
changeset
|
130 |
}' |
84859415a4c9
json: implement {comparison} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24713
diff
changeset
|
131 |
comparisonline = '\{ |
84859415a4c9
json: implement {comparison} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24713
diff
changeset
|
132 |
"t": {type|json}, |
84859415a4c9
json: implement {comparison} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24713
diff
changeset
|
133 |
"ln": {leftlineno|json}, |
84859415a4c9
json: implement {comparison} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24713
diff
changeset
|
134 |
"ll": {leftline|json}, |
84859415a4c9
json: implement {comparison} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24713
diff
changeset
|
135 |
"rn": {rightlineno|json}, |
84859415a4c9
json: implement {comparison} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24713
diff
changeset
|
136 |
"rl": {rightline|json} |
84859415a4c9
json: implement {comparison} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24713
diff
changeset
|
137 |
}' |
24715
1439bacf0ec7
json: implement {fileannotate} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24714
diff
changeset
|
138 |
fileannotate = '\{ |
1439bacf0ec7
json: implement {fileannotate} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24714
diff
changeset
|
139 |
"abspath": {file|json}, |
1439bacf0ec7
json: implement {fileannotate} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24714
diff
changeset
|
140 |
"node": {node|json}, |
28212
d4419c01532b
templatefilters: make json filter be byte-transparent (BC) (issue4926)
Yuya Nishihara <yuya@tcha.org>
parents:
24715
diff
changeset
|
141 |
"author": {author|utf8|json}, |
24715
1439bacf0ec7
json: implement {fileannotate} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24714
diff
changeset
|
142 |
"date": {date|json}, |
28212
d4419c01532b
templatefilters: make json filter be byte-transparent (BC) (issue4926)
Yuya Nishihara <yuya@tcha.org>
parents:
24715
diff
changeset
|
143 |
"desc": {desc|utf8|json}, |
24715
1439bacf0ec7
json: implement {fileannotate} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24714
diff
changeset
|
144 |
"parents": [{join(parent%changesetparent, ", ")}], |
1439bacf0ec7
json: implement {fileannotate} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24714
diff
changeset
|
145 |
"children": [{join(child%changesetparent, ", ")}], |
1439bacf0ec7
json: implement {fileannotate} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24714
diff
changeset
|
146 |
"permissions": {permissions|json}, |
1439bacf0ec7
json: implement {fileannotate} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24714
diff
changeset
|
147 |
"annotate": [{join(annotate%fileannotation, ", ")}] |
1439bacf0ec7
json: implement {fileannotate} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24714
diff
changeset
|
148 |
}' |
1439bacf0ec7
json: implement {fileannotate} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24714
diff
changeset
|
149 |
fileannotation = '\{ |
1439bacf0ec7
json: implement {fileannotate} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24714
diff
changeset
|
150 |
"node": {node|json}, |
28212
d4419c01532b
templatefilters: make json filter be byte-transparent (BC) (issue4926)
Yuya Nishihara <yuya@tcha.org>
parents:
24715
diff
changeset
|
151 |
"author": {author|utf8|json}, |
d4419c01532b
templatefilters: make json filter be byte-transparent (BC) (issue4926)
Yuya Nishihara <yuya@tcha.org>
parents:
24715
diff
changeset
|
152 |
"desc": {desc|utf8|json}, |
24715
1439bacf0ec7
json: implement {fileannotate} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24714
diff
changeset
|
153 |
"abspath": {file|json}, |
1439bacf0ec7
json: implement {fileannotate} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24714
diff
changeset
|
154 |
"targetline": {targetline|json}, |
1439bacf0ec7
json: implement {fileannotate} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24714
diff
changeset
|
155 |
"line": {line|json}, |
1439bacf0ec7
json: implement {fileannotate} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24714
diff
changeset
|
156 |
"lineno": {lineno|json}, |
1439bacf0ec7
json: implement {fileannotate} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24714
diff
changeset
|
157 |
"revdate": {revdate|json} |
1439bacf0ec7
json: implement {fileannotate} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24714
diff
changeset
|
158 |
}' |
24544
71e96b9fd3fd
templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
159 |
filelog = '"not yet implemented"' |
71e96b9fd3fd
templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
160 |
graph = '"not yet implemented"' |
24590
0bb733dfcabe
json: implement {helptopics} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24589
diff
changeset
|
161 |
helptopics = '\{ |
0bb733dfcabe
json: implement {helptopics} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24589
diff
changeset
|
162 |
"topics": [{join(topics%helptopicentry, ", ")}], |
0bb733dfcabe
json: implement {helptopics} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24589
diff
changeset
|
163 |
"earlycommands": [{join(earlycommands%helptopicentry, ", ")}], |
0bb733dfcabe
json: implement {helptopics} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24589
diff
changeset
|
164 |
"othercommands": [{join(othercommands%helptopicentry, ", ")}] |
0bb733dfcabe
json: implement {helptopics} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24589
diff
changeset
|
165 |
}' |
0bb733dfcabe
json: implement {helptopics} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24589
diff
changeset
|
166 |
helptopicentry = '\{ |
28212
d4419c01532b
templatefilters: make json filter be byte-transparent (BC) (issue4926)
Yuya Nishihara <yuya@tcha.org>
parents:
24715
diff
changeset
|
167 |
"topic": {topic|utf8|json}, |
d4419c01532b
templatefilters: make json filter be byte-transparent (BC) (issue4926)
Yuya Nishihara <yuya@tcha.org>
parents:
24715
diff
changeset
|
168 |
"summary": {summary|utf8|json} |
24590
0bb733dfcabe
json: implement {helptopics} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24589
diff
changeset
|
169 |
}' |
24591
517f3e190a5d
json: implement {help} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24590
diff
changeset
|
170 |
help = '\{ |
28212
d4419c01532b
templatefilters: make json filter be byte-transparent (BC) (issue4926)
Yuya Nishihara <yuya@tcha.org>
parents:
24715
diff
changeset
|
171 |
"topic": {topic|utf8|json}, |
d4419c01532b
templatefilters: make json filter be byte-transparent (BC) (issue4926)
Yuya Nishihara <yuya@tcha.org>
parents:
24715
diff
changeset
|
172 |
"rawdoc": {doc|utf8|json} |
24591
517f3e190a5d
json: implement {help} template
Gregory Szorc <gregory.szorc@gmail.com>
parents:
24590
diff
changeset
|
173 |
}' |
24544
71e96b9fd3fd
templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
174 |
filenodelink = '' |
71e96b9fd3fd
templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
175 |
filenolink = '' |
28268
3643b66d7f71
hgweb: add index template to json/map
Anton Shestakov <av6@dwimlabs.net>
parents:
28212
diff
changeset
|
176 |
index = '\{ |
3643b66d7f71
hgweb: add index template to json/map
Anton Shestakov <av6@dwimlabs.net>
parents:
28212
diff
changeset
|
177 |
"entries": [{join(entries%indexentry, ", ")}] |
3643b66d7f71
hgweb: add index template to json/map
Anton Shestakov <av6@dwimlabs.net>
parents:
28212
diff
changeset
|
178 |
}' |
3643b66d7f71
hgweb: add index template to json/map
Anton Shestakov <av6@dwimlabs.net>
parents:
28212
diff
changeset
|
179 |
indexentry = '\{ |
3643b66d7f71
hgweb: add index template to json/map
Anton Shestakov <av6@dwimlabs.net>
parents:
28212
diff
changeset
|
180 |
"name": {name|utf8|json}, |
3643b66d7f71
hgweb: add index template to json/map
Anton Shestakov <av6@dwimlabs.net>
parents:
28212
diff
changeset
|
181 |
"description": {description|utf8|json}, |
3643b66d7f71
hgweb: add index template to json/map
Anton Shestakov <av6@dwimlabs.net>
parents:
28212
diff
changeset
|
182 |
"contact": {contact|utf8|json}, |
3643b66d7f71
hgweb: add index template to json/map
Anton Shestakov <av6@dwimlabs.net>
parents:
28212
diff
changeset
|
183 |
"lastchange": {lastchange|json} |
3643b66d7f71
hgweb: add index template to json/map
Anton Shestakov <av6@dwimlabs.net>
parents:
28212
diff
changeset
|
184 |
}' |