##// END OF EJS Templates
json: implement {shortlog} and {changelog} templates...
Gregory Szorc -
r24588:0bf54479 default
parent child Browse files
Show More
@@ -0,0 +1,5 b''
1 \{
2 "node": {node|json},
3 "changeset_count": {changesets|json},
4 "changesets": [{join(entries%changelistentry, ", ")}]
5 }
@@ -1,8 +1,19 b''
1 mimetype = 'application/json'
1 mimetype = 'application/json'
2 filerevision = '"not yet implemented"'
2 filerevision = '"not yet implemented"'
3 search = '"not yet implemented"'
3 search = '"not yet implemented"'
4 shortlog = '"not yet implemented"'
4 # changelog and shortlog are the same web API but with different
5 changelog = '"not yet implemented"'
5 # number of entries.
6 changelog = changelist.tmpl
7 shortlog = changelist.tmpl
8 changelistentry = '\{
9 "node": {node|json},
10 "date": {date|json},
11 "desc": {desc|json},
12 "bookmarks": [{join(bookmarks%changelistentryname, ", ")}],
13 "tags": [{join(tags%changelistentryname, ", ")}],
14 "user": {author|json}
15 }'
16 changelistentryname = '{name|json}'
6 changeset = '\{
17 changeset = '\{
7 "node": {node|json},
18 "node": {node|json},
8 "date": {date|json},
19 "date": {date|json},
@@ -129,21 +129,298 b' changelog/ shows information about sever'
129 $ request json-changelog
129 $ request json-changelog
130 200 Script output follows
130 200 Script output follows
131
131
132 "not yet implemented"
132 {
133 "changeset_count": 10,
134 "changesets": [
135 {
136 "bookmarks": [],
137 "date": [
138 0.0,
139 0
140 ],
141 "desc": "merge test-branch into default",
142 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
143 "tags": [
144 "tip"
145 ],
146 "user": "test"
147 },
148 {
149 "bookmarks": [],
150 "date": [
151 0.0,
152 0
153 ],
154 "desc": "another commit in test-branch",
155 "node": "ed66c30e87eb65337c05a4229efaa5f1d5285a90",
156 "tags": [],
157 "user": "test"
158 },
159 {
160 "bookmarks": [],
161 "date": [
162 0.0,
163 0
164 ],
165 "desc": "create test branch",
166 "node": "6ab967a8ab3489227a83f80e920faa039a71819f",
167 "tags": [],
168 "user": "test"
169 },
170 {
171 "bookmarks": [
172 "bookmark2"
173 ],
174 "date": [
175 0.0,
176 0
177 ],
178 "desc": "create tag2",
179 "node": "ceed296fe500c3fac9541e31dad860cb49c89e45",
180 "tags": [],
181 "user": "test"
182 },
183 {
184 "bookmarks": [],
185 "date": [
186 0.0,
187 0
188 ],
189 "desc": "another commit to da/foo",
190 "node": "f2890a05fea49bfaf9fb27ed5490894eba32da78",
191 "tags": [
192 "tag2"
193 ],
194 "user": "test"
195 },
196 {
197 "bookmarks": [],
198 "date": [
199 0.0,
200 0
201 ],
202 "desc": "create tag",
203 "node": "93a8ce14f89156426b7fa981af8042da53f03aa0",
204 "tags": [],
205 "user": "test"
206 },
207 {
208 "bookmarks": [],
209 "date": [
210 0.0,
211 0
212 ],
213 "desc": "move foo",
214 "node": "78896eb0e102174ce9278438a95e12543e4367a7",
215 "tags": [
216 "tag1"
217 ],
218 "user": "test"
219 },
220 {
221 "bookmarks": [
222 "bookmark1"
223 ],
224 "date": [
225 0.0,
226 0
227 ],
228 "desc": "modify da/foo",
229 "node": "8d7c456572acf3557e8ed8a07286b10c408bcec5",
230 "tags": [],
231 "user": "test"
232 },
233 {
234 "bookmarks": [],
235 "date": [
236 0.0,
237 0
238 ],
239 "desc": "modify foo",
240 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
241 "tags": [],
242 "user": "test"
243 },
244 {
245 "bookmarks": [],
246 "date": [
247 0.0,
248 0
249 ],
250 "desc": "initial",
251 "node": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
252 "tags": [],
253 "user": "test"
254 }
255 ],
256 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7"
257 }
133
258
134 changelog/{revision} shows information about a single changeset
259 changelog/{revision} shows information starting at a specific changeset
135
260
136 $ request json-changelog/06e557f3edf6
261 $ request json-changelog/f8bbb9024b10
137 200 Script output follows
262 200 Script output follows
138
263
139 "not yet implemented"
264 {
265 "changeset_count": 10,
266 "changesets": [
267 {
268 "bookmarks": [],
269 "date": [
270 0.0,
271 0
272 ],
273 "desc": "modify foo",
274 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
275 "tags": [],
276 "user": "test"
277 },
278 {
279 "bookmarks": [],
280 "date": [
281 0.0,
282 0
283 ],
284 "desc": "initial",
285 "node": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
286 "tags": [],
287 "user": "test"
288 }
289 ],
290 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8"
291 }
140
292
141 shortlog/ shows information about a set of changesets
293 shortlog/ shows information about a set of changesets
142
294
143 $ request json-shortlog
295 $ request json-shortlog
144 200 Script output follows
296 200 Script output follows
145
297
146 "not yet implemented"
298 {
299 "changeset_count": 10,
300 "changesets": [
301 {
302 "bookmarks": [],
303 "date": [
304 0.0,
305 0
306 ],
307 "desc": "merge test-branch into default",
308 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
309 "tags": [
310 "tip"
311 ],
312 "user": "test"
313 },
314 {
315 "bookmarks": [],
316 "date": [
317 0.0,
318 0
319 ],
320 "desc": "another commit in test-branch",
321 "node": "ed66c30e87eb65337c05a4229efaa5f1d5285a90",
322 "tags": [],
323 "user": "test"
324 },
325 {
326 "bookmarks": [],
327 "date": [
328 0.0,
329 0
330 ],
331 "desc": "create test branch",
332 "node": "6ab967a8ab3489227a83f80e920faa039a71819f",
333 "tags": [],
334 "user": "test"
335 },
336 {
337 "bookmarks": [
338 "bookmark2"
339 ],
340 "date": [
341 0.0,
342 0
343 ],
344 "desc": "create tag2",
345 "node": "ceed296fe500c3fac9541e31dad860cb49c89e45",
346 "tags": [],
347 "user": "test"
348 },
349 {
350 "bookmarks": [],
351 "date": [
352 0.0,
353 0
354 ],
355 "desc": "another commit to da/foo",
356 "node": "f2890a05fea49bfaf9fb27ed5490894eba32da78",
357 "tags": [
358 "tag2"
359 ],
360 "user": "test"
361 },
362 {
363 "bookmarks": [],
364 "date": [
365 0.0,
366 0
367 ],
368 "desc": "create tag",
369 "node": "93a8ce14f89156426b7fa981af8042da53f03aa0",
370 "tags": [],
371 "user": "test"
372 },
373 {
374 "bookmarks": [],
375 "date": [
376 0.0,
377 0
378 ],
379 "desc": "move foo",
380 "node": "78896eb0e102174ce9278438a95e12543e4367a7",
381 "tags": [
382 "tag1"
383 ],
384 "user": "test"
385 },
386 {
387 "bookmarks": [
388 "bookmark1"
389 ],
390 "date": [
391 0.0,
392 0
393 ],
394 "desc": "modify da/foo",
395 "node": "8d7c456572acf3557e8ed8a07286b10c408bcec5",
396 "tags": [],
397 "user": "test"
398 },
399 {
400 "bookmarks": [],
401 "date": [
402 0.0,
403 0
404 ],
405 "desc": "modify foo",
406 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
407 "tags": [],
408 "user": "test"
409 },
410 {
411 "bookmarks": [],
412 "date": [
413 0.0,
414 0
415 ],
416 "desc": "initial",
417 "node": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
418 "tags": [],
419 "user": "test"
420 }
421 ],
422 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7"
423 }
147
424
148 changeset/ renders the tip changeset
425 changeset/ renders the tip changeset
149
426
General Comments 0
You need to be logged in to leave comments. Login now