##// END OF EJS Templates
templates: add support for search webcommand in json style
Laura Médioni -
r29383:f3dca85b default
parent child Browse files
Show More
@@ -1,218 +1,223 b''
1 1 mimetype = 'application/json'
2 2 filerevision = '\{
3 3 "node": {node|json},
4 4 "path": {file|json},
5 5 "date": {date|json},
6 6 "desc": {desc|utf8|json},
7 7 "branch": {if(branch, branch%changesetbranch, "default"|json)},
8 8 "bookmarks": [{join(bookmarks%changelistentryname, ", ")}],
9 9 "tags": [{join(tags%changelistentryname, ", ")}],
10 10 "user": {author|utf8|json},
11 11 "parents": [{join(parent%changesetparent, ", ")}],
12 12 "phase": {phase|json},
13 13 "lines": [{join(text%lineentry, ", ")}]
14 14 }'
15 15 lineentry = '\{
16 16 "line": {line|json}
17 17 }'
18 search = '"not yet implemented"'
18 search = '\{
19 "node": {node|json},
20 "query": {query|json},
21 "entries": [{join(entries%searchentry, ", ")}]
22 }'
23 searchentry = '{changelistentry}'
19 24 # changelog and shortlog are the same web API but with different
20 25 # number of entries.
21 26 changelog = changelist.tmpl
22 27 shortlog = changelist.tmpl
23 28 changelistentry = '\{
24 29 "node": {node|json},
25 30 "date": {date|json},
26 31 "desc": {desc|utf8|json},
27 32 "branch": {if(branch, branch%changesetbranch, "default"|json)},
28 33 "bookmarks": [{join(bookmarks%changelistentryname, ", ")}],
29 34 "tags": [{join(tags%changelistentryname, ", ")}],
30 35 "user": {author|utf8|json},
31 36 "phase": {phase|json},
32 37 "parents": [{if(allparents, join(allparents%changesetparent, ", "),
33 38 join(parent%changesetparent, ", "))}]
34 39 }'
35 40 changelistentryname = '{name|utf8|json}'
36 41 changeset = '\{
37 42 "node": {node|json},
38 43 "date": {date|json},
39 44 "desc": {desc|utf8|json},
40 45 "branch": {if(branch, branch%changesetbranch, "default"|json)},
41 46 "bookmarks": [{join(changesetbookmark, ", ")}],
42 47 "tags": [{join(changesettag, ", ")}],
43 48 "user": {author|utf8|json},
44 49 "parents": [{join(parent%changesetparent, ", ")}],
45 50 "phase": {phase|json}
46 51 }'
47 52 changesetbranch = '{name|utf8|json}'
48 53 changesetbookmark = '{bookmark|utf8|json}'
49 54 changesettag = '{tag|utf8|json}'
50 55 changesetparent = '{node|json}'
51 56 manifest = '\{
52 57 "node": {node|json},
53 58 "abspath": {path|json},
54 59 "directories": [{join(dentries%direntry, ", ")}],
55 60 "files": [{join(fentries%fileentry, ", ")}],
56 61 "bookmarks": [{join(bookmarks%name, ", ")}],
57 62 "tags": [{join(tags%name, ", ")}]
58 63 }'
59 64 name = '{name|utf8|json}'
60 65 direntry = '\{
61 66 "abspath": {path|json},
62 67 "basename": {basename|json},
63 68 "emptydirs": {emptydirs|json}
64 69 }'
65 70 fileentry = '\{
66 71 "abspath": {file|json},
67 72 "basename": {basename|json},
68 73 "date": {date|json},
69 74 "size": {size|json},
70 75 "flags": {permissions|json}
71 76 }'
72 77 tags = '\{
73 78 "node": {node|json},
74 79 "tags": [{join(entriesnotip%tagentry, ", ")}]
75 80 }'
76 81 tagentry = '\{
77 82 "tag": {tag|utf8|json},
78 83 "node": {node|json},
79 84 "date": {date|json}
80 85 }'
81 86 bookmarks = '\{
82 87 "node": {node|json},
83 88 "bookmarks": [{join(entries%bookmarkentry, ", ")}]
84 89 }'
85 90 bookmarkentry = '\{
86 91 "bookmark": {bookmark|utf8|json},
87 92 "node": {node|json},
88 93 "date": {date|json}
89 94 }'
90 95 branches = '\{
91 96 "branches": [{join(entries%branchentry, ", ")}]
92 97 }'
93 98 branchentry = '\{
94 99 "branch": {branch|utf8|json},
95 100 "node": {node|json},
96 101 "date": {date|json},
97 102 "status": {status|json}
98 103 }'
99 104 shortlogentry = '{changelistentry}'
100 105 summary = '\{
101 106 "node": {node|json},
102 107 "lastchange": {lastchange|json},
103 108 "bookmarks": [{join(bookmarks%bookmarkentry, ", ")}],
104 109 "branches": [{join(branches%branchentry, ", ")}],
105 110 "shortlog": [{join(shortlog%shortlogentry, ", ")}],
106 111 "tags": [{join(tags%tagentry, ", ")}],
107 112 "archives": [{join(archives%archiveentry, ", ")}]
108 113 }'
109 114 archiveentry = '\{
110 115 "node": {node|json},
111 116 "extension": {extension|json},
112 117 "type": {type|json}
113 118 }'
114 119 filediff = '\{
115 120 "path": {file|json},
116 121 "node": {node|json},
117 122 "date": {date|json},
118 123 "desc": {desc|utf8|json},
119 124 "author": {author|utf8|json},
120 125 "parents": [{join(parent%changesetparent, ", ")}],
121 126 "children": [{join(child%changesetparent, ", ")}],
122 127 "diff": [{join(diff%diffblock, ", ")}]
123 128 }'
124 129 diffblock = '\{
125 130 "blockno": {blockno|json},
126 131 "lines": [{join(lines, ", ")}]
127 132 }'
128 133 difflineplus = '\{
129 134 "t": "+",
130 135 "n": {lineno|json},
131 136 "l": {line|json}
132 137 }'
133 138 difflineminus = '\{
134 139 "t": "-",
135 140 "n": {lineno|json},
136 141 "l": {line|json}
137 142 }'
138 143 difflineat = '\{
139 144 "t": "@",
140 145 "n": {lineno|json},
141 146 "l": {line|json}
142 147 }'
143 148 diffline = '\{
144 149 "t": "",
145 150 "n": {lineno|json},
146 151 "l": {line|json}
147 152 }'
148 153 filecomparison = '\{
149 154 "path": {file|json},
150 155 "node": {node|json},
151 156 "date": {date|json},
152 157 "desc": {desc|utf8|json},
153 158 "author": {author|utf8|json},
154 159 "parents": [{join(parent%changesetparent, ", ")}],
155 160 "children": [{join(child%changesetparent, ", ")}],
156 161 "leftnode": {leftnode|json},
157 162 "rightnode": {rightnode|json},
158 163 "comparison": [{join(comparison, ", ")}]
159 164 }'
160 165 comparisonblock = '\{
161 166 "lines": [{join(lines, ", ")}]
162 167 }'
163 168 comparisonline = '\{
164 169 "t": {type|json},
165 170 "ln": {leftlineno|json},
166 171 "ll": {leftline|json},
167 172 "rn": {rightlineno|json},
168 173 "rl": {rightline|json}
169 174 }'
170 175 fileannotate = '\{
171 176 "abspath": {file|json},
172 177 "node": {node|json},
173 178 "author": {author|utf8|json},
174 179 "date": {date|json},
175 180 "desc": {desc|utf8|json},
176 181 "parents": [{join(parent%changesetparent, ", ")}],
177 182 "children": [{join(child%changesetparent, ", ")}],
178 183 "permissions": {permissions|json},
179 184 "annotate": [{join(annotate%fileannotation, ", ")}]
180 185 }'
181 186 fileannotation = '\{
182 187 "node": {node|json},
183 188 "author": {author|utf8|json},
184 189 "desc": {desc|utf8|json},
185 190 "abspath": {file|json},
186 191 "targetline": {targetline|json},
187 192 "line": {line|json},
188 193 "lineno": {lineno|json},
189 194 "revdate": {revdate|json}
190 195 }'
191 196 filelog = '\{
192 197 "entries": [{join(entries%changelistentry, ", ")}]
193 198 }'
194 199 graph = '"not yet implemented"'
195 200 helptopics = '\{
196 201 "topics": [{join(topics%helptopicentry, ", ")}],
197 202 "earlycommands": [{join(earlycommands%helptopicentry, ", ")}],
198 203 "othercommands": [{join(othercommands%helptopicentry, ", ")}]
199 204 }'
200 205 helptopicentry = '\{
201 206 "topic": {topic|utf8|json},
202 207 "summary": {summary|utf8|json}
203 208 }'
204 209 help = '\{
205 210 "topic": {topic|utf8|json},
206 211 "rawdoc": {doc|utf8|json}
207 212 }'
208 213 filenodelink = ''
209 214 filenolink = ''
210 215 index = '\{
211 216 "entries": [{join(entries%indexentry, ", ")}]
212 217 }'
213 218 indexentry = '\{
214 219 "name": {name|utf8|json},
215 220 "description": {description|utf8|json},
216 221 "contact": {contact|utf8|json},
217 222 "lastchange": {lastchange|json}
218 223 }'
@@ -1,1572 +1,1632 b''
1 1 #require serve
2 2
3 3 $ request() {
4 4 > get-with-headers.py --json localhost:$HGPORT "$1"
5 5 > }
6 6
7 7 $ hg init test
8 8 $ cd test
9 9 $ mkdir da
10 10 $ echo foo > da/foo
11 11 $ echo foo > foo
12 12 $ hg -q ci -A -m initial
13 13 $ echo bar > foo
14 14 $ hg ci -m 'modify foo'
15 15 $ echo bar > da/foo
16 16 $ hg ci -m 'modify da/foo'
17 17 $ hg bookmark bookmark1
18 18 $ hg up default
19 19 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
20 20 (leaving bookmark bookmark1)
21 21 $ hg mv foo foo-new
22 22 $ hg commit -m 'move foo'
23 23 $ hg tag -m 'create tag' tag1
24 24 $ hg phase --public -r .
25 25 $ echo baz > da/foo
26 26 $ hg commit -m 'another commit to da/foo'
27 27 $ hg tag -m 'create tag2' tag2
28 28 $ hg bookmark bookmark2
29 29 $ hg -q up -r 0
30 30 $ hg -q branch test-branch
31 31 $ echo branch > foo
32 32 $ hg commit -m 'create test branch'
33 33 $ echo branch_commit_2 > foo
34 34 $ hg commit -m 'another commit in test-branch'
35 35 $ hg -q up default
36 36 $ hg merge --tool :local test-branch
37 37 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
38 38 (branch merge, don't forget to commit)
39 39 $ hg commit -m 'merge test-branch into default'
40 40
41 41 $ hg log -G
42 42 @ changeset: 9:cc725e08502a
43 43 |\ tag: tip
44 44 | | parent: 6:ceed296fe500
45 45 | | parent: 8:ed66c30e87eb
46 46 | | user: test
47 47 | | date: Thu Jan 01 00:00:00 1970 +0000
48 48 | | summary: merge test-branch into default
49 49 | |
50 50 | o changeset: 8:ed66c30e87eb
51 51 | | branch: test-branch
52 52 | | user: test
53 53 | | date: Thu Jan 01 00:00:00 1970 +0000
54 54 | | summary: another commit in test-branch
55 55 | |
56 56 | o changeset: 7:6ab967a8ab34
57 57 | | branch: test-branch
58 58 | | parent: 0:06e557f3edf6
59 59 | | user: test
60 60 | | date: Thu Jan 01 00:00:00 1970 +0000
61 61 | | summary: create test branch
62 62 | |
63 63 o | changeset: 6:ceed296fe500
64 64 | | bookmark: bookmark2
65 65 | | user: test
66 66 | | date: Thu Jan 01 00:00:00 1970 +0000
67 67 | | summary: create tag2
68 68 | |
69 69 o | changeset: 5:f2890a05fea4
70 70 | | tag: tag2
71 71 | | user: test
72 72 | | date: Thu Jan 01 00:00:00 1970 +0000
73 73 | | summary: another commit to da/foo
74 74 | |
75 75 o | changeset: 4:93a8ce14f891
76 76 | | user: test
77 77 | | date: Thu Jan 01 00:00:00 1970 +0000
78 78 | | summary: create tag
79 79 | |
80 80 o | changeset: 3:78896eb0e102
81 81 | | tag: tag1
82 82 | | user: test
83 83 | | date: Thu Jan 01 00:00:00 1970 +0000
84 84 | | summary: move foo
85 85 | |
86 86 o | changeset: 2:8d7c456572ac
87 87 | | bookmark: bookmark1
88 88 | | user: test
89 89 | | date: Thu Jan 01 00:00:00 1970 +0000
90 90 | | summary: modify da/foo
91 91 | |
92 92 o | changeset: 1:f8bbb9024b10
93 93 |/ user: test
94 94 | date: Thu Jan 01 00:00:00 1970 +0000
95 95 | summary: modify foo
96 96 |
97 97 o changeset: 0:06e557f3edf6
98 98 user: test
99 99 date: Thu Jan 01 00:00:00 1970 +0000
100 100 summary: initial
101 101
102 102
103 103 $ hg serve -p $HGPORT -d --pid-file=hg.pid -A access.log -E error.log
104 104 $ cat hg.pid >> $DAEMON_PIDS
105 105
106 106 (Try to keep these in roughly the order they are defined in webcommands.py)
107 107
108 108 (log is handled by filelog/ and changelog/ - ignore it)
109 109
110 110 (rawfile/ doesn't use templating - nothing to test)
111 111
112 112 file/{revision}/{path} shows file revision
113 113
114 114 $ request json-file/78896eb0e102/foo-new
115 115 200 Script output follows
116 116
117 117 {
118 118 "bookmarks": [],
119 119 "branch": "default",
120 120 "date": [
121 121 0.0,
122 122 0
123 123 ],
124 124 "desc": "move foo",
125 125 "lines": [
126 126 {
127 127 "line": "bar\n"
128 128 }
129 129 ],
130 130 "node": "78896eb0e102174ce9278438a95e12543e4367a7",
131 131 "parents": [
132 132 "f8bbb9024b10f93cdbb8d940337398291d40dea8"
133 133 ],
134 134 "path": "foo-new",
135 135 "phase": "public",
136 136 "tags": [
137 137 "tag1"
138 138 ],
139 139 "user": "test"
140 140 }
141 141
142 142 file/{revision} shows root directory info
143 143
144 144 $ request json-file/cc725e08502a
145 145 200 Script output follows
146 146
147 147 {
148 148 "abspath": "/",
149 149 "bookmarks": [],
150 150 "directories": [
151 151 {
152 152 "abspath": "/da",
153 153 "basename": "da",
154 154 "emptydirs": ""
155 155 }
156 156 ],
157 157 "files": [
158 158 {
159 159 "abspath": ".hgtags",
160 160 "basename": ".hgtags",
161 161 "date": [
162 162 0.0,
163 163 0
164 164 ],
165 165 "flags": "",
166 166 "size": 92
167 167 },
168 168 {
169 169 "abspath": "foo-new",
170 170 "basename": "foo-new",
171 171 "date": [
172 172 0.0,
173 173 0
174 174 ],
175 175 "flags": "",
176 176 "size": 4
177 177 }
178 178 ],
179 179 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
180 180 "tags": [
181 181 "tip"
182 182 ]
183 183 }
184 184
185 185 changelog/ shows information about several changesets
186 186
187 187 $ request json-changelog
188 188 200 Script output follows
189 189
190 190 {
191 191 "changeset_count": 10,
192 192 "changesets": [
193 193 {
194 194 "bookmarks": [],
195 195 "branch": "default",
196 196 "date": [
197 197 0.0,
198 198 0
199 199 ],
200 200 "desc": "merge test-branch into default",
201 201 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
202 202 "parents": [
203 203 "ceed296fe500c3fac9541e31dad860cb49c89e45",
204 204 "ed66c30e87eb65337c05a4229efaa5f1d5285a90"
205 205 ],
206 206 "phase": "draft",
207 207 "tags": [
208 208 "tip"
209 209 ],
210 210 "user": "test"
211 211 },
212 212 {
213 213 "bookmarks": [],
214 214 "branch": "test-branch",
215 215 "date": [
216 216 0.0,
217 217 0
218 218 ],
219 219 "desc": "another commit in test-branch",
220 220 "node": "ed66c30e87eb65337c05a4229efaa5f1d5285a90",
221 221 "parents": [
222 222 "6ab967a8ab3489227a83f80e920faa039a71819f"
223 223 ],
224 224 "phase": "draft",
225 225 "tags": [],
226 226 "user": "test"
227 227 },
228 228 {
229 229 "bookmarks": [],
230 230 "branch": "test-branch",
231 231 "date": [
232 232 0.0,
233 233 0
234 234 ],
235 235 "desc": "create test branch",
236 236 "node": "6ab967a8ab3489227a83f80e920faa039a71819f",
237 237 "parents": [
238 238 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
239 239 ],
240 240 "phase": "draft",
241 241 "tags": [],
242 242 "user": "test"
243 243 },
244 244 {
245 245 "bookmarks": [
246 246 "bookmark2"
247 247 ],
248 248 "branch": "default",
249 249 "date": [
250 250 0.0,
251 251 0
252 252 ],
253 253 "desc": "create tag2",
254 254 "node": "ceed296fe500c3fac9541e31dad860cb49c89e45",
255 255 "parents": [
256 256 "f2890a05fea49bfaf9fb27ed5490894eba32da78"
257 257 ],
258 258 "phase": "draft",
259 259 "tags": [],
260 260 "user": "test"
261 261 },
262 262 {
263 263 "bookmarks": [],
264 264 "branch": "default",
265 265 "date": [
266 266 0.0,
267 267 0
268 268 ],
269 269 "desc": "another commit to da/foo",
270 270 "node": "f2890a05fea49bfaf9fb27ed5490894eba32da78",
271 271 "parents": [
272 272 "93a8ce14f89156426b7fa981af8042da53f03aa0"
273 273 ],
274 274 "phase": "draft",
275 275 "tags": [
276 276 "tag2"
277 277 ],
278 278 "user": "test"
279 279 },
280 280 {
281 281 "bookmarks": [],
282 282 "branch": "default",
283 283 "date": [
284 284 0.0,
285 285 0
286 286 ],
287 287 "desc": "create tag",
288 288 "node": "93a8ce14f89156426b7fa981af8042da53f03aa0",
289 289 "parents": [
290 290 "78896eb0e102174ce9278438a95e12543e4367a7"
291 291 ],
292 292 "phase": "public",
293 293 "tags": [],
294 294 "user": "test"
295 295 },
296 296 {
297 297 "bookmarks": [],
298 298 "branch": "default",
299 299 "date": [
300 300 0.0,
301 301 0
302 302 ],
303 303 "desc": "move foo",
304 304 "node": "78896eb0e102174ce9278438a95e12543e4367a7",
305 305 "parents": [
306 306 "8d7c456572acf3557e8ed8a07286b10c408bcec5"
307 307 ],
308 308 "phase": "public",
309 309 "tags": [
310 310 "tag1"
311 311 ],
312 312 "user": "test"
313 313 },
314 314 {
315 315 "bookmarks": [
316 316 "bookmark1"
317 317 ],
318 318 "branch": "default",
319 319 "date": [
320 320 0.0,
321 321 0
322 322 ],
323 323 "desc": "modify da/foo",
324 324 "node": "8d7c456572acf3557e8ed8a07286b10c408bcec5",
325 325 "parents": [
326 326 "f8bbb9024b10f93cdbb8d940337398291d40dea8"
327 327 ],
328 328 "phase": "public",
329 329 "tags": [],
330 330 "user": "test"
331 331 },
332 332 {
333 333 "bookmarks": [],
334 334 "branch": "default",
335 335 "date": [
336 336 0.0,
337 337 0
338 338 ],
339 339 "desc": "modify foo",
340 340 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
341 341 "parents": [
342 342 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
343 343 ],
344 344 "phase": "public",
345 345 "tags": [],
346 346 "user": "test"
347 347 },
348 348 {
349 349 "bookmarks": [],
350 350 "branch": "default",
351 351 "date": [
352 352 0.0,
353 353 0
354 354 ],
355 355 "desc": "initial",
356 356 "node": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
357 357 "parents": [],
358 358 "phase": "public",
359 359 "tags": [],
360 360 "user": "test"
361 361 }
362 362 ],
363 363 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7"
364 364 }
365 365
366 366 changelog/{revision} shows information starting at a specific changeset
367 367
368 368 $ request json-changelog/f8bbb9024b10
369 369 200 Script output follows
370 370
371 371 {
372 372 "changeset_count": 10,
373 373 "changesets": [
374 374 {
375 375 "bookmarks": [],
376 376 "branch": "default",
377 377 "date": [
378 378 0.0,
379 379 0
380 380 ],
381 381 "desc": "modify foo",
382 382 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
383 383 "parents": [
384 384 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
385 385 ],
386 386 "phase": "public",
387 387 "tags": [],
388 388 "user": "test"
389 389 },
390 390 {
391 391 "bookmarks": [],
392 392 "branch": "default",
393 393 "date": [
394 394 0.0,
395 395 0
396 396 ],
397 397 "desc": "initial",
398 398 "node": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
399 399 "parents": [],
400 400 "phase": "public",
401 401 "tags": [],
402 402 "user": "test"
403 403 }
404 404 ],
405 405 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8"
406 406 }
407 407
408 408 shortlog/ shows information about a set of changesets
409 409
410 410 $ request json-shortlog
411 411 200 Script output follows
412 412
413 413 {
414 414 "changeset_count": 10,
415 415 "changesets": [
416 416 {
417 417 "bookmarks": [],
418 418 "branch": "default",
419 419 "date": [
420 420 0.0,
421 421 0
422 422 ],
423 423 "desc": "merge test-branch into default",
424 424 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
425 425 "parents": [
426 426 "ceed296fe500c3fac9541e31dad860cb49c89e45",
427 427 "ed66c30e87eb65337c05a4229efaa5f1d5285a90"
428 428 ],
429 429 "phase": "draft",
430 430 "tags": [
431 431 "tip"
432 432 ],
433 433 "user": "test"
434 434 },
435 435 {
436 436 "bookmarks": [],
437 437 "branch": "test-branch",
438 438 "date": [
439 439 0.0,
440 440 0
441 441 ],
442 442 "desc": "another commit in test-branch",
443 443 "node": "ed66c30e87eb65337c05a4229efaa5f1d5285a90",
444 444 "parents": [
445 445 "6ab967a8ab3489227a83f80e920faa039a71819f"
446 446 ],
447 447 "phase": "draft",
448 448 "tags": [],
449 449 "user": "test"
450 450 },
451 451 {
452 452 "bookmarks": [],
453 453 "branch": "test-branch",
454 454 "date": [
455 455 0.0,
456 456 0
457 457 ],
458 458 "desc": "create test branch",
459 459 "node": "6ab967a8ab3489227a83f80e920faa039a71819f",
460 460 "parents": [
461 461 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
462 462 ],
463 463 "phase": "draft",
464 464 "tags": [],
465 465 "user": "test"
466 466 },
467 467 {
468 468 "bookmarks": [
469 469 "bookmark2"
470 470 ],
471 471 "branch": "default",
472 472 "date": [
473 473 0.0,
474 474 0
475 475 ],
476 476 "desc": "create tag2",
477 477 "node": "ceed296fe500c3fac9541e31dad860cb49c89e45",
478 478 "parents": [
479 479 "f2890a05fea49bfaf9fb27ed5490894eba32da78"
480 480 ],
481 481 "phase": "draft",
482 482 "tags": [],
483 483 "user": "test"
484 484 },
485 485 {
486 486 "bookmarks": [],
487 487 "branch": "default",
488 488 "date": [
489 489 0.0,
490 490 0
491 491 ],
492 492 "desc": "another commit to da/foo",
493 493 "node": "f2890a05fea49bfaf9fb27ed5490894eba32da78",
494 494 "parents": [
495 495 "93a8ce14f89156426b7fa981af8042da53f03aa0"
496 496 ],
497 497 "phase": "draft",
498 498 "tags": [
499 499 "tag2"
500 500 ],
501 501 "user": "test"
502 502 },
503 503 {
504 504 "bookmarks": [],
505 505 "branch": "default",
506 506 "date": [
507 507 0.0,
508 508 0
509 509 ],
510 510 "desc": "create tag",
511 511 "node": "93a8ce14f89156426b7fa981af8042da53f03aa0",
512 512 "parents": [
513 513 "78896eb0e102174ce9278438a95e12543e4367a7"
514 514 ],
515 515 "phase": "public",
516 516 "tags": [],
517 517 "user": "test"
518 518 },
519 519 {
520 520 "bookmarks": [],
521 521 "branch": "default",
522 522 "date": [
523 523 0.0,
524 524 0
525 525 ],
526 526 "desc": "move foo",
527 527 "node": "78896eb0e102174ce9278438a95e12543e4367a7",
528 528 "parents": [
529 529 "8d7c456572acf3557e8ed8a07286b10c408bcec5"
530 530 ],
531 531 "phase": "public",
532 532 "tags": [
533 533 "tag1"
534 534 ],
535 535 "user": "test"
536 536 },
537 537 {
538 538 "bookmarks": [
539 539 "bookmark1"
540 540 ],
541 541 "branch": "default",
542 542 "date": [
543 543 0.0,
544 544 0
545 545 ],
546 546 "desc": "modify da/foo",
547 547 "node": "8d7c456572acf3557e8ed8a07286b10c408bcec5",
548 548 "parents": [
549 549 "f8bbb9024b10f93cdbb8d940337398291d40dea8"
550 550 ],
551 551 "phase": "public",
552 552 "tags": [],
553 553 "user": "test"
554 554 },
555 555 {
556 556 "bookmarks": [],
557 557 "branch": "default",
558 558 "date": [
559 559 0.0,
560 560 0
561 561 ],
562 562 "desc": "modify foo",
563 563 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
564 564 "parents": [
565 565 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
566 566 ],
567 567 "phase": "public",
568 568 "tags": [],
569 569 "user": "test"
570 570 },
571 571 {
572 572 "bookmarks": [],
573 573 "branch": "default",
574 574 "date": [
575 575 0.0,
576 576 0
577 577 ],
578 578 "desc": "initial",
579 579 "node": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
580 580 "parents": [],
581 581 "phase": "public",
582 582 "tags": [],
583 583 "user": "test"
584 584 }
585 585 ],
586 586 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7"
587 587 }
588 588
589 589 changeset/ renders the tip changeset
590 590
591 591 $ request json-rev
592 592 200 Script output follows
593 593
594 594 {
595 595 "bookmarks": [],
596 596 "branch": "default",
597 597 "date": [
598 598 0.0,
599 599 0
600 600 ],
601 601 "desc": "merge test-branch into default",
602 602 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
603 603 "parents": [
604 604 "ceed296fe500c3fac9541e31dad860cb49c89e45",
605 605 "ed66c30e87eb65337c05a4229efaa5f1d5285a90"
606 606 ],
607 607 "phase": "draft",
608 608 "tags": [
609 609 "tip"
610 610 ],
611 611 "user": "test"
612 612 }
613 613
614 614 changeset/{revision} shows tags
615 615
616 616 $ request json-rev/78896eb0e102
617 617 200 Script output follows
618 618
619 619 {
620 620 "bookmarks": [],
621 621 "branch": "default",
622 622 "date": [
623 623 0.0,
624 624 0
625 625 ],
626 626 "desc": "move foo",
627 627 "node": "78896eb0e102174ce9278438a95e12543e4367a7",
628 628 "parents": [
629 629 "8d7c456572acf3557e8ed8a07286b10c408bcec5"
630 630 ],
631 631 "phase": "public",
632 632 "tags": [
633 633 "tag1"
634 634 ],
635 635 "user": "test"
636 636 }
637 637
638 638 changeset/{revision} shows bookmarks
639 639
640 640 $ request json-rev/8d7c456572ac
641 641 200 Script output follows
642 642
643 643 {
644 644 "bookmarks": [
645 645 "bookmark1"
646 646 ],
647 647 "branch": "default",
648 648 "date": [
649 649 0.0,
650 650 0
651 651 ],
652 652 "desc": "modify da/foo",
653 653 "node": "8d7c456572acf3557e8ed8a07286b10c408bcec5",
654 654 "parents": [
655 655 "f8bbb9024b10f93cdbb8d940337398291d40dea8"
656 656 ],
657 657 "phase": "public",
658 658 "tags": [],
659 659 "user": "test"
660 660 }
661 661
662 662 changeset/{revision} shows branches
663 663
664 664 $ request json-rev/6ab967a8ab34
665 665 200 Script output follows
666 666
667 667 {
668 668 "bookmarks": [],
669 669 "branch": "test-branch",
670 670 "date": [
671 671 0.0,
672 672 0
673 673 ],
674 674 "desc": "create test branch",
675 675 "node": "6ab967a8ab3489227a83f80e920faa039a71819f",
676 676 "parents": [
677 677 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
678 678 ],
679 679 "phase": "draft",
680 680 "tags": [],
681 681 "user": "test"
682 682 }
683 683
684 684 manifest/{revision}/{path} shows info about a directory at a revision
685 685
686 686 $ request json-manifest/06e557f3edf6/
687 687 200 Script output follows
688 688
689 689 {
690 690 "abspath": "/",
691 691 "bookmarks": [],
692 692 "directories": [
693 693 {
694 694 "abspath": "/da",
695 695 "basename": "da",
696 696 "emptydirs": ""
697 697 }
698 698 ],
699 699 "files": [
700 700 {
701 701 "abspath": "foo",
702 702 "basename": "foo",
703 703 "date": [
704 704 0.0,
705 705 0
706 706 ],
707 707 "flags": "",
708 708 "size": 4
709 709 }
710 710 ],
711 711 "node": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
712 712 "tags": []
713 713 }
714 714
715 715 tags/ shows tags info
716 716
717 717 $ request json-tags
718 718 200 Script output follows
719 719
720 720 {
721 721 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
722 722 "tags": [
723 723 {
724 724 "date": [
725 725 0.0,
726 726 0
727 727 ],
728 728 "node": "f2890a05fea49bfaf9fb27ed5490894eba32da78",
729 729 "tag": "tag2"
730 730 },
731 731 {
732 732 "date": [
733 733 0.0,
734 734 0
735 735 ],
736 736 "node": "78896eb0e102174ce9278438a95e12543e4367a7",
737 737 "tag": "tag1"
738 738 }
739 739 ]
740 740 }
741 741
742 742 bookmarks/ shows bookmarks info
743 743
744 744 $ request json-bookmarks
745 745 200 Script output follows
746 746
747 747 {
748 748 "bookmarks": [
749 749 {
750 750 "bookmark": "bookmark2",
751 751 "date": [
752 752 0.0,
753 753 0
754 754 ],
755 755 "node": "ceed296fe500c3fac9541e31dad860cb49c89e45"
756 756 },
757 757 {
758 758 "bookmark": "bookmark1",
759 759 "date": [
760 760 0.0,
761 761 0
762 762 ],
763 763 "node": "8d7c456572acf3557e8ed8a07286b10c408bcec5"
764 764 }
765 765 ],
766 766 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7"
767 767 }
768 768
769 769 branches/ shows branches info
770 770
771 771 $ request json-branches
772 772 200 Script output follows
773 773
774 774 {
775 775 "branches": [
776 776 {
777 777 "branch": "default",
778 778 "date": [
779 779 0.0,
780 780 0
781 781 ],
782 782 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
783 783 "status": "open"
784 784 },
785 785 {
786 786 "branch": "test-branch",
787 787 "date": [
788 788 0.0,
789 789 0
790 790 ],
791 791 "node": "ed66c30e87eb65337c05a4229efaa5f1d5285a90",
792 792 "status": "inactive"
793 793 }
794 794 ]
795 795 }
796 796
797 797 summary/ shows a summary of repository state
798 798
799 799 $ request json-summary
800 800 200 Script output follows
801 801
802 802 {
803 803 "archives": [],
804 804 "bookmarks": [
805 805 {
806 806 "bookmark": "bookmark2",
807 807 "date": [
808 808 0.0,
809 809 0
810 810 ],
811 811 "node": "ceed296fe500c3fac9541e31dad860cb49c89e45"
812 812 },
813 813 {
814 814 "bookmark": "bookmark1",
815 815 "date": [
816 816 0.0,
817 817 0
818 818 ],
819 819 "node": "8d7c456572acf3557e8ed8a07286b10c408bcec5"
820 820 }
821 821 ],
822 822 "branches": [
823 823 {
824 824 "branch": "default",
825 825 "date": [
826 826 0.0,
827 827 0
828 828 ],
829 829 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
830 830 "status": "open"
831 831 },
832 832 {
833 833 "branch": "test-branch",
834 834 "date": [
835 835 0.0,
836 836 0
837 837 ],
838 838 "node": "ed66c30e87eb65337c05a4229efaa5f1d5285a90",
839 839 "status": "inactive"
840 840 }
841 841 ],
842 842 "lastchange": [
843 843 0.0,
844 844 0
845 845 ],
846 846 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
847 847 "shortlog": [
848 848 {
849 849 "bookmarks": [],
850 850 "branch": "default",
851 851 "date": [
852 852 0.0,
853 853 0
854 854 ],
855 855 "desc": "merge test-branch into default",
856 856 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
857 857 "parents": [
858 858 "ceed296fe500c3fac9541e31dad860cb49c89e45",
859 859 "ed66c30e87eb65337c05a4229efaa5f1d5285a90"
860 860 ],
861 861 "phase": "draft",
862 862 "tags": [
863 863 "tip"
864 864 ],
865 865 "user": "test"
866 866 },
867 867 {
868 868 "bookmarks": [],
869 869 "branch": "test-branch",
870 870 "date": [
871 871 0.0,
872 872 0
873 873 ],
874 874 "desc": "another commit in test-branch",
875 875 "node": "ed66c30e87eb65337c05a4229efaa5f1d5285a90",
876 876 "parents": [
877 877 "6ab967a8ab3489227a83f80e920faa039a71819f"
878 878 ],
879 879 "phase": "draft",
880 880 "tags": [],
881 881 "user": "test"
882 882 },
883 883 {
884 884 "bookmarks": [],
885 885 "branch": "test-branch",
886 886 "date": [
887 887 0.0,
888 888 0
889 889 ],
890 890 "desc": "create test branch",
891 891 "node": "6ab967a8ab3489227a83f80e920faa039a71819f",
892 892 "parents": [
893 893 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
894 894 ],
895 895 "phase": "draft",
896 896 "tags": [],
897 897 "user": "test"
898 898 },
899 899 {
900 900 "bookmarks": [
901 901 "bookmark2"
902 902 ],
903 903 "branch": "default",
904 904 "date": [
905 905 0.0,
906 906 0
907 907 ],
908 908 "desc": "create tag2",
909 909 "node": "ceed296fe500c3fac9541e31dad860cb49c89e45",
910 910 "parents": [
911 911 "f2890a05fea49bfaf9fb27ed5490894eba32da78"
912 912 ],
913 913 "phase": "draft",
914 914 "tags": [],
915 915 "user": "test"
916 916 },
917 917 {
918 918 "bookmarks": [],
919 919 "branch": "default",
920 920 "date": [
921 921 0.0,
922 922 0
923 923 ],
924 924 "desc": "another commit to da/foo",
925 925 "node": "f2890a05fea49bfaf9fb27ed5490894eba32da78",
926 926 "parents": [
927 927 "93a8ce14f89156426b7fa981af8042da53f03aa0"
928 928 ],
929 929 "phase": "draft",
930 930 "tags": [
931 931 "tag2"
932 932 ],
933 933 "user": "test"
934 934 },
935 935 {
936 936 "bookmarks": [],
937 937 "branch": "default",
938 938 "date": [
939 939 0.0,
940 940 0
941 941 ],
942 942 "desc": "create tag",
943 943 "node": "93a8ce14f89156426b7fa981af8042da53f03aa0",
944 944 "parents": [
945 945 "78896eb0e102174ce9278438a95e12543e4367a7"
946 946 ],
947 947 "phase": "public",
948 948 "tags": [],
949 949 "user": "test"
950 950 },
951 951 {
952 952 "bookmarks": [],
953 953 "branch": "default",
954 954 "date": [
955 955 0.0,
956 956 0
957 957 ],
958 958 "desc": "move foo",
959 959 "node": "78896eb0e102174ce9278438a95e12543e4367a7",
960 960 "parents": [
961 961 "8d7c456572acf3557e8ed8a07286b10c408bcec5"
962 962 ],
963 963 "phase": "public",
964 964 "tags": [
965 965 "tag1"
966 966 ],
967 967 "user": "test"
968 968 },
969 969 {
970 970 "bookmarks": [
971 971 "bookmark1"
972 972 ],
973 973 "branch": "default",
974 974 "date": [
975 975 0.0,
976 976 0
977 977 ],
978 978 "desc": "modify da/foo",
979 979 "node": "8d7c456572acf3557e8ed8a07286b10c408bcec5",
980 980 "parents": [
981 981 "f8bbb9024b10f93cdbb8d940337398291d40dea8"
982 982 ],
983 983 "phase": "public",
984 984 "tags": [],
985 985 "user": "test"
986 986 },
987 987 {
988 988 "bookmarks": [],
989 989 "branch": "default",
990 990 "date": [
991 991 0.0,
992 992 0
993 993 ],
994 994 "desc": "modify foo",
995 995 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
996 996 "parents": [
997 997 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
998 998 ],
999 999 "phase": "public",
1000 1000 "tags": [],
1001 1001 "user": "test"
1002 1002 },
1003 1003 {
1004 1004 "bookmarks": [],
1005 1005 "branch": "default",
1006 1006 "date": [
1007 1007 0.0,
1008 1008 0
1009 1009 ],
1010 1010 "desc": "initial",
1011 1011 "node": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
1012 1012 "parents": [],
1013 1013 "phase": "public",
1014 1014 "tags": [],
1015 1015 "user": "test"
1016 1016 }
1017 1017 ],
1018 1018 "tags": [
1019 1019 {
1020 1020 "date": [
1021 1021 0.0,
1022 1022 0
1023 1023 ],
1024 1024 "node": "f2890a05fea49bfaf9fb27ed5490894eba32da78",
1025 1025 "tag": "tag2"
1026 1026 },
1027 1027 {
1028 1028 "date": [
1029 1029 0.0,
1030 1030 0
1031 1031 ],
1032 1032 "node": "78896eb0e102174ce9278438a95e12543e4367a7",
1033 1033 "tag": "tag1"
1034 1034 }
1035 1035 ]
1036 1036 }
1037 1037
1038 $ request json-changelog?rev=create
1039 200 Script output follows
1040
1041 {
1042 "entries": [
1043 {
1044 "bookmarks": [],
1045 "branch": "test-branch",
1046 "date": [
1047 0.0,
1048 0
1049 ],
1050 "desc": "create test branch",
1051 "node": "6ab967a8ab3489227a83f80e920faa039a71819f",
1052 "parents": [
1053 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
1054 ],
1055 "phase": "draft",
1056 "tags": [],
1057 "user": "test"
1058 },
1059 {
1060 "bookmarks": [
1061 "bookmark2"
1062 ],
1063 "branch": "default",
1064 "date": [
1065 0.0,
1066 0
1067 ],
1068 "desc": "create tag2",
1069 "node": "ceed296fe500c3fac9541e31dad860cb49c89e45",
1070 "parents": [
1071 "f2890a05fea49bfaf9fb27ed5490894eba32da78"
1072 ],
1073 "phase": "draft",
1074 "tags": [],
1075 "user": "test"
1076 },
1077 {
1078 "bookmarks": [],
1079 "branch": "default",
1080 "date": [
1081 0.0,
1082 0
1083 ],
1084 "desc": "create tag",
1085 "node": "93a8ce14f89156426b7fa981af8042da53f03aa0",
1086 "parents": [
1087 "78896eb0e102174ce9278438a95e12543e4367a7"
1088 ],
1089 "phase": "public",
1090 "tags": [],
1091 "user": "test"
1092 }
1093 ],
1094 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
1095 "query": "create"
1096 }
1097
1038 1098 filediff/{revision}/{path} shows changes to a file in a revision
1039 1099
1040 1100 $ request json-diff/f8bbb9024b10/foo
1041 1101 200 Script output follows
1042 1102
1043 1103 {
1044 1104 "author": "test",
1045 1105 "children": [],
1046 1106 "date": [
1047 1107 0.0,
1048 1108 0
1049 1109 ],
1050 1110 "desc": "modify foo",
1051 1111 "diff": [
1052 1112 {
1053 1113 "blockno": 1,
1054 1114 "lines": [
1055 1115 {
1056 1116 "l": "--- a/foo\tThu Jan 01 00:00:00 1970 +0000\n",
1057 1117 "n": 1,
1058 1118 "t": "-"
1059 1119 },
1060 1120 {
1061 1121 "l": "+++ b/foo\tThu Jan 01 00:00:00 1970 +0000\n",
1062 1122 "n": 2,
1063 1123 "t": "+"
1064 1124 },
1065 1125 {
1066 1126 "l": "@@ -1,1 +1,1 @@\n",
1067 1127 "n": 3,
1068 1128 "t": "@"
1069 1129 },
1070 1130 {
1071 1131 "l": "-foo\n",
1072 1132 "n": 4,
1073 1133 "t": "-"
1074 1134 },
1075 1135 {
1076 1136 "l": "+bar\n",
1077 1137 "n": 5,
1078 1138 "t": "+"
1079 1139 }
1080 1140 ]
1081 1141 }
1082 1142 ],
1083 1143 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
1084 1144 "parents": [
1085 1145 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
1086 1146 ],
1087 1147 "path": "foo"
1088 1148 }
1089 1149
1090 1150 comparison/{revision}/{path} shows information about before and after for a file
1091 1151
1092 1152 $ request json-comparison/f8bbb9024b10/foo
1093 1153 200 Script output follows
1094 1154
1095 1155 {
1096 1156 "author": "test",
1097 1157 "children": [],
1098 1158 "comparison": [
1099 1159 {
1100 1160 "lines": [
1101 1161 {
1102 1162 "ll": "foo",
1103 1163 "ln": 1,
1104 1164 "rl": "bar",
1105 1165 "rn": 1,
1106 1166 "t": "replace"
1107 1167 }
1108 1168 ]
1109 1169 }
1110 1170 ],
1111 1171 "date": [
1112 1172 0.0,
1113 1173 0
1114 1174 ],
1115 1175 "desc": "modify foo",
1116 1176 "leftnode": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
1117 1177 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
1118 1178 "parents": [
1119 1179 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
1120 1180 ],
1121 1181 "path": "foo",
1122 1182 "rightnode": "f8bbb9024b10f93cdbb8d940337398291d40dea8"
1123 1183 }
1124 1184
1125 1185 annotate/{revision}/{path} shows annotations for each line
1126 1186
1127 1187 $ request json-annotate/f8bbb9024b10/foo
1128 1188 200 Script output follows
1129 1189
1130 1190 {
1131 1191 "abspath": "foo",
1132 1192 "annotate": [
1133 1193 {
1134 1194 "abspath": "foo",
1135 1195 "author": "test",
1136 1196 "desc": "modify foo",
1137 1197 "line": "bar\n",
1138 1198 "lineno": 1,
1139 1199 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
1140 1200 "revdate": [
1141 1201 0.0,
1142 1202 0
1143 1203 ],
1144 1204 "targetline": 1
1145 1205 }
1146 1206 ],
1147 1207 "author": "test",
1148 1208 "children": [],
1149 1209 "date": [
1150 1210 0.0,
1151 1211 0
1152 1212 ],
1153 1213 "desc": "modify foo",
1154 1214 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
1155 1215 "parents": [
1156 1216 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
1157 1217 ],
1158 1218 "permissions": ""
1159 1219 }
1160 1220
1161 1221 filelog/{revision}/{path} shows history of a single file
1162 1222
1163 1223 $ request json-filelog/f8bbb9024b10/foo
1164 1224 200 Script output follows
1165 1225
1166 1226 {
1167 1227 "entries": [
1168 1228 {
1169 1229 "bookmarks": [],
1170 1230 "branch": "default",
1171 1231 "date": [
1172 1232 0.0,
1173 1233 0
1174 1234 ],
1175 1235 "desc": "modify foo",
1176 1236 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
1177 1237 "parents": [
1178 1238 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
1179 1239 ],
1180 1240 "phase": "public",
1181 1241 "tags": [],
1182 1242 "user": "test"
1183 1243 },
1184 1244 {
1185 1245 "bookmarks": [],
1186 1246 "branch": "default",
1187 1247 "date": [
1188 1248 0.0,
1189 1249 0
1190 1250 ],
1191 1251 "desc": "initial",
1192 1252 "node": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
1193 1253 "parents": [],
1194 1254 "phase": "public",
1195 1255 "tags": [],
1196 1256 "user": "test"
1197 1257 }
1198 1258 ]
1199 1259 }
1200 1260
1201 1261 $ request json-filelog/cc725e08502a/da/foo
1202 1262 200 Script output follows
1203 1263
1204 1264 {
1205 1265 "entries": [
1206 1266 {
1207 1267 "bookmarks": [],
1208 1268 "branch": "default",
1209 1269 "date": [
1210 1270 0.0,
1211 1271 0
1212 1272 ],
1213 1273 "desc": "another commit to da/foo",
1214 1274 "node": "f2890a05fea49bfaf9fb27ed5490894eba32da78",
1215 1275 "parents": [
1216 1276 "8d7c456572acf3557e8ed8a07286b10c408bcec5"
1217 1277 ],
1218 1278 "phase": "draft",
1219 1279 "tags": [
1220 1280 "tag2"
1221 1281 ],
1222 1282 "user": "test"
1223 1283 },
1224 1284 {
1225 1285 "bookmarks": [
1226 1286 "bookmark1"
1227 1287 ],
1228 1288 "branch": "default",
1229 1289 "date": [
1230 1290 0.0,
1231 1291 0
1232 1292 ],
1233 1293 "desc": "modify da/foo",
1234 1294 "node": "8d7c456572acf3557e8ed8a07286b10c408bcec5",
1235 1295 "parents": [
1236 1296 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
1237 1297 ],
1238 1298 "phase": "public",
1239 1299 "tags": [],
1240 1300 "user": "test"
1241 1301 },
1242 1302 {
1243 1303 "bookmarks": [],
1244 1304 "branch": "default",
1245 1305 "date": [
1246 1306 0.0,
1247 1307 0
1248 1308 ],
1249 1309 "desc": "initial",
1250 1310 "node": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
1251 1311 "parents": [],
1252 1312 "phase": "public",
1253 1313 "tags": [],
1254 1314 "user": "test"
1255 1315 }
1256 1316 ]
1257 1317 }
1258 1318
1259 1319 (archive/ doesn't use templating, so ignore it)
1260 1320
1261 1321 (static/ doesn't use templating, so ignore it)
1262 1322
1263 1323 graph/ shows information that can be used to render a graph of the DAG
1264 1324
1265 1325 $ request json-graph
1266 1326 200 Script output follows
1267 1327
1268 1328 "not yet implemented"
1269 1329
1270 1330 help/ shows help topics
1271 1331
1272 1332 $ request json-help
1273 1333 200 Script output follows
1274 1334
1275 1335 {
1276 1336 "earlycommands": [
1277 1337 {
1278 1338 "summary": "add the specified files on the next commit",
1279 1339 "topic": "add"
1280 1340 },
1281 1341 {
1282 1342 "summary": "show changeset information by line for each file",
1283 1343 "topic": "annotate"
1284 1344 },
1285 1345 {
1286 1346 "summary": "make a copy of an existing repository",
1287 1347 "topic": "clone"
1288 1348 },
1289 1349 {
1290 1350 "summary": "commit the specified files or all outstanding changes",
1291 1351 "topic": "commit"
1292 1352 },
1293 1353 {
1294 1354 "summary": "diff repository (or selected files)",
1295 1355 "topic": "diff"
1296 1356 },
1297 1357 {
1298 1358 "summary": "dump the header and diffs for one or more changesets",
1299 1359 "topic": "export"
1300 1360 },
1301 1361 {
1302 1362 "summary": "forget the specified files on the next commit",
1303 1363 "topic": "forget"
1304 1364 },
1305 1365 {
1306 1366 "summary": "create a new repository in the given directory",
1307 1367 "topic": "init"
1308 1368 },
1309 1369 {
1310 1370 "summary": "show revision history of entire repository or files",
1311 1371 "topic": "log"
1312 1372 },
1313 1373 {
1314 1374 "summary": "merge another revision into working directory",
1315 1375 "topic": "merge"
1316 1376 },
1317 1377 {
1318 1378 "summary": "pull changes from the specified source",
1319 1379 "topic": "pull"
1320 1380 },
1321 1381 {
1322 1382 "summary": "push changes to the specified destination",
1323 1383 "topic": "push"
1324 1384 },
1325 1385 {
1326 1386 "summary": "remove the specified files on the next commit",
1327 1387 "topic": "remove"
1328 1388 },
1329 1389 {
1330 1390 "summary": "start stand-alone webserver",
1331 1391 "topic": "serve"
1332 1392 },
1333 1393 {
1334 1394 "summary": "show changed files in the working directory",
1335 1395 "topic": "status"
1336 1396 },
1337 1397 {
1338 1398 "summary": "summarize working directory state",
1339 1399 "topic": "summary"
1340 1400 },
1341 1401 {
1342 1402 "summary": "update working directory (or switch revisions)",
1343 1403 "topic": "update"
1344 1404 }
1345 1405 ],
1346 1406 "othercommands": [
1347 1407 {
1348 1408 "summary": "add all new files, delete all missing files",
1349 1409 "topic": "addremove"
1350 1410 },
1351 1411 {
1352 1412 "summary": "create an unversioned archive of a repository revision",
1353 1413 "topic": "archive"
1354 1414 },
1355 1415 {
1356 1416 "summary": "reverse effect of earlier changeset",
1357 1417 "topic": "backout"
1358 1418 },
1359 1419 {
1360 1420 "summary": "subdivision search of changesets",
1361 1421 "topic": "bisect"
1362 1422 },
1363 1423 {
1364 1424 "summary": "create a new bookmark or list existing bookmarks",
1365 1425 "topic": "bookmarks"
1366 1426 },
1367 1427 {
1368 1428 "summary": "set or show the current branch name",
1369 1429 "topic": "branch"
1370 1430 },
1371 1431 {
1372 1432 "summary": "list repository named branches",
1373 1433 "topic": "branches"
1374 1434 },
1375 1435 {
1376 1436 "summary": "create a changegroup file",
1377 1437 "topic": "bundle"
1378 1438 },
1379 1439 {
1380 1440 "summary": "output the current or given revision of files",
1381 1441 "topic": "cat"
1382 1442 },
1383 1443 {
1384 1444 "summary": "show combined config settings from all hgrc files",
1385 1445 "topic": "config"
1386 1446 },
1387 1447 {
1388 1448 "summary": "mark files as copied for the next commit",
1389 1449 "topic": "copy"
1390 1450 },
1391 1451 {
1392 1452 "summary": "list tracked files",
1393 1453 "topic": "files"
1394 1454 },
1395 1455 {
1396 1456 "summary": "copy changes from other branches onto the current branch",
1397 1457 "topic": "graft"
1398 1458 },
1399 1459 {
1400 1460 "summary": "search for a pattern in specified files and revisions",
1401 1461 "topic": "grep"
1402 1462 },
1403 1463 {
1404 1464 "summary": "show branch heads",
1405 1465 "topic": "heads"
1406 1466 },
1407 1467 {
1408 1468 "summary": "show help for a given topic or a help overview",
1409 1469 "topic": "help"
1410 1470 },
1411 1471 {
1412 1472 "summary": "identify the working directory or specified revision",
1413 1473 "topic": "identify"
1414 1474 },
1415 1475 {
1416 1476 "summary": "import an ordered set of patches",
1417 1477 "topic": "import"
1418 1478 },
1419 1479 {
1420 1480 "summary": "show new changesets found in source",
1421 1481 "topic": "incoming"
1422 1482 },
1423 1483 {
1424 1484 "summary": "output the current or given revision of the project manifest",
1425 1485 "topic": "manifest"
1426 1486 },
1427 1487 {
1428 1488 "summary": "show changesets not found in the destination",
1429 1489 "topic": "outgoing"
1430 1490 },
1431 1491 {
1432 1492 "summary": "show aliases for remote repositories",
1433 1493 "topic": "paths"
1434 1494 },
1435 1495 {
1436 1496 "summary": "set or show the current phase name",
1437 1497 "topic": "phase"
1438 1498 },
1439 1499 {
1440 1500 "summary": "roll back an interrupted transaction",
1441 1501 "topic": "recover"
1442 1502 },
1443 1503 {
1444 1504 "summary": "rename files; equivalent of copy + remove",
1445 1505 "topic": "rename"
1446 1506 },
1447 1507 {
1448 1508 "summary": "redo merges or set/view the merge status of files",
1449 1509 "topic": "resolve"
1450 1510 },
1451 1511 {
1452 1512 "summary": "restore files to their checkout state",
1453 1513 "topic": "revert"
1454 1514 },
1455 1515 {
1456 1516 "summary": "print the root (top) of the current working directory",
1457 1517 "topic": "root"
1458 1518 },
1459 1519 {
1460 1520 "summary": "add one or more tags for the current or given revision",
1461 1521 "topic": "tag"
1462 1522 },
1463 1523 {
1464 1524 "summary": "list repository tags",
1465 1525 "topic": "tags"
1466 1526 },
1467 1527 {
1468 1528 "summary": "apply one or more changegroup files",
1469 1529 "topic": "unbundle"
1470 1530 },
1471 1531 {
1472 1532 "summary": "verify the integrity of the repository",
1473 1533 "topic": "verify"
1474 1534 },
1475 1535 {
1476 1536 "summary": "output version and copyright information",
1477 1537 "topic": "version"
1478 1538 }
1479 1539 ],
1480 1540 "topics": [
1481 1541 {
1482 1542 "summary": "Configuration Files",
1483 1543 "topic": "config"
1484 1544 },
1485 1545 {
1486 1546 "summary": "Date Formats",
1487 1547 "topic": "dates"
1488 1548 },
1489 1549 {
1490 1550 "summary": "Diff Formats",
1491 1551 "topic": "diffs"
1492 1552 },
1493 1553 {
1494 1554 "summary": "Environment Variables",
1495 1555 "topic": "environment"
1496 1556 },
1497 1557 {
1498 1558 "summary": "Using Additional Features",
1499 1559 "topic": "extensions"
1500 1560 },
1501 1561 {
1502 1562 "summary": "Specifying File Sets",
1503 1563 "topic": "filesets"
1504 1564 },
1505 1565 {
1506 1566 "summary": "Glossary",
1507 1567 "topic": "glossary"
1508 1568 },
1509 1569 {
1510 1570 "summary": "Syntax for Mercurial Ignore Files",
1511 1571 "topic": "hgignore"
1512 1572 },
1513 1573 {
1514 1574 "summary": "Configuring hgweb",
1515 1575 "topic": "hgweb"
1516 1576 },
1517 1577 {
1518 1578 "summary": "Technical implementation topics",
1519 1579 "topic": "internals"
1520 1580 },
1521 1581 {
1522 1582 "summary": "Merge Tools",
1523 1583 "topic": "merge-tools"
1524 1584 },
1525 1585 {
1526 1586 "summary": "Specifying Multiple Revisions",
1527 1587 "topic": "multirevs"
1528 1588 },
1529 1589 {
1530 1590 "summary": "File Name Patterns",
1531 1591 "topic": "patterns"
1532 1592 },
1533 1593 {
1534 1594 "summary": "Working with Phases",
1535 1595 "topic": "phases"
1536 1596 },
1537 1597 {
1538 1598 "summary": "Specifying Single Revisions",
1539 1599 "topic": "revisions"
1540 1600 },
1541 1601 {
1542 1602 "summary": "Specifying Revision Sets",
1543 1603 "topic": "revsets"
1544 1604 },
1545 1605 {
1546 1606 "summary": "Using Mercurial from scripts and automation",
1547 1607 "topic": "scripting"
1548 1608 },
1549 1609 {
1550 1610 "summary": "Subrepositories",
1551 1611 "topic": "subrepos"
1552 1612 },
1553 1613 {
1554 1614 "summary": "Template Usage",
1555 1615 "topic": "templating"
1556 1616 },
1557 1617 {
1558 1618 "summary": "URL Paths",
1559 1619 "topic": "urls"
1560 1620 }
1561 1621 ]
1562 1622 }
1563 1623
1564 1624 help/{topic} shows an individual help topic
1565 1625
1566 1626 $ request json-help/phases
1567 1627 200 Script output follows
1568 1628
1569 1629 {
1570 1630 "rawdoc": "Working with Phases\n*", (glob)
1571 1631 "topic": "phases"
1572 1632 }
General Comments 0
You need to be logged in to leave comments. Login now