##// END OF EJS Templates
hgweb: add "children" into the JSON template for a changeset...
Manuel Jacob -
r51257:c0fbd63d default
parent child Browse files
Show More
@@ -1,251 +1,252 b''
1 1 default = 'shortlog'
2 2 mimetype = 'application/json'
3 3
4 4 filerevision = '\{
5 5 "node": {node|json},
6 6 "path": {file|json},
7 7 "date": {date|json},
8 8 "desc": {desc|utf8|json},
9 9 "branch": {if(branch, branch%changesetbranch, "default"|json)},
10 10 "bookmarks": [{join(bookmarks%changelistentryname, ", ")}],
11 11 "tags": [{join(tags%changelistentryname, ", ")}],
12 12 "user": {author|utf8|json},
13 13 "parents": [{join(parent%changesetparent, ", ")}],
14 14 "phase": {phase|json},
15 15 "lines": [{join(text%lineentry, ", ")}]
16 16 }'
17 17 lineentry = '\{
18 18 "line": {line|json}
19 19 }'
20 20 search = '\{
21 21 "node": {node|json},
22 22 "query": {query|json},
23 23 "entries": [{join(entries%changelistentry, ", ")}]
24 24 }'
25 25 # changelog and shortlog are the same web API but with different
26 26 # number of entries.
27 27 changelog = changelist.tmpl
28 28 shortlog = changelist.tmpl
29 29 graph = graph.tmpl
30 30 changelistentry = '\{
31 31 "node": {node|json},
32 32 "date": {date|json},
33 33 "desc": {desc|utf8|json},
34 34 "branch": {if(branch, branch%changesetbranch, "default"|json)},
35 35 "bookmarks": [{join(bookmarks%changelistentryname, ", ")}],
36 36 "tags": [{join(tags%changelistentryname, ", ")}],
37 37 "user": {author|utf8|json},
38 38 "phase": {phase|json},
39 39 "parents": [{if(allparents, join(allparents%changesetparent, ", "),
40 40 join(parent%changesetparent, ", "))}]
41 41 }'
42 42 graphentry = '\{
43 43 "node": {node|json},
44 44 "date": {date|json},
45 45 "desc": {desc|utf8|json},
46 46 "branch": {if(branch, branch%changesetbranch, "default"|json)},
47 47 "bookmarks": [{join(bookmarks%changelistentryname, ", ")}],
48 48 "tags": [{join(tags%changelistentryname, ", ")}],
49 49 "user": {author|utf8|json},
50 50 "phase": {phase|json},
51 51 "col": {col|json},
52 52 "row": {row|json},
53 53 "color": {color|json},
54 54 "edges": {edges|json},
55 55 "parents": [{if(allparents, join(allparents%changesetparent, ", "),
56 56 join(parent%changesetparent, ", "))}]
57 57 }'
58 58 changelistentryname = '{name|utf8|json}'
59 59 changeset = '\{
60 60 "node": {node|json},
61 61 "date": {date|json},
62 62 "desc": {desc|utf8|json},
63 63 "branch": {if(branch, branch%changesetbranch, "default"|json)},
64 64 "bookmarks": [{join(changesetbookmark, ", ")}],
65 65 "tags": [{join(changesettag, ", ")}],
66 66 "user": {author|utf8|json},
67 67 "parents": [{join(parent%changesetparent, ", ")}],
68 "children": [{join(child%changesetparent, ", ")}],
68 69 "files": [{join(files, ", ")}],
69 70 "diff": [{join(diff, ", ")}],
70 71 "phase": {phase|json}
71 72 }'
72 73 changesetbranch = '{name|utf8|json}'
73 74 changesetbookmark = '{bookmark|utf8|json}'
74 75 changesettag = '{tag|utf8|json}'
75 76 changesetparent = '{node|json}'
76 77 manifest = '\{
77 78 "node": {node|json},
78 79 "abspath": {path|json},
79 80 "directories": [{join(dentries%direntry, ", ")}],
80 81 "files": [{join(fentries%fileentry, ", ")}],
81 82 "bookmarks": [{join(bookmarks%name, ", ")}],
82 83 "tags": [{join(tags%name, ", ")}]
83 84 }'
84 85 name = '{name|utf8|json}'
85 86 direntry = '\{
86 87 "abspath": {path|json},
87 88 "basename": {basename|json},
88 89 "emptydirs": {emptydirs|json}
89 90 }'
90 91 fileentry = '\{
91 92 "abspath": {file|json},
92 93 "basename": {basename|json},
93 94 "date": {date|json},
94 95 "size": {size|json},
95 96 "flags": {permissions|json}
96 97 }'
97 98 tags = '\{
98 99 "node": {node|json},
99 100 "tags": [{join(entriesnotip%tagentry, ", ")}]
100 101 }'
101 102 tagentry = '\{
102 103 "tag": {tag|utf8|json},
103 104 "node": {node|json},
104 105 "date": {date|json}
105 106 }'
106 107 bookmarks = '\{
107 108 "node": {node|json},
108 109 "bookmarks": [{join(entries%bookmarkentry, ", ")}]
109 110 }'
110 111 bookmarkentry = '\{
111 112 "bookmark": {bookmark|utf8|json},
112 113 "node": {node|json},
113 114 "date": {date|json}
114 115 }'
115 116 branches = '\{
116 117 "branches": [{join(entries%branchentry, ", ")}]
117 118 }'
118 119 branchentry = '\{
119 120 "branch": {branch|utf8|json},
120 121 "node": {node|json},
121 122 "date": {date|json},
122 123 "status": {status|json}
123 124 }'
124 125 shortlogentry = '{changelistentry}'
125 126 summary = '\{
126 127 "node": {node|json},
127 128 "lastchange": {lastchange|json},
128 129 "bookmarks": [{join(bookmarks%bookmarkentry, ", ")}],
129 130 "branches": [{join(branches%branchentry, ", ")}],
130 131 "shortlog": [{join(shortlog%shortlogentry, ", ")}],
131 132 "tags": [{join(tags%tagentry, ", ")}],
132 133 "archives": [{join(archives%archiveentry, ", ")}],
133 134 "labels": {labels|json}
134 135 }'
135 136 archiveentry = '\{
136 137 "node": {node|json},
137 138 "extension": {extension|json},
138 139 "type": {type|json},
139 140 "url": {"{urlbase}{url}archive/{node}{extension}"|json}
140 141 }'
141 142 filediff = '\{
142 143 "path": {file|json},
143 144 "node": {node|json},
144 145 "date": {date|json},
145 146 "desc": {desc|utf8|json},
146 147 "author": {author|utf8|json},
147 148 "parents": [{join(parent%changesetparent, ", ")}],
148 149 "children": [{join(child%changesetparent, ", ")}],
149 150 "diff": [{join(diff, ", ")}]
150 151 }'
151 152 diffblock = '\{
152 153 "blockno": {blockno|json},
153 154 "lines": [{join(lines, ", ")}]
154 155 }'
155 156 difflineplus = '\{
156 157 "t": "+",
157 158 "n": {lineno|json},
158 159 "l": {line|json}
159 160 }'
160 161 difflineminus = '\{
161 162 "t": "-",
162 163 "n": {lineno|json},
163 164 "l": {line|json}
164 165 }'
165 166 difflineat = '\{
166 167 "t": "@",
167 168 "n": {lineno|json},
168 169 "l": {line|json}
169 170 }'
170 171 diffline = '\{
171 172 "t": "",
172 173 "n": {lineno|json},
173 174 "l": {line|json}
174 175 }'
175 176 filecomparison = '\{
176 177 "path": {file|json},
177 178 "node": {node|json},
178 179 "date": {date|json},
179 180 "desc": {desc|utf8|json},
180 181 "author": {author|utf8|json},
181 182 "parents": [{join(parent%changesetparent, ", ")}],
182 183 "children": [{join(child%changesetparent, ", ")}],
183 184 "leftnode": {leftnode|json},
184 185 "rightnode": {rightnode|json},
185 186 "comparison": [{join(comparison, ", ")}]
186 187 }'
187 188 comparisonblock = '\{
188 189 "lines": [{join(lines, ", ")}]
189 190 }'
190 191 comparisonline = '\{
191 192 "t": {type|json},
192 193 "ln": {leftlineno|json},
193 194 "ll": {leftline|json},
194 195 "rn": {rightlineno|json},
195 196 "rl": {rightline|json}
196 197 }'
197 198 fileannotate = '\{
198 199 "abspath": {file|json},
199 200 "node": {node|json},
200 201 "author": {author|utf8|json},
201 202 "date": {date|json},
202 203 "desc": {desc|utf8|json},
203 204 "parents": [{join(parent%changesetparent, ", ")}],
204 205 "children": [{join(child%changesetparent, ", ")}],
205 206 "permissions": {permissions|json},
206 207 "annotate": [{join(annotate%fileannotation, ", ")}]
207 208 }'
208 209 fileannotation = '\{
209 210 "node": {node|json},
210 211 "author": {author|utf8|json},
211 212 "desc": {desc|utf8|json},
212 213 "abspath": {file|json},
213 214 "targetline": {targetline|json},
214 215 "line": {line|json},
215 216 "lineno": {lineno|json},
216 217 "revdate": {revdate|json}
217 218 }'
218 219 filelog = '\{
219 220 "entries": [{join(entries%changelistentry, ", ")}]
220 221 }'
221 222 helptopics = '\{
222 223 "topics": [{join(topics%helptopicentry, ", ")}],
223 224 "earlycommands": [{join(earlycommands%helptopicentry, ", ")}],
224 225 "othercommands": [{join(othercommands%helptopicentry, ", ")}]
225 226 }'
226 227 helptopicentry = '\{
227 228 "topic": {topic|utf8|json},
228 229 "summary": {summary|utf8|json}
229 230 }'
230 231 help = '\{
231 232 "topic": {topic|utf8|json},
232 233 "rawdoc": {doc|utf8|json}
233 234 }'
234 235 filenodelink = '\{
235 236 "file": {file|json},
236 237 "status": {status|json}
237 238 }'
238 239 filenolink = '{filenodelink}'
239 240 index = '\{
240 241 "entries": [{join(entries%indexentry, ", ")}]
241 242 }'
242 243 indexentry = '\{
243 244 "name": {name|utf8|json},
244 245 "description": {description|utf8|json},
245 246 "contact": {contact|utf8|json},
246 247 "lastchange": {lastchange|json},
247 248 "labels": {labels|json}
248 249 }'
249 250 error = '\{
250 251 "error": {error|utf8|json}
251 252 }'
@@ -1,2393 +1,2403 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 $ echo '[web]' >> .hg/hgrc
104 104 $ echo 'allow-archive = bz2' >> .hg/hgrc
105 105 $ hg serve -p $HGPORT -d --pid-file=hg.pid -A access.log -E error.log
106 106 $ cat hg.pid >> $DAEMON_PIDS
107 107
108 108 (Try to keep these in roughly the order they are defined in webcommands.py)
109 109
110 110 (log is handled by filelog/ and changelog/ - ignore it)
111 111
112 112 (rawfile/ doesn't use templating - nothing to test)
113 113
114 114 file/{revision}/{path} shows file revision
115 115
116 116 $ request json-file/78896eb0e102/foo-new
117 117 200 Script output follows
118 118
119 119 {
120 120 "bookmarks": [],
121 121 "branch": "default",
122 122 "date": [
123 123 0.0,
124 124 0
125 125 ],
126 126 "desc": "move foo",
127 127 "lines": [
128 128 {
129 129 "line": "bar\n"
130 130 }
131 131 ],
132 132 "node": "78896eb0e102174ce9278438a95e12543e4367a7",
133 133 "parents": [
134 134 "f8bbb9024b10f93cdbb8d940337398291d40dea8"
135 135 ],
136 136 "path": "foo-new",
137 137 "phase": "public",
138 138 "tags": [
139 139 "tag1"
140 140 ],
141 141 "user": "test"
142 142 }
143 143
144 144 file/{revision} shows root directory info
145 145
146 146 $ request json-file/cc725e08502a
147 147 200 Script output follows
148 148
149 149 {
150 150 "abspath": "/",
151 151 "bookmarks": [],
152 152 "directories": [
153 153 {
154 154 "abspath": "/da",
155 155 "basename": "da",
156 156 "emptydirs": ""
157 157 }
158 158 ],
159 159 "files": [
160 160 {
161 161 "abspath": ".hgtags",
162 162 "basename": ".hgtags",
163 163 "date": [
164 164 0.0,
165 165 0
166 166 ],
167 167 "flags": "",
168 168 "size": 92
169 169 },
170 170 {
171 171 "abspath": "foo-new",
172 172 "basename": "foo-new",
173 173 "date": [
174 174 0.0,
175 175 0
176 176 ],
177 177 "flags": "",
178 178 "size": 4
179 179 }
180 180 ],
181 181 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
182 182 "tags": [
183 183 "tip"
184 184 ]
185 185 }
186 186
187 187 changelog/ shows information about several changesets
188 188
189 189 $ request json-changelog
190 190 200 Script output follows
191 191
192 192 {
193 193 "changeset_count": 10,
194 194 "changesets": [
195 195 {
196 196 "bookmarks": [],
197 197 "branch": "default",
198 198 "date": [
199 199 0.0,
200 200 0
201 201 ],
202 202 "desc": "merge test-branch into default",
203 203 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
204 204 "parents": [
205 205 "ceed296fe500c3fac9541e31dad860cb49c89e45",
206 206 "ed66c30e87eb65337c05a4229efaa5f1d5285a90"
207 207 ],
208 208 "phase": "draft",
209 209 "tags": [
210 210 "tip"
211 211 ],
212 212 "user": "test"
213 213 },
214 214 {
215 215 "bookmarks": [],
216 216 "branch": "test-branch",
217 217 "date": [
218 218 0.0,
219 219 0
220 220 ],
221 221 "desc": "another commit in test-branch",
222 222 "node": "ed66c30e87eb65337c05a4229efaa5f1d5285a90",
223 223 "parents": [
224 224 "6ab967a8ab3489227a83f80e920faa039a71819f"
225 225 ],
226 226 "phase": "draft",
227 227 "tags": [],
228 228 "user": "test"
229 229 },
230 230 {
231 231 "bookmarks": [],
232 232 "branch": "test-branch",
233 233 "date": [
234 234 0.0,
235 235 0
236 236 ],
237 237 "desc": "create test branch",
238 238 "node": "6ab967a8ab3489227a83f80e920faa039a71819f",
239 239 "parents": [
240 240 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
241 241 ],
242 242 "phase": "draft",
243 243 "tags": [],
244 244 "user": "test"
245 245 },
246 246 {
247 247 "bookmarks": [
248 248 "bookmark2"
249 249 ],
250 250 "branch": "default",
251 251 "date": [
252 252 0.0,
253 253 0
254 254 ],
255 255 "desc": "create tag2",
256 256 "node": "ceed296fe500c3fac9541e31dad860cb49c89e45",
257 257 "parents": [
258 258 "f2890a05fea49bfaf9fb27ed5490894eba32da78"
259 259 ],
260 260 "phase": "draft",
261 261 "tags": [],
262 262 "user": "test"
263 263 },
264 264 {
265 265 "bookmarks": [],
266 266 "branch": "default",
267 267 "date": [
268 268 0.0,
269 269 0
270 270 ],
271 271 "desc": "another commit to da/foo",
272 272 "node": "f2890a05fea49bfaf9fb27ed5490894eba32da78",
273 273 "parents": [
274 274 "93a8ce14f89156426b7fa981af8042da53f03aa0"
275 275 ],
276 276 "phase": "draft",
277 277 "tags": [
278 278 "tag2"
279 279 ],
280 280 "user": "test"
281 281 },
282 282 {
283 283 "bookmarks": [],
284 284 "branch": "default",
285 285 "date": [
286 286 0.0,
287 287 0
288 288 ],
289 289 "desc": "create tag",
290 290 "node": "93a8ce14f89156426b7fa981af8042da53f03aa0",
291 291 "parents": [
292 292 "78896eb0e102174ce9278438a95e12543e4367a7"
293 293 ],
294 294 "phase": "public",
295 295 "tags": [],
296 296 "user": "test"
297 297 },
298 298 {
299 299 "bookmarks": [],
300 300 "branch": "default",
301 301 "date": [
302 302 0.0,
303 303 0
304 304 ],
305 305 "desc": "move foo",
306 306 "node": "78896eb0e102174ce9278438a95e12543e4367a7",
307 307 "parents": [
308 308 "8d7c456572acf3557e8ed8a07286b10c408bcec5"
309 309 ],
310 310 "phase": "public",
311 311 "tags": [
312 312 "tag1"
313 313 ],
314 314 "user": "test"
315 315 },
316 316 {
317 317 "bookmarks": [
318 318 "bookmark1"
319 319 ],
320 320 "branch": "default",
321 321 "date": [
322 322 0.0,
323 323 0
324 324 ],
325 325 "desc": "modify da/foo",
326 326 "node": "8d7c456572acf3557e8ed8a07286b10c408bcec5",
327 327 "parents": [
328 328 "f8bbb9024b10f93cdbb8d940337398291d40dea8"
329 329 ],
330 330 "phase": "public",
331 331 "tags": [],
332 332 "user": "test"
333 333 },
334 334 {
335 335 "bookmarks": [],
336 336 "branch": "default",
337 337 "date": [
338 338 0.0,
339 339 0
340 340 ],
341 341 "desc": "modify foo",
342 342 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
343 343 "parents": [
344 344 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
345 345 ],
346 346 "phase": "public",
347 347 "tags": [],
348 348 "user": "test"
349 349 },
350 350 {
351 351 "bookmarks": [],
352 352 "branch": "default",
353 353 "date": [
354 354 0.0,
355 355 0
356 356 ],
357 357 "desc": "initial",
358 358 "node": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
359 359 "parents": [],
360 360 "phase": "public",
361 361 "tags": [],
362 362 "user": "test"
363 363 }
364 364 ],
365 365 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7"
366 366 }
367 367
368 368 changelog/{revision} shows information starting at a specific changeset
369 369
370 370 $ request json-changelog/f8bbb9024b10
371 371 200 Script output follows
372 372
373 373 {
374 374 "changeset_count": 10,
375 375 "changesets": [
376 376 {
377 377 "bookmarks": [],
378 378 "branch": "default",
379 379 "date": [
380 380 0.0,
381 381 0
382 382 ],
383 383 "desc": "modify foo",
384 384 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
385 385 "parents": [
386 386 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
387 387 ],
388 388 "phase": "public",
389 389 "tags": [],
390 390 "user": "test"
391 391 },
392 392 {
393 393 "bookmarks": [],
394 394 "branch": "default",
395 395 "date": [
396 396 0.0,
397 397 0
398 398 ],
399 399 "desc": "initial",
400 400 "node": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
401 401 "parents": [],
402 402 "phase": "public",
403 403 "tags": [],
404 404 "user": "test"
405 405 }
406 406 ],
407 407 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8"
408 408 }
409 409
410 410 shortlog/ shows information about a set of changesets
411 411
412 412 $ request json-shortlog
413 413 200 Script output follows
414 414
415 415 {
416 416 "changeset_count": 10,
417 417 "changesets": [
418 418 {
419 419 "bookmarks": [],
420 420 "branch": "default",
421 421 "date": [
422 422 0.0,
423 423 0
424 424 ],
425 425 "desc": "merge test-branch into default",
426 426 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
427 427 "parents": [
428 428 "ceed296fe500c3fac9541e31dad860cb49c89e45",
429 429 "ed66c30e87eb65337c05a4229efaa5f1d5285a90"
430 430 ],
431 431 "phase": "draft",
432 432 "tags": [
433 433 "tip"
434 434 ],
435 435 "user": "test"
436 436 },
437 437 {
438 438 "bookmarks": [],
439 439 "branch": "test-branch",
440 440 "date": [
441 441 0.0,
442 442 0
443 443 ],
444 444 "desc": "another commit in test-branch",
445 445 "node": "ed66c30e87eb65337c05a4229efaa5f1d5285a90",
446 446 "parents": [
447 447 "6ab967a8ab3489227a83f80e920faa039a71819f"
448 448 ],
449 449 "phase": "draft",
450 450 "tags": [],
451 451 "user": "test"
452 452 },
453 453 {
454 454 "bookmarks": [],
455 455 "branch": "test-branch",
456 456 "date": [
457 457 0.0,
458 458 0
459 459 ],
460 460 "desc": "create test branch",
461 461 "node": "6ab967a8ab3489227a83f80e920faa039a71819f",
462 462 "parents": [
463 463 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
464 464 ],
465 465 "phase": "draft",
466 466 "tags": [],
467 467 "user": "test"
468 468 },
469 469 {
470 470 "bookmarks": [
471 471 "bookmark2"
472 472 ],
473 473 "branch": "default",
474 474 "date": [
475 475 0.0,
476 476 0
477 477 ],
478 478 "desc": "create tag2",
479 479 "node": "ceed296fe500c3fac9541e31dad860cb49c89e45",
480 480 "parents": [
481 481 "f2890a05fea49bfaf9fb27ed5490894eba32da78"
482 482 ],
483 483 "phase": "draft",
484 484 "tags": [],
485 485 "user": "test"
486 486 },
487 487 {
488 488 "bookmarks": [],
489 489 "branch": "default",
490 490 "date": [
491 491 0.0,
492 492 0
493 493 ],
494 494 "desc": "another commit to da/foo",
495 495 "node": "f2890a05fea49bfaf9fb27ed5490894eba32da78",
496 496 "parents": [
497 497 "93a8ce14f89156426b7fa981af8042da53f03aa0"
498 498 ],
499 499 "phase": "draft",
500 500 "tags": [
501 501 "tag2"
502 502 ],
503 503 "user": "test"
504 504 },
505 505 {
506 506 "bookmarks": [],
507 507 "branch": "default",
508 508 "date": [
509 509 0.0,
510 510 0
511 511 ],
512 512 "desc": "create tag",
513 513 "node": "93a8ce14f89156426b7fa981af8042da53f03aa0",
514 514 "parents": [
515 515 "78896eb0e102174ce9278438a95e12543e4367a7"
516 516 ],
517 517 "phase": "public",
518 518 "tags": [],
519 519 "user": "test"
520 520 },
521 521 {
522 522 "bookmarks": [],
523 523 "branch": "default",
524 524 "date": [
525 525 0.0,
526 526 0
527 527 ],
528 528 "desc": "move foo",
529 529 "node": "78896eb0e102174ce9278438a95e12543e4367a7",
530 530 "parents": [
531 531 "8d7c456572acf3557e8ed8a07286b10c408bcec5"
532 532 ],
533 533 "phase": "public",
534 534 "tags": [
535 535 "tag1"
536 536 ],
537 537 "user": "test"
538 538 },
539 539 {
540 540 "bookmarks": [
541 541 "bookmark1"
542 542 ],
543 543 "branch": "default",
544 544 "date": [
545 545 0.0,
546 546 0
547 547 ],
548 548 "desc": "modify da/foo",
549 549 "node": "8d7c456572acf3557e8ed8a07286b10c408bcec5",
550 550 "parents": [
551 551 "f8bbb9024b10f93cdbb8d940337398291d40dea8"
552 552 ],
553 553 "phase": "public",
554 554 "tags": [],
555 555 "user": "test"
556 556 },
557 557 {
558 558 "bookmarks": [],
559 559 "branch": "default",
560 560 "date": [
561 561 0.0,
562 562 0
563 563 ],
564 564 "desc": "modify foo",
565 565 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
566 566 "parents": [
567 567 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
568 568 ],
569 569 "phase": "public",
570 570 "tags": [],
571 571 "user": "test"
572 572 },
573 573 {
574 574 "bookmarks": [],
575 575 "branch": "default",
576 576 "date": [
577 577 0.0,
578 578 0
579 579 ],
580 580 "desc": "initial",
581 581 "node": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
582 582 "parents": [],
583 583 "phase": "public",
584 584 "tags": [],
585 585 "user": "test"
586 586 }
587 587 ],
588 588 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7"
589 589 }
590 590
591 591 shortlog is displayed by default (issue5978)
592 592
593 593 $ request '?style=json'
594 594 200 Script output follows
595 595
596 596 {
597 597 "changeset_count": 10,
598 598 "changesets": [
599 599 {
600 600 "bookmarks": [],
601 601 "branch": "default",
602 602 "date": [
603 603 0.0,
604 604 0
605 605 ],
606 606 "desc": "merge test-branch into default",
607 607 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
608 608 "parents": [
609 609 "ceed296fe500c3fac9541e31dad860cb49c89e45",
610 610 "ed66c30e87eb65337c05a4229efaa5f1d5285a90"
611 611 ],
612 612 "phase": "draft",
613 613 "tags": [
614 614 "tip"
615 615 ],
616 616 "user": "test"
617 617 },
618 618 {
619 619 "bookmarks": [],
620 620 "branch": "test-branch",
621 621 "date": [
622 622 0.0,
623 623 0
624 624 ],
625 625 "desc": "another commit in test-branch",
626 626 "node": "ed66c30e87eb65337c05a4229efaa5f1d5285a90",
627 627 "parents": [
628 628 "6ab967a8ab3489227a83f80e920faa039a71819f"
629 629 ],
630 630 "phase": "draft",
631 631 "tags": [],
632 632 "user": "test"
633 633 },
634 634 {
635 635 "bookmarks": [],
636 636 "branch": "test-branch",
637 637 "date": [
638 638 0.0,
639 639 0
640 640 ],
641 641 "desc": "create test branch",
642 642 "node": "6ab967a8ab3489227a83f80e920faa039a71819f",
643 643 "parents": [
644 644 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
645 645 ],
646 646 "phase": "draft",
647 647 "tags": [],
648 648 "user": "test"
649 649 },
650 650 {
651 651 "bookmarks": [
652 652 "bookmark2"
653 653 ],
654 654 "branch": "default",
655 655 "date": [
656 656 0.0,
657 657 0
658 658 ],
659 659 "desc": "create tag2",
660 660 "node": "ceed296fe500c3fac9541e31dad860cb49c89e45",
661 661 "parents": [
662 662 "f2890a05fea49bfaf9fb27ed5490894eba32da78"
663 663 ],
664 664 "phase": "draft",
665 665 "tags": [],
666 666 "user": "test"
667 667 },
668 668 {
669 669 "bookmarks": [],
670 670 "branch": "default",
671 671 "date": [
672 672 0.0,
673 673 0
674 674 ],
675 675 "desc": "another commit to da/foo",
676 676 "node": "f2890a05fea49bfaf9fb27ed5490894eba32da78",
677 677 "parents": [
678 678 "93a8ce14f89156426b7fa981af8042da53f03aa0"
679 679 ],
680 680 "phase": "draft",
681 681 "tags": [
682 682 "tag2"
683 683 ],
684 684 "user": "test"
685 685 },
686 686 {
687 687 "bookmarks": [],
688 688 "branch": "default",
689 689 "date": [
690 690 0.0,
691 691 0
692 692 ],
693 693 "desc": "create tag",
694 694 "node": "93a8ce14f89156426b7fa981af8042da53f03aa0",
695 695 "parents": [
696 696 "78896eb0e102174ce9278438a95e12543e4367a7"
697 697 ],
698 698 "phase": "public",
699 699 "tags": [],
700 700 "user": "test"
701 701 },
702 702 {
703 703 "bookmarks": [],
704 704 "branch": "default",
705 705 "date": [
706 706 0.0,
707 707 0
708 708 ],
709 709 "desc": "move foo",
710 710 "node": "78896eb0e102174ce9278438a95e12543e4367a7",
711 711 "parents": [
712 712 "8d7c456572acf3557e8ed8a07286b10c408bcec5"
713 713 ],
714 714 "phase": "public",
715 715 "tags": [
716 716 "tag1"
717 717 ],
718 718 "user": "test"
719 719 },
720 720 {
721 721 "bookmarks": [
722 722 "bookmark1"
723 723 ],
724 724 "branch": "default",
725 725 "date": [
726 726 0.0,
727 727 0
728 728 ],
729 729 "desc": "modify da/foo",
730 730 "node": "8d7c456572acf3557e8ed8a07286b10c408bcec5",
731 731 "parents": [
732 732 "f8bbb9024b10f93cdbb8d940337398291d40dea8"
733 733 ],
734 734 "phase": "public",
735 735 "tags": [],
736 736 "user": "test"
737 737 },
738 738 {
739 739 "bookmarks": [],
740 740 "branch": "default",
741 741 "date": [
742 742 0.0,
743 743 0
744 744 ],
745 745 "desc": "modify foo",
746 746 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
747 747 "parents": [
748 748 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
749 749 ],
750 750 "phase": "public",
751 751 "tags": [],
752 752 "user": "test"
753 753 },
754 754 {
755 755 "bookmarks": [],
756 756 "branch": "default",
757 757 "date": [
758 758 0.0,
759 759 0
760 760 ],
761 761 "desc": "initial",
762 762 "node": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
763 763 "parents": [],
764 764 "phase": "public",
765 765 "tags": [],
766 766 "user": "test"
767 767 }
768 768 ],
769 769 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7"
770 770 }
771 771
772 772 changeset/ renders the tip changeset
773 773
774 774 $ request json-rev
775 775 200 Script output follows
776 776
777 777 {
778 778 "bookmarks": [],
779 779 "branch": "default",
780 "children": [],
780 781 "date": [
781 782 0.0,
782 783 0
783 784 ],
784 785 "desc": "merge test-branch into default",
785 786 "diff": [],
786 787 "files": [
787 788 {
788 789 "file": "foo-new",
789 790 "status": "modified"
790 791 }
791 792 ],
792 793 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
793 794 "parents": [
794 795 "ceed296fe500c3fac9541e31dad860cb49c89e45",
795 796 "ed66c30e87eb65337c05a4229efaa5f1d5285a90"
796 797 ],
797 798 "phase": "draft",
798 799 "tags": [
799 800 "tip"
800 801 ],
801 802 "user": "test"
802 803 }
803 804
804 805 changeset/{revision} shows tags
805 806
806 807 $ request json-rev/78896eb0e102
807 808 200 Script output follows
808 809
809 810 {
810 811 "bookmarks": [],
811 812 "branch": "default",
813 "children": [
814 "93a8ce14f89156426b7fa981af8042da53f03aa0"
815 ],
812 816 "date": [
813 817 0.0,
814 818 0
815 819 ],
816 820 "desc": "move foo",
817 821 "diff": [
818 822 {
819 823 "blockno": 1,
820 824 "lines": [
821 825 {
822 826 "l": "--- a/foo\tThu Jan 01 00:00:00 1970 +0000\n",
823 827 "n": 1,
824 828 "t": "-"
825 829 },
826 830 {
827 831 "l": "+++ /dev/null\tThu Jan 01 00:00:00 1970 +0000\n",
828 832 "n": 2,
829 833 "t": "+"
830 834 },
831 835 {
832 836 "l": "@@ -1,1 +0,0 @@\n",
833 837 "n": 3,
834 838 "t": "@"
835 839 },
836 840 {
837 841 "l": "-bar\n",
838 842 "n": 4,
839 843 "t": "-"
840 844 }
841 845 ]
842 846 },
843 847 {
844 848 "blockno": 2,
845 849 "lines": [
846 850 {
847 851 "l": "--- /dev/null\tThu Jan 01 00:00:00 1970 +0000\n",
848 852 "n": 1,
849 853 "t": "-"
850 854 },
851 855 {
852 856 "l": "+++ b/foo-new\tThu Jan 01 00:00:00 1970 +0000\n",
853 857 "n": 2,
854 858 "t": "+"
855 859 },
856 860 {
857 861 "l": "@@ -0,0 +1,1 @@\n",
858 862 "n": 3,
859 863 "t": "@"
860 864 },
861 865 {
862 866 "l": "+bar\n",
863 867 "n": 4,
864 868 "t": "+"
865 869 }
866 870 ]
867 871 }
868 872 ],
869 873 "files": [
870 874 {
871 875 "file": "foo",
872 876 "status": "removed"
873 877 },
874 878 {
875 879 "file": "foo-new",
876 880 "status": "added"
877 881 }
878 882 ],
879 883 "node": "78896eb0e102174ce9278438a95e12543e4367a7",
880 884 "parents": [
881 885 "8d7c456572acf3557e8ed8a07286b10c408bcec5"
882 886 ],
883 887 "phase": "public",
884 888 "tags": [
885 889 "tag1"
886 890 ],
887 891 "user": "test"
888 892 }
889 893
890 894 changeset/{revision} shows bookmarks
891 895
892 896 $ request json-rev/8d7c456572ac
893 897 200 Script output follows
894 898
895 899 {
896 900 "bookmarks": [
897 901 "bookmark1"
898 902 ],
899 903 "branch": "default",
904 "children": [
905 "78896eb0e102174ce9278438a95e12543e4367a7"
906 ],
900 907 "date": [
901 908 0.0,
902 909 0
903 910 ],
904 911 "desc": "modify da/foo",
905 912 "diff": [
906 913 {
907 914 "blockno": 1,
908 915 "lines": [
909 916 {
910 917 "l": "--- a/da/foo\tThu Jan 01 00:00:00 1970 +0000\n",
911 918 "n": 1,
912 919 "t": "-"
913 920 },
914 921 {
915 922 "l": "+++ b/da/foo\tThu Jan 01 00:00:00 1970 +0000\n",
916 923 "n": 2,
917 924 "t": "+"
918 925 },
919 926 {
920 927 "l": "@@ -1,1 +1,1 @@\n",
921 928 "n": 3,
922 929 "t": "@"
923 930 },
924 931 {
925 932 "l": "-foo\n",
926 933 "n": 4,
927 934 "t": "-"
928 935 },
929 936 {
930 937 "l": "+bar\n",
931 938 "n": 5,
932 939 "t": "+"
933 940 }
934 941 ]
935 942 }
936 943 ],
937 944 "files": [
938 945 {
939 946 "file": "da/foo",
940 947 "status": "modified"
941 948 }
942 949 ],
943 950 "node": "8d7c456572acf3557e8ed8a07286b10c408bcec5",
944 951 "parents": [
945 952 "f8bbb9024b10f93cdbb8d940337398291d40dea8"
946 953 ],
947 954 "phase": "public",
948 955 "tags": [],
949 956 "user": "test"
950 957 }
951 958
952 959 changeset/{revision} shows branches
953 960
954 961 $ request json-rev/6ab967a8ab34
955 962 200 Script output follows
956 963
957 964 {
958 965 "bookmarks": [],
959 966 "branch": "test-branch",
967 "children": [
968 "ed66c30e87eb65337c05a4229efaa5f1d5285a90"
969 ],
960 970 "date": [
961 971 0.0,
962 972 0
963 973 ],
964 974 "desc": "create test branch",
965 975 "diff": [
966 976 {
967 977 "blockno": 1,
968 978 "lines": [
969 979 {
970 980 "l": "--- a/foo\tThu Jan 01 00:00:00 1970 +0000\n",
971 981 "n": 1,
972 982 "t": "-"
973 983 },
974 984 {
975 985 "l": "+++ b/foo\tThu Jan 01 00:00:00 1970 +0000\n",
976 986 "n": 2,
977 987 "t": "+"
978 988 },
979 989 {
980 990 "l": "@@ -1,1 +1,1 @@\n",
981 991 "n": 3,
982 992 "t": "@"
983 993 },
984 994 {
985 995 "l": "-foo\n",
986 996 "n": 4,
987 997 "t": "-"
988 998 },
989 999 {
990 1000 "l": "+branch\n",
991 1001 "n": 5,
992 1002 "t": "+"
993 1003 }
994 1004 ]
995 1005 }
996 1006 ],
997 1007 "files": [
998 1008 {
999 1009 "file": "foo",
1000 1010 "status": "modified"
1001 1011 }
1002 1012 ],
1003 1013 "node": "6ab967a8ab3489227a83f80e920faa039a71819f",
1004 1014 "parents": [
1005 1015 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
1006 1016 ],
1007 1017 "phase": "draft",
1008 1018 "tags": [],
1009 1019 "user": "test"
1010 1020 }
1011 1021
1012 1022 manifest/{revision}/{path} shows info about a directory at a revision
1013 1023
1014 1024 $ request json-manifest/06e557f3edf6/
1015 1025 200 Script output follows
1016 1026
1017 1027 {
1018 1028 "abspath": "/",
1019 1029 "bookmarks": [],
1020 1030 "directories": [
1021 1031 {
1022 1032 "abspath": "/da",
1023 1033 "basename": "da",
1024 1034 "emptydirs": ""
1025 1035 }
1026 1036 ],
1027 1037 "files": [
1028 1038 {
1029 1039 "abspath": "foo",
1030 1040 "basename": "foo",
1031 1041 "date": [
1032 1042 0.0,
1033 1043 0
1034 1044 ],
1035 1045 "flags": "",
1036 1046 "size": 4
1037 1047 }
1038 1048 ],
1039 1049 "node": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
1040 1050 "tags": []
1041 1051 }
1042 1052
1043 1053 tags/ shows tags info
1044 1054
1045 1055 $ request json-tags
1046 1056 200 Script output follows
1047 1057
1048 1058 {
1049 1059 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
1050 1060 "tags": [
1051 1061 {
1052 1062 "date": [
1053 1063 0.0,
1054 1064 0
1055 1065 ],
1056 1066 "node": "f2890a05fea49bfaf9fb27ed5490894eba32da78",
1057 1067 "tag": "tag2"
1058 1068 },
1059 1069 {
1060 1070 "date": [
1061 1071 0.0,
1062 1072 0
1063 1073 ],
1064 1074 "node": "78896eb0e102174ce9278438a95e12543e4367a7",
1065 1075 "tag": "tag1"
1066 1076 }
1067 1077 ]
1068 1078 }
1069 1079
1070 1080 bookmarks/ shows bookmarks info
1071 1081
1072 1082 $ request json-bookmarks
1073 1083 200 Script output follows
1074 1084
1075 1085 {
1076 1086 "bookmarks": [
1077 1087 {
1078 1088 "bookmark": "bookmark2",
1079 1089 "date": [
1080 1090 0.0,
1081 1091 0
1082 1092 ],
1083 1093 "node": "ceed296fe500c3fac9541e31dad860cb49c89e45"
1084 1094 },
1085 1095 {
1086 1096 "bookmark": "bookmark1",
1087 1097 "date": [
1088 1098 0.0,
1089 1099 0
1090 1100 ],
1091 1101 "node": "8d7c456572acf3557e8ed8a07286b10c408bcec5"
1092 1102 }
1093 1103 ],
1094 1104 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7"
1095 1105 }
1096 1106
1097 1107 branches/ shows branches info
1098 1108
1099 1109 $ request json-branches
1100 1110 200 Script output follows
1101 1111
1102 1112 {
1103 1113 "branches": [
1104 1114 {
1105 1115 "branch": "default",
1106 1116 "date": [
1107 1117 0.0,
1108 1118 0
1109 1119 ],
1110 1120 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
1111 1121 "status": "open"
1112 1122 },
1113 1123 {
1114 1124 "branch": "test-branch",
1115 1125 "date": [
1116 1126 0.0,
1117 1127 0
1118 1128 ],
1119 1129 "node": "ed66c30e87eb65337c05a4229efaa5f1d5285a90",
1120 1130 "status": "inactive"
1121 1131 }
1122 1132 ]
1123 1133 }
1124 1134
1125 1135 summary/ shows a summary of repository state
1126 1136
1127 1137 $ request json-summary
1128 1138 200 Script output follows
1129 1139
1130 1140 {
1131 1141 "archives": [
1132 1142 {
1133 1143 "extension": ".tar.bz2",
1134 1144 "node": "tip",
1135 1145 "type": "bz2",
1136 1146 "url": "http://*:$HGPORT/archive/tip.tar.bz2" (glob)
1137 1147 }
1138 1148 ],
1139 1149 "bookmarks": [
1140 1150 {
1141 1151 "bookmark": "bookmark2",
1142 1152 "date": [
1143 1153 0.0,
1144 1154 0
1145 1155 ],
1146 1156 "node": "ceed296fe500c3fac9541e31dad860cb49c89e45"
1147 1157 },
1148 1158 {
1149 1159 "bookmark": "bookmark1",
1150 1160 "date": [
1151 1161 0.0,
1152 1162 0
1153 1163 ],
1154 1164 "node": "8d7c456572acf3557e8ed8a07286b10c408bcec5"
1155 1165 }
1156 1166 ],
1157 1167 "branches": [
1158 1168 {
1159 1169 "branch": "default",
1160 1170 "date": [
1161 1171 0.0,
1162 1172 0
1163 1173 ],
1164 1174 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
1165 1175 "status": "open"
1166 1176 },
1167 1177 {
1168 1178 "branch": "test-branch",
1169 1179 "date": [
1170 1180 0.0,
1171 1181 0
1172 1182 ],
1173 1183 "node": "ed66c30e87eb65337c05a4229efaa5f1d5285a90",
1174 1184 "status": "inactive"
1175 1185 }
1176 1186 ],
1177 1187 "labels": [],
1178 1188 "lastchange": [
1179 1189 0.0,
1180 1190 0
1181 1191 ],
1182 1192 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
1183 1193 "shortlog": [
1184 1194 {
1185 1195 "bookmarks": [],
1186 1196 "branch": "default",
1187 1197 "date": [
1188 1198 0.0,
1189 1199 0
1190 1200 ],
1191 1201 "desc": "merge test-branch into default",
1192 1202 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
1193 1203 "parents": [
1194 1204 "ceed296fe500c3fac9541e31dad860cb49c89e45",
1195 1205 "ed66c30e87eb65337c05a4229efaa5f1d5285a90"
1196 1206 ],
1197 1207 "phase": "draft",
1198 1208 "tags": [
1199 1209 "tip"
1200 1210 ],
1201 1211 "user": "test"
1202 1212 },
1203 1213 {
1204 1214 "bookmarks": [],
1205 1215 "branch": "test-branch",
1206 1216 "date": [
1207 1217 0.0,
1208 1218 0
1209 1219 ],
1210 1220 "desc": "another commit in test-branch",
1211 1221 "node": "ed66c30e87eb65337c05a4229efaa5f1d5285a90",
1212 1222 "parents": [
1213 1223 "6ab967a8ab3489227a83f80e920faa039a71819f"
1214 1224 ],
1215 1225 "phase": "draft",
1216 1226 "tags": [],
1217 1227 "user": "test"
1218 1228 },
1219 1229 {
1220 1230 "bookmarks": [],
1221 1231 "branch": "test-branch",
1222 1232 "date": [
1223 1233 0.0,
1224 1234 0
1225 1235 ],
1226 1236 "desc": "create test branch",
1227 1237 "node": "6ab967a8ab3489227a83f80e920faa039a71819f",
1228 1238 "parents": [
1229 1239 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
1230 1240 ],
1231 1241 "phase": "draft",
1232 1242 "tags": [],
1233 1243 "user": "test"
1234 1244 },
1235 1245 {
1236 1246 "bookmarks": [
1237 1247 "bookmark2"
1238 1248 ],
1239 1249 "branch": "default",
1240 1250 "date": [
1241 1251 0.0,
1242 1252 0
1243 1253 ],
1244 1254 "desc": "create tag2",
1245 1255 "node": "ceed296fe500c3fac9541e31dad860cb49c89e45",
1246 1256 "parents": [
1247 1257 "f2890a05fea49bfaf9fb27ed5490894eba32da78"
1248 1258 ],
1249 1259 "phase": "draft",
1250 1260 "tags": [],
1251 1261 "user": "test"
1252 1262 },
1253 1263 {
1254 1264 "bookmarks": [],
1255 1265 "branch": "default",
1256 1266 "date": [
1257 1267 0.0,
1258 1268 0
1259 1269 ],
1260 1270 "desc": "another commit to da/foo",
1261 1271 "node": "f2890a05fea49bfaf9fb27ed5490894eba32da78",
1262 1272 "parents": [
1263 1273 "93a8ce14f89156426b7fa981af8042da53f03aa0"
1264 1274 ],
1265 1275 "phase": "draft",
1266 1276 "tags": [
1267 1277 "tag2"
1268 1278 ],
1269 1279 "user": "test"
1270 1280 },
1271 1281 {
1272 1282 "bookmarks": [],
1273 1283 "branch": "default",
1274 1284 "date": [
1275 1285 0.0,
1276 1286 0
1277 1287 ],
1278 1288 "desc": "create tag",
1279 1289 "node": "93a8ce14f89156426b7fa981af8042da53f03aa0",
1280 1290 "parents": [
1281 1291 "78896eb0e102174ce9278438a95e12543e4367a7"
1282 1292 ],
1283 1293 "phase": "public",
1284 1294 "tags": [],
1285 1295 "user": "test"
1286 1296 },
1287 1297 {
1288 1298 "bookmarks": [],
1289 1299 "branch": "default",
1290 1300 "date": [
1291 1301 0.0,
1292 1302 0
1293 1303 ],
1294 1304 "desc": "move foo",
1295 1305 "node": "78896eb0e102174ce9278438a95e12543e4367a7",
1296 1306 "parents": [
1297 1307 "8d7c456572acf3557e8ed8a07286b10c408bcec5"
1298 1308 ],
1299 1309 "phase": "public",
1300 1310 "tags": [
1301 1311 "tag1"
1302 1312 ],
1303 1313 "user": "test"
1304 1314 },
1305 1315 {
1306 1316 "bookmarks": [
1307 1317 "bookmark1"
1308 1318 ],
1309 1319 "branch": "default",
1310 1320 "date": [
1311 1321 0.0,
1312 1322 0
1313 1323 ],
1314 1324 "desc": "modify da/foo",
1315 1325 "node": "8d7c456572acf3557e8ed8a07286b10c408bcec5",
1316 1326 "parents": [
1317 1327 "f8bbb9024b10f93cdbb8d940337398291d40dea8"
1318 1328 ],
1319 1329 "phase": "public",
1320 1330 "tags": [],
1321 1331 "user": "test"
1322 1332 },
1323 1333 {
1324 1334 "bookmarks": [],
1325 1335 "branch": "default",
1326 1336 "date": [
1327 1337 0.0,
1328 1338 0
1329 1339 ],
1330 1340 "desc": "modify foo",
1331 1341 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
1332 1342 "parents": [
1333 1343 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
1334 1344 ],
1335 1345 "phase": "public",
1336 1346 "tags": [],
1337 1347 "user": "test"
1338 1348 },
1339 1349 {
1340 1350 "bookmarks": [],
1341 1351 "branch": "default",
1342 1352 "date": [
1343 1353 0.0,
1344 1354 0
1345 1355 ],
1346 1356 "desc": "initial",
1347 1357 "node": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
1348 1358 "parents": [],
1349 1359 "phase": "public",
1350 1360 "tags": [],
1351 1361 "user": "test"
1352 1362 }
1353 1363 ],
1354 1364 "tags": [
1355 1365 {
1356 1366 "date": [
1357 1367 0.0,
1358 1368 0
1359 1369 ],
1360 1370 "node": "f2890a05fea49bfaf9fb27ed5490894eba32da78",
1361 1371 "tag": "tag2"
1362 1372 },
1363 1373 {
1364 1374 "date": [
1365 1375 0.0,
1366 1376 0
1367 1377 ],
1368 1378 "node": "78896eb0e102174ce9278438a95e12543e4367a7",
1369 1379 "tag": "tag1"
1370 1380 }
1371 1381 ]
1372 1382 }
1373 1383
1374 1384 $ request json-changelog?rev=create
1375 1385 200 Script output follows
1376 1386
1377 1387 {
1378 1388 "entries": [
1379 1389 {
1380 1390 "bookmarks": [],
1381 1391 "branch": "test-branch",
1382 1392 "date": [
1383 1393 0.0,
1384 1394 0
1385 1395 ],
1386 1396 "desc": "create test branch",
1387 1397 "node": "6ab967a8ab3489227a83f80e920faa039a71819f",
1388 1398 "parents": [
1389 1399 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
1390 1400 ],
1391 1401 "phase": "draft",
1392 1402 "tags": [],
1393 1403 "user": "test"
1394 1404 },
1395 1405 {
1396 1406 "bookmarks": [
1397 1407 "bookmark2"
1398 1408 ],
1399 1409 "branch": "default",
1400 1410 "date": [
1401 1411 0.0,
1402 1412 0
1403 1413 ],
1404 1414 "desc": "create tag2",
1405 1415 "node": "ceed296fe500c3fac9541e31dad860cb49c89e45",
1406 1416 "parents": [
1407 1417 "f2890a05fea49bfaf9fb27ed5490894eba32da78"
1408 1418 ],
1409 1419 "phase": "draft",
1410 1420 "tags": [],
1411 1421 "user": "test"
1412 1422 },
1413 1423 {
1414 1424 "bookmarks": [],
1415 1425 "branch": "default",
1416 1426 "date": [
1417 1427 0.0,
1418 1428 0
1419 1429 ],
1420 1430 "desc": "create tag",
1421 1431 "node": "93a8ce14f89156426b7fa981af8042da53f03aa0",
1422 1432 "parents": [
1423 1433 "78896eb0e102174ce9278438a95e12543e4367a7"
1424 1434 ],
1425 1435 "phase": "public",
1426 1436 "tags": [],
1427 1437 "user": "test"
1428 1438 }
1429 1439 ],
1430 1440 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
1431 1441 "query": "create"
1432 1442 }
1433 1443
1434 1444 filediff/{revision}/{path} shows changes to a file in a revision
1435 1445
1436 1446 $ request json-diff/f8bbb9024b10/foo
1437 1447 200 Script output follows
1438 1448
1439 1449 {
1440 1450 "author": "test",
1441 1451 "children": [],
1442 1452 "date": [
1443 1453 0.0,
1444 1454 0
1445 1455 ],
1446 1456 "desc": "modify foo",
1447 1457 "diff": [
1448 1458 {
1449 1459 "blockno": 1,
1450 1460 "lines": [
1451 1461 {
1452 1462 "l": "--- a/foo\tThu Jan 01 00:00:00 1970 +0000\n",
1453 1463 "n": 1,
1454 1464 "t": "-"
1455 1465 },
1456 1466 {
1457 1467 "l": "+++ b/foo\tThu Jan 01 00:00:00 1970 +0000\n",
1458 1468 "n": 2,
1459 1469 "t": "+"
1460 1470 },
1461 1471 {
1462 1472 "l": "@@ -1,1 +1,1 @@\n",
1463 1473 "n": 3,
1464 1474 "t": "@"
1465 1475 },
1466 1476 {
1467 1477 "l": "-foo\n",
1468 1478 "n": 4,
1469 1479 "t": "-"
1470 1480 },
1471 1481 {
1472 1482 "l": "+bar\n",
1473 1483 "n": 5,
1474 1484 "t": "+"
1475 1485 }
1476 1486 ]
1477 1487 }
1478 1488 ],
1479 1489 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
1480 1490 "parents": [
1481 1491 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
1482 1492 ],
1483 1493 "path": "foo"
1484 1494 }
1485 1495
1486 1496 comparison/{revision}/{path} shows information about before and after for a file
1487 1497
1488 1498 $ request json-comparison/f8bbb9024b10/foo
1489 1499 200 Script output follows
1490 1500
1491 1501 {
1492 1502 "author": "test",
1493 1503 "children": [],
1494 1504 "comparison": [
1495 1505 {
1496 1506 "lines": [
1497 1507 {
1498 1508 "ll": "foo",
1499 1509 "ln": 1,
1500 1510 "rl": "bar",
1501 1511 "rn": 1,
1502 1512 "t": "replace"
1503 1513 }
1504 1514 ]
1505 1515 }
1506 1516 ],
1507 1517 "date": [
1508 1518 0.0,
1509 1519 0
1510 1520 ],
1511 1521 "desc": "modify foo",
1512 1522 "leftnode": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
1513 1523 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
1514 1524 "parents": [
1515 1525 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
1516 1526 ],
1517 1527 "path": "foo",
1518 1528 "rightnode": "f8bbb9024b10f93cdbb8d940337398291d40dea8"
1519 1529 }
1520 1530
1521 1531 annotate/{revision}/{path} shows annotations for each line
1522 1532
1523 1533 $ request json-annotate/f8bbb9024b10/foo
1524 1534 200 Script output follows
1525 1535
1526 1536 {
1527 1537 "abspath": "foo",
1528 1538 "annotate": [
1529 1539 {
1530 1540 "abspath": "foo",
1531 1541 "author": "test",
1532 1542 "desc": "modify foo",
1533 1543 "line": "bar\n",
1534 1544 "lineno": 1,
1535 1545 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
1536 1546 "revdate": [
1537 1547 0.0,
1538 1548 0
1539 1549 ],
1540 1550 "targetline": 1
1541 1551 }
1542 1552 ],
1543 1553 "author": "test",
1544 1554 "children": [],
1545 1555 "date": [
1546 1556 0.0,
1547 1557 0
1548 1558 ],
1549 1559 "desc": "modify foo",
1550 1560 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
1551 1561 "parents": [
1552 1562 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
1553 1563 ],
1554 1564 "permissions": ""
1555 1565 }
1556 1566
1557 1567 filelog/{revision}/{path} shows history of a single file
1558 1568
1559 1569 $ request json-filelog/f8bbb9024b10/foo
1560 1570 200 Script output follows
1561 1571
1562 1572 {
1563 1573 "entries": [
1564 1574 {
1565 1575 "bookmarks": [],
1566 1576 "branch": "default",
1567 1577 "date": [
1568 1578 0.0,
1569 1579 0
1570 1580 ],
1571 1581 "desc": "modify foo",
1572 1582 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
1573 1583 "parents": [
1574 1584 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
1575 1585 ],
1576 1586 "phase": "public",
1577 1587 "tags": [],
1578 1588 "user": "test"
1579 1589 },
1580 1590 {
1581 1591 "bookmarks": [],
1582 1592 "branch": "default",
1583 1593 "date": [
1584 1594 0.0,
1585 1595 0
1586 1596 ],
1587 1597 "desc": "initial",
1588 1598 "node": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
1589 1599 "parents": [],
1590 1600 "phase": "public",
1591 1601 "tags": [],
1592 1602 "user": "test"
1593 1603 }
1594 1604 ]
1595 1605 }
1596 1606
1597 1607 $ request json-filelog/cc725e08502a/da/foo
1598 1608 200 Script output follows
1599 1609
1600 1610 {
1601 1611 "entries": [
1602 1612 {
1603 1613 "bookmarks": [],
1604 1614 "branch": "default",
1605 1615 "date": [
1606 1616 0.0,
1607 1617 0
1608 1618 ],
1609 1619 "desc": "another commit to da/foo",
1610 1620 "node": "f2890a05fea49bfaf9fb27ed5490894eba32da78",
1611 1621 "parents": [
1612 1622 "8d7c456572acf3557e8ed8a07286b10c408bcec5"
1613 1623 ],
1614 1624 "phase": "draft",
1615 1625 "tags": [
1616 1626 "tag2"
1617 1627 ],
1618 1628 "user": "test"
1619 1629 },
1620 1630 {
1621 1631 "bookmarks": [
1622 1632 "bookmark1"
1623 1633 ],
1624 1634 "branch": "default",
1625 1635 "date": [
1626 1636 0.0,
1627 1637 0
1628 1638 ],
1629 1639 "desc": "modify da/foo",
1630 1640 "node": "8d7c456572acf3557e8ed8a07286b10c408bcec5",
1631 1641 "parents": [
1632 1642 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
1633 1643 ],
1634 1644 "phase": "public",
1635 1645 "tags": [],
1636 1646 "user": "test"
1637 1647 },
1638 1648 {
1639 1649 "bookmarks": [],
1640 1650 "branch": "default",
1641 1651 "date": [
1642 1652 0.0,
1643 1653 0
1644 1654 ],
1645 1655 "desc": "initial",
1646 1656 "node": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
1647 1657 "parents": [],
1648 1658 "phase": "public",
1649 1659 "tags": [],
1650 1660 "user": "test"
1651 1661 }
1652 1662 ]
1653 1663 }
1654 1664
1655 1665 (archive/ doesn't use templating, so ignore it)
1656 1666
1657 1667 (static/ doesn't use templating, so ignore it)
1658 1668
1659 1669 graph/ shows information that can be used to render a graph of the DAG
1660 1670
1661 1671 $ request json-graph
1662 1672 200 Script output follows
1663 1673
1664 1674 {
1665 1675 "changeset_count": 10,
1666 1676 "changesets": [
1667 1677 {
1668 1678 "bookmarks": [],
1669 1679 "branch": "default",
1670 1680 "col": 0,
1671 1681 "color": 1,
1672 1682 "date": [
1673 1683 0.0,
1674 1684 0
1675 1685 ],
1676 1686 "desc": "merge test-branch into default",
1677 1687 "edges": [
1678 1688 {
1679 1689 "bcolor": "",
1680 1690 "col": 0,
1681 1691 "color": 1,
1682 1692 "nextcol": 0,
1683 1693 "width": -1
1684 1694 },
1685 1695 {
1686 1696 "bcolor": "",
1687 1697 "col": 0,
1688 1698 "color": 1,
1689 1699 "nextcol": 1,
1690 1700 "width": -1
1691 1701 }
1692 1702 ],
1693 1703 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
1694 1704 "parents": [
1695 1705 "ceed296fe500c3fac9541e31dad860cb49c89e45",
1696 1706 "ed66c30e87eb65337c05a4229efaa5f1d5285a90"
1697 1707 ],
1698 1708 "phase": "draft",
1699 1709 "row": 0,
1700 1710 "tags": [
1701 1711 "tip"
1702 1712 ],
1703 1713 "user": "test"
1704 1714 },
1705 1715 {
1706 1716 "bookmarks": [],
1707 1717 "branch": "test-branch",
1708 1718 "col": 1,
1709 1719 "color": 2,
1710 1720 "date": [
1711 1721 0.0,
1712 1722 0
1713 1723 ],
1714 1724 "desc": "another commit in test-branch",
1715 1725 "edges": [
1716 1726 {
1717 1727 "bcolor": "",
1718 1728 "col": 0,
1719 1729 "color": 1,
1720 1730 "nextcol": 0,
1721 1731 "width": -1
1722 1732 },
1723 1733 {
1724 1734 "bcolor": "",
1725 1735 "col": 1,
1726 1736 "color": 2,
1727 1737 "nextcol": 1,
1728 1738 "width": -1
1729 1739 }
1730 1740 ],
1731 1741 "node": "ed66c30e87eb65337c05a4229efaa5f1d5285a90",
1732 1742 "parents": [
1733 1743 "6ab967a8ab3489227a83f80e920faa039a71819f"
1734 1744 ],
1735 1745 "phase": "draft",
1736 1746 "row": 1,
1737 1747 "tags": [],
1738 1748 "user": "test"
1739 1749 },
1740 1750 {
1741 1751 "bookmarks": [],
1742 1752 "branch": "test-branch",
1743 1753 "col": 1,
1744 1754 "color": 2,
1745 1755 "date": [
1746 1756 0.0,
1747 1757 0
1748 1758 ],
1749 1759 "desc": "create test branch",
1750 1760 "edges": [
1751 1761 {
1752 1762 "bcolor": "",
1753 1763 "col": 0,
1754 1764 "color": 1,
1755 1765 "nextcol": 0,
1756 1766 "width": -1
1757 1767 },
1758 1768 {
1759 1769 "bcolor": "",
1760 1770 "col": 1,
1761 1771 "color": 2,
1762 1772 "nextcol": 1,
1763 1773 "width": -1
1764 1774 }
1765 1775 ],
1766 1776 "node": "6ab967a8ab3489227a83f80e920faa039a71819f",
1767 1777 "parents": [
1768 1778 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
1769 1779 ],
1770 1780 "phase": "draft",
1771 1781 "row": 2,
1772 1782 "tags": [],
1773 1783 "user": "test"
1774 1784 },
1775 1785 {
1776 1786 "bookmarks": [
1777 1787 "bookmark2"
1778 1788 ],
1779 1789 "branch": "default",
1780 1790 "col": 0,
1781 1791 "color": 1,
1782 1792 "date": [
1783 1793 0.0,
1784 1794 0
1785 1795 ],
1786 1796 "desc": "create tag2",
1787 1797 "edges": [
1788 1798 {
1789 1799 "bcolor": "",
1790 1800 "col": 0,
1791 1801 "color": 1,
1792 1802 "nextcol": 0,
1793 1803 "width": -1
1794 1804 },
1795 1805 {
1796 1806 "bcolor": "",
1797 1807 "col": 1,
1798 1808 "color": 2,
1799 1809 "nextcol": 1,
1800 1810 "width": -1
1801 1811 }
1802 1812 ],
1803 1813 "node": "ceed296fe500c3fac9541e31dad860cb49c89e45",
1804 1814 "parents": [
1805 1815 "f2890a05fea49bfaf9fb27ed5490894eba32da78"
1806 1816 ],
1807 1817 "phase": "draft",
1808 1818 "row": 3,
1809 1819 "tags": [],
1810 1820 "user": "test"
1811 1821 },
1812 1822 {
1813 1823 "bookmarks": [],
1814 1824 "branch": "default",
1815 1825 "col": 0,
1816 1826 "color": 1,
1817 1827 "date": [
1818 1828 0.0,
1819 1829 0
1820 1830 ],
1821 1831 "desc": "another commit to da/foo",
1822 1832 "edges": [
1823 1833 {
1824 1834 "bcolor": "",
1825 1835 "col": 0,
1826 1836 "color": 1,
1827 1837 "nextcol": 0,
1828 1838 "width": -1
1829 1839 },
1830 1840 {
1831 1841 "bcolor": "",
1832 1842 "col": 1,
1833 1843 "color": 2,
1834 1844 "nextcol": 1,
1835 1845 "width": -1
1836 1846 }
1837 1847 ],
1838 1848 "node": "f2890a05fea49bfaf9fb27ed5490894eba32da78",
1839 1849 "parents": [
1840 1850 "93a8ce14f89156426b7fa981af8042da53f03aa0"
1841 1851 ],
1842 1852 "phase": "draft",
1843 1853 "row": 4,
1844 1854 "tags": [
1845 1855 "tag2"
1846 1856 ],
1847 1857 "user": "test"
1848 1858 },
1849 1859 {
1850 1860 "bookmarks": [],
1851 1861 "branch": "default",
1852 1862 "col": 0,
1853 1863 "color": 1,
1854 1864 "date": [
1855 1865 0.0,
1856 1866 0
1857 1867 ],
1858 1868 "desc": "create tag",
1859 1869 "edges": [
1860 1870 {
1861 1871 "bcolor": "",
1862 1872 "col": 0,
1863 1873 "color": 1,
1864 1874 "nextcol": 0,
1865 1875 "width": -1
1866 1876 },
1867 1877 {
1868 1878 "bcolor": "",
1869 1879 "col": 1,
1870 1880 "color": 2,
1871 1881 "nextcol": 1,
1872 1882 "width": -1
1873 1883 }
1874 1884 ],
1875 1885 "node": "93a8ce14f89156426b7fa981af8042da53f03aa0",
1876 1886 "parents": [
1877 1887 "78896eb0e102174ce9278438a95e12543e4367a7"
1878 1888 ],
1879 1889 "phase": "public",
1880 1890 "row": 5,
1881 1891 "tags": [],
1882 1892 "user": "test"
1883 1893 },
1884 1894 {
1885 1895 "bookmarks": [],
1886 1896 "branch": "default",
1887 1897 "col": 0,
1888 1898 "color": 1,
1889 1899 "date": [
1890 1900 0.0,
1891 1901 0
1892 1902 ],
1893 1903 "desc": "move foo",
1894 1904 "edges": [
1895 1905 {
1896 1906 "bcolor": "",
1897 1907 "col": 0,
1898 1908 "color": 1,
1899 1909 "nextcol": 0,
1900 1910 "width": -1
1901 1911 },
1902 1912 {
1903 1913 "bcolor": "",
1904 1914 "col": 1,
1905 1915 "color": 2,
1906 1916 "nextcol": 1,
1907 1917 "width": -1
1908 1918 }
1909 1919 ],
1910 1920 "node": "78896eb0e102174ce9278438a95e12543e4367a7",
1911 1921 "parents": [
1912 1922 "8d7c456572acf3557e8ed8a07286b10c408bcec5"
1913 1923 ],
1914 1924 "phase": "public",
1915 1925 "row": 6,
1916 1926 "tags": [
1917 1927 "tag1"
1918 1928 ],
1919 1929 "user": "test"
1920 1930 },
1921 1931 {
1922 1932 "bookmarks": [
1923 1933 "bookmark1"
1924 1934 ],
1925 1935 "branch": "default",
1926 1936 "col": 0,
1927 1937 "color": 1,
1928 1938 "date": [
1929 1939 0.0,
1930 1940 0
1931 1941 ],
1932 1942 "desc": "modify da/foo",
1933 1943 "edges": [
1934 1944 {
1935 1945 "bcolor": "",
1936 1946 "col": 0,
1937 1947 "color": 1,
1938 1948 "nextcol": 0,
1939 1949 "width": -1
1940 1950 },
1941 1951 {
1942 1952 "bcolor": "",
1943 1953 "col": 1,
1944 1954 "color": 2,
1945 1955 "nextcol": 1,
1946 1956 "width": -1
1947 1957 }
1948 1958 ],
1949 1959 "node": "8d7c456572acf3557e8ed8a07286b10c408bcec5",
1950 1960 "parents": [
1951 1961 "f8bbb9024b10f93cdbb8d940337398291d40dea8"
1952 1962 ],
1953 1963 "phase": "public",
1954 1964 "row": 7,
1955 1965 "tags": [],
1956 1966 "user": "test"
1957 1967 },
1958 1968 {
1959 1969 "bookmarks": [],
1960 1970 "branch": "default",
1961 1971 "col": 0,
1962 1972 "color": 1,
1963 1973 "date": [
1964 1974 0.0,
1965 1975 0
1966 1976 ],
1967 1977 "desc": "modify foo",
1968 1978 "edges": [
1969 1979 {
1970 1980 "bcolor": "",
1971 1981 "col": 0,
1972 1982 "color": 1,
1973 1983 "nextcol": 0,
1974 1984 "width": -1
1975 1985 },
1976 1986 {
1977 1987 "bcolor": "",
1978 1988 "col": 1,
1979 1989 "color": 2,
1980 1990 "nextcol": 0,
1981 1991 "width": -1
1982 1992 }
1983 1993 ],
1984 1994 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
1985 1995 "parents": [
1986 1996 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
1987 1997 ],
1988 1998 "phase": "public",
1989 1999 "row": 8,
1990 2000 "tags": [],
1991 2001 "user": "test"
1992 2002 },
1993 2003 {
1994 2004 "bookmarks": [],
1995 2005 "branch": "default",
1996 2006 "col": 0,
1997 2007 "color": 2,
1998 2008 "date": [
1999 2009 0.0,
2000 2010 0
2001 2011 ],
2002 2012 "desc": "initial",
2003 2013 "edges": [],
2004 2014 "node": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
2005 2015 "parents": [],
2006 2016 "phase": "public",
2007 2017 "row": 9,
2008 2018 "tags": [],
2009 2019 "user": "test"
2010 2020 }
2011 2021 ],
2012 2022 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7"
2013 2023 }
2014 2024
2015 2025 help/ shows help topics
2016 2026
2017 2027 $ request json-help
2018 2028 200 Script output follows
2019 2029
2020 2030 {
2021 2031 "earlycommands": [
2022 2032 {
2023 2033 "summary": "abort an unfinished operation (EXPERIMENTAL)",
2024 2034 "topic": "abort"
2025 2035 },
2026 2036 {
2027 2037 "summary": "add the specified files on the next commit",
2028 2038 "topic": "add"
2029 2039 },
2030 2040 {
2031 2041 "summary": "show changeset information by line for each file",
2032 2042 "topic": "annotate"
2033 2043 },
2034 2044 {
2035 2045 "summary": "make a copy of an existing repository",
2036 2046 "topic": "clone"
2037 2047 },
2038 2048 {
2039 2049 "summary": "commit the specified files or all outstanding changes",
2040 2050 "topic": "commit"
2041 2051 },
2042 2052 {
2043 2053 "summary": "resumes an interrupted operation (EXPERIMENTAL)",
2044 2054 "topic": "continue"
2045 2055 },
2046 2056 {
2047 2057 "summary": "diff repository (or selected files)",
2048 2058 "topic": "diff"
2049 2059 },
2050 2060 {
2051 2061 "summary": "dump the header and diffs for one or more changesets",
2052 2062 "topic": "export"
2053 2063 },
2054 2064 {
2055 2065 "summary": "forget the specified files on the next commit",
2056 2066 "topic": "forget"
2057 2067 },
2058 2068 {
2059 2069 "summary": "create a new repository in the given directory",
2060 2070 "topic": "init"
2061 2071 },
2062 2072 {
2063 2073 "summary": "show revision history of entire repository or files",
2064 2074 "topic": "log"
2065 2075 },
2066 2076 {
2067 2077 "summary": "merge another revision into working directory",
2068 2078 "topic": "merge"
2069 2079 },
2070 2080 {
2071 2081 "summary": "pull changes from the specified source",
2072 2082 "topic": "pull"
2073 2083 },
2074 2084 {
2075 2085 "summary": "push changes to the specified destination",
2076 2086 "topic": "push"
2077 2087 },
2078 2088 {
2079 2089 "summary": "remove the specified files on the next commit",
2080 2090 "topic": "remove"
2081 2091 },
2082 2092 {
2083 2093 "summary": "start stand-alone webserver",
2084 2094 "topic": "serve"
2085 2095 },
2086 2096 {
2087 2097 "summary": "show changed files in the working directory",
2088 2098 "topic": "status"
2089 2099 },
2090 2100 {
2091 2101 "summary": "summarize working directory state",
2092 2102 "topic": "summary"
2093 2103 },
2094 2104 {
2095 2105 "summary": "update working directory (or switch revisions)",
2096 2106 "topic": "update"
2097 2107 }
2098 2108 ],
2099 2109 "othercommands": [
2100 2110 {
2101 2111 "summary": "add all new files, delete all missing files",
2102 2112 "topic": "addremove"
2103 2113 },
2104 2114 {
2105 2115 "summary": "create an unversioned archive of a repository revision",
2106 2116 "topic": "archive"
2107 2117 },
2108 2118 {
2109 2119 "summary": "reverse effect of earlier changeset",
2110 2120 "topic": "backout"
2111 2121 },
2112 2122 {
2113 2123 "summary": "subdivision search of changesets",
2114 2124 "topic": "bisect"
2115 2125 },
2116 2126 {
2117 2127 "summary": "create a new bookmark or list existing bookmarks",
2118 2128 "topic": "bookmarks"
2119 2129 },
2120 2130 {
2121 2131 "summary": "set or show the current branch name",
2122 2132 "topic": "branch"
2123 2133 },
2124 2134 {
2125 2135 "summary": "list repository named branches",
2126 2136 "topic": "branches"
2127 2137 },
2128 2138 {
2129 2139 "summary": "create a bundle file",
2130 2140 "topic": "bundle"
2131 2141 },
2132 2142 {
2133 2143 "summary": "output the current or given revision of files",
2134 2144 "topic": "cat"
2135 2145 },
2136 2146 {
2137 2147 "summary": "show combined config settings from all hgrc files",
2138 2148 "topic": "config"
2139 2149 },
2140 2150 {
2141 2151 "summary": "mark files as copied for the next commit",
2142 2152 "topic": "copy"
2143 2153 },
2144 2154 {
2145 2155 "summary": "list tracked files",
2146 2156 "topic": "files"
2147 2157 },
2148 2158 {
2149 2159 "summary": "copy changes from other branches onto the current branch",
2150 2160 "topic": "graft"
2151 2161 },
2152 2162 {
2153 2163 "summary": "search for a pattern in specified files",
2154 2164 "topic": "grep"
2155 2165 },
2156 2166 {
2157 2167 "summary": "show branch heads",
2158 2168 "topic": "heads"
2159 2169 },
2160 2170 {
2161 2171 "summary": "show help for a given topic or a help overview",
2162 2172 "topic": "help"
2163 2173 },
2164 2174 {
2165 2175 "summary": "identify the working directory or specified revision",
2166 2176 "topic": "identify"
2167 2177 },
2168 2178 {
2169 2179 "summary": "import an ordered set of patches",
2170 2180 "topic": "import"
2171 2181 },
2172 2182 {
2173 2183 "summary": "show new changesets found in source",
2174 2184 "topic": "incoming"
2175 2185 },
2176 2186 {
2177 2187 "summary": "output the current or given revision of the project manifest",
2178 2188 "topic": "manifest"
2179 2189 },
2180 2190 {
2181 2191 "summary": "show changesets not found in the destination",
2182 2192 "topic": "outgoing"
2183 2193 },
2184 2194 {
2185 2195 "summary": "show aliases for remote repositories",
2186 2196 "topic": "paths"
2187 2197 },
2188 2198 {
2189 2199 "summary": "set or show the current phase name",
2190 2200 "topic": "phase"
2191 2201 },
2192 2202 {
2193 2203 "summary": "removes files not tracked by Mercurial",
2194 2204 "topic": "purge"
2195 2205 },
2196 2206 {
2197 2207 "summary": "roll back an interrupted transaction",
2198 2208 "topic": "recover"
2199 2209 },
2200 2210 {
2201 2211 "summary": "rename files; equivalent of copy + remove",
2202 2212 "topic": "rename"
2203 2213 },
2204 2214 {
2205 2215 "summary": "redo merges or set/view the merge status of files",
2206 2216 "topic": "resolve"
2207 2217 },
2208 2218 {
2209 2219 "summary": "restore files to their checkout state",
2210 2220 "topic": "revert"
2211 2221 },
2212 2222 {
2213 2223 "summary": "print the root (top) of the current working directory",
2214 2224 "topic": "root"
2215 2225 },
2216 2226 {
2217 2227 "summary": "save and set aside changes from the working directory",
2218 2228 "topic": "shelve"
2219 2229 },
2220 2230 {
2221 2231 "summary": "add one or more tags for the current or given revision",
2222 2232 "topic": "tag"
2223 2233 },
2224 2234 {
2225 2235 "summary": "list repository tags",
2226 2236 "topic": "tags"
2227 2237 },
2228 2238 {
2229 2239 "summary": "apply one or more bundle files",
2230 2240 "topic": "unbundle"
2231 2241 },
2232 2242 {
2233 2243 "summary": "restore a shelved change to the working directory",
2234 2244 "topic": "unshelve"
2235 2245 },
2236 2246 {
2237 2247 "summary": "verify the integrity of the repository",
2238 2248 "topic": "verify"
2239 2249 },
2240 2250 {
2241 2251 "summary": "output version and copyright information",
2242 2252 "topic": "version"
2243 2253 }
2244 2254 ],
2245 2255 "topics": [
2246 2256 {
2247 2257 "summary": "Bundle File Formats",
2248 2258 "topic": "bundlespec"
2249 2259 },
2250 2260 {
2251 2261 "summary": "Colorizing Outputs",
2252 2262 "topic": "color"
2253 2263 },
2254 2264 {
2255 2265 "summary": "Configuration Files",
2256 2266 "topic": "config"
2257 2267 },
2258 2268 {
2259 2269 "summary": "Date Formats",
2260 2270 "topic": "dates"
2261 2271 },
2262 2272 {
2263 2273 "summary": "Deprecated Features",
2264 2274 "topic": "deprecated"
2265 2275 },
2266 2276 {
2267 2277 "summary": "Diff Formats",
2268 2278 "topic": "diffs"
2269 2279 },
2270 2280 {
2271 2281 "summary": "Environment Variables",
2272 2282 "topic": "environment"
2273 2283 },
2274 2284 {
2275 2285 "summary": "Safely rewriting history (EXPERIMENTAL)",
2276 2286 "topic": "evolution"
2277 2287 },
2278 2288 {
2279 2289 "summary": "Using Additional Features",
2280 2290 "topic": "extensions"
2281 2291 },
2282 2292 {
2283 2293 "summary": "Specifying File Sets",
2284 2294 "topic": "filesets"
2285 2295 },
2286 2296 {
2287 2297 "summary": "Command-line flags",
2288 2298 "topic": "flags"
2289 2299 },
2290 2300 {
2291 2301 "summary": "Glossary",
2292 2302 "topic": "glossary"
2293 2303 },
2294 2304 {
2295 2305 "summary": "Syntax for Mercurial Ignore Files",
2296 2306 "topic": "hgignore"
2297 2307 },
2298 2308 {
2299 2309 "summary": "Configuring hgweb",
2300 2310 "topic": "hgweb"
2301 2311 },
2302 2312 {
2303 2313 "summary": "Technical implementation topics",
2304 2314 "topic": "internals"
2305 2315 },
2306 2316 {
2307 2317 "summary": "Merge Tools",
2308 2318 "topic": "merge-tools"
2309 2319 },
2310 2320 {
2311 2321 "summary": "Pager Support",
2312 2322 "topic": "pager"
2313 2323 },
2314 2324 {
2315 2325 "summary": "File Name Patterns",
2316 2326 "topic": "patterns"
2317 2327 },
2318 2328 {
2319 2329 "summary": "Working with Phases",
2320 2330 "topic": "phases"
2321 2331 },
2322 2332 {
2323 2333 "summary": "Specifying Revisions",
2324 2334 "topic": "revisions"
2325 2335 },
2326 2336 {
2327 2337 "summary": "Rust in Mercurial",
2328 2338 "topic": "rust"
2329 2339 },
2330 2340 {
2331 2341 "summary": "Using Mercurial from scripts and automation",
2332 2342 "topic": "scripting"
2333 2343 },
2334 2344 {
2335 2345 "summary": "Subrepositories",
2336 2346 "topic": "subrepos"
2337 2347 },
2338 2348 {
2339 2349 "summary": "Template Usage",
2340 2350 "topic": "templating"
2341 2351 },
2342 2352 {
2343 2353 "summary": "URL Paths",
2344 2354 "topic": "urls"
2345 2355 }
2346 2356 ]
2347 2357 }
2348 2358
2349 2359 help/{topic} shows an individual help topic
2350 2360
2351 2361 $ request json-help/phases
2352 2362 200 Script output follows
2353 2363
2354 2364 {
2355 2365 "rawdoc": "Working with Phases\n*", (glob)
2356 2366 "topic": "phases"
2357 2367 }
2358 2368
2359 2369 Error page shouldn't crash
2360 2370
2361 2371 $ request json-changeset/deadbeef
2362 2372 404 Not Found
2363 2373
2364 2374 {
2365 2375 "error": "unknown revision 'deadbeef'"
2366 2376 }
2367 2377 [1]
2368 2378
2369 2379 Commit message with Japanese Kanji 'Noh', which ends with '\x5c'
2370 2380
2371 2381 $ echo foo >> da/foo
2372 2382 >>> open('msg', 'wb').write(b'\x94\x5c\x0a') and None
2373 2383 $ HGENCODING=cp932 hg ci -l msg
2374 2384
2375 2385 Commit message with null character
2376 2386
2377 2387 $ echo foo >> da/foo
2378 2388 >>> open('msg', 'wb').write(b'commit with null character: \0\n') and None
2379 2389 $ hg ci -l msg
2380 2390 $ rm msg
2381 2391
2382 2392 Stop and restart with HGENCODING=cp932
2383 2393
2384 2394 $ killdaemons.py
2385 2395 $ HGENCODING=cp932 hg serve -p $HGPORT -d --pid-file=hg.pid \
2386 2396 > -A access.log -E error.log
2387 2397 $ cat hg.pid >> $DAEMON_PIDS
2388 2398
2389 2399 Test json escape of multibyte characters
2390 2400
2391 2401 $ request json-filelog/tip/da/foo?revcount=2 | grep '"desc":'
2392 2402 "desc": "commit with null character: \u0000",
2393 2403 "desc": "\u80fd",
General Comments 0
You need to be logged in to leave comments. Login now