##// END OF EJS Templates
hgweb: add diffs to the json changeset template...
Jordi Gutiérrez Hermoso -
r44117:d155bf11 default
parent child Browse files
Show More
@@ -1,250 +1,251
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 68 "files": [{join(files, ", ")}],
69 "diff": [{join(diff, ", ")}],
69 70 "phase": {phase|json}
70 71 }'
71 72 changesetbranch = '{name|utf8|json}'
72 73 changesetbookmark = '{bookmark|utf8|json}'
73 74 changesettag = '{tag|utf8|json}'
74 75 changesetparent = '{node|json}'
75 76 manifest = '\{
76 77 "node": {node|json},
77 78 "abspath": {path|json},
78 79 "directories": [{join(dentries%direntry, ", ")}],
79 80 "files": [{join(fentries%fileentry, ", ")}],
80 81 "bookmarks": [{join(bookmarks%name, ", ")}],
81 82 "tags": [{join(tags%name, ", ")}]
82 83 }'
83 84 name = '{name|utf8|json}'
84 85 direntry = '\{
85 86 "abspath": {path|json},
86 87 "basename": {basename|json},
87 88 "emptydirs": {emptydirs|json}
88 89 }'
89 90 fileentry = '\{
90 91 "abspath": {file|json},
91 92 "basename": {basename|json},
92 93 "date": {date|json},
93 94 "size": {size|json},
94 95 "flags": {permissions|json}
95 96 }'
96 97 tags = '\{
97 98 "node": {node|json},
98 99 "tags": [{join(entriesnotip%tagentry, ", ")}]
99 100 }'
100 101 tagentry = '\{
101 102 "tag": {tag|utf8|json},
102 103 "node": {node|json},
103 104 "date": {date|json}
104 105 }'
105 106 bookmarks = '\{
106 107 "node": {node|json},
107 108 "bookmarks": [{join(entries%bookmarkentry, ", ")}]
108 109 }'
109 110 bookmarkentry = '\{
110 111 "bookmark": {bookmark|utf8|json},
111 112 "node": {node|json},
112 113 "date": {date|json}
113 114 }'
114 115 branches = '\{
115 116 "branches": [{join(entries%branchentry, ", ")}]
116 117 }'
117 118 branchentry = '\{
118 119 "branch": {branch|utf8|json},
119 120 "node": {node|json},
120 121 "date": {date|json},
121 122 "status": {status|json}
122 123 }'
123 124 shortlogentry = '{changelistentry}'
124 125 summary = '\{
125 126 "node": {node|json},
126 127 "lastchange": {lastchange|json},
127 128 "bookmarks": [{join(bookmarks%bookmarkentry, ", ")}],
128 129 "branches": [{join(branches%branchentry, ", ")}],
129 130 "shortlog": [{join(shortlog%shortlogentry, ", ")}],
130 131 "tags": [{join(tags%tagentry, ", ")}],
131 132 "archives": [{join(archives%archiveentry, ", ")}],
132 133 "labels": {labels|json}
133 134 }'
134 135 archiveentry = '\{
135 136 "node": {node|json},
136 137 "extension": {extension|json},
137 138 "type": {type|json},
138 139 "url": {"{urlbase}{url}archive/{node}{extension}"|json}
139 140 }'
140 141 filediff = '\{
141 142 "path": {file|json},
142 143 "node": {node|json},
143 144 "date": {date|json},
144 145 "desc": {desc|utf8|json},
145 146 "author": {author|utf8|json},
146 147 "parents": [{join(parent%changesetparent, ", ")}],
147 148 "children": [{join(child%changesetparent, ", ")}],
148 149 "diff": [{join(diff, ", ")}]
149 150 }'
150 151 diffblock = '\{
151 152 "blockno": {blockno|json},
152 153 "lines": [{join(lines, ", ")}]
153 154 }'
154 155 difflineplus = '\{
155 156 "t": "+",
156 157 "n": {lineno|json},
157 158 "l": {line|json}
158 159 }'
159 160 difflineminus = '\{
160 161 "t": "-",
161 162 "n": {lineno|json},
162 163 "l": {line|json}
163 164 }'
164 165 difflineat = '\{
165 166 "t": "@",
166 167 "n": {lineno|json},
167 168 "l": {line|json}
168 169 }'
169 170 diffline = '\{
170 171 "t": "",
171 172 "n": {lineno|json},
172 173 "l": {line|json}
173 174 }'
174 175 filecomparison = '\{
175 176 "path": {file|json},
176 177 "node": {node|json},
177 178 "date": {date|json},
178 179 "desc": {desc|utf8|json},
179 180 "author": {author|utf8|json},
180 181 "parents": [{join(parent%changesetparent, ", ")}],
181 182 "children": [{join(child%changesetparent, ", ")}],
182 183 "leftnode": {leftnode|json},
183 184 "rightnode": {rightnode|json},
184 185 "comparison": [{join(comparison, ", ")}]
185 186 }'
186 187 comparisonblock = '\{
187 188 "lines": [{join(lines, ", ")}]
188 189 }'
189 190 comparisonline = '\{
190 191 "t": {type|json},
191 192 "ln": {leftlineno|json},
192 193 "ll": {leftline|json},
193 194 "rn": {rightlineno|json},
194 195 "rl": {rightline|json}
195 196 }'
196 197 fileannotate = '\{
197 198 "abspath": {file|json},
198 199 "node": {node|json},
199 200 "author": {author|utf8|json},
200 201 "date": {date|json},
201 202 "desc": {desc|utf8|json},
202 203 "parents": [{join(parent%changesetparent, ", ")}],
203 204 "children": [{join(child%changesetparent, ", ")}],
204 205 "permissions": {permissions|json},
205 206 "annotate": [{join(annotate%fileannotation, ", ")}]
206 207 }'
207 208 fileannotation = '\{
208 209 "node": {node|json},
209 210 "author": {author|utf8|json},
210 211 "desc": {desc|utf8|json},
211 212 "abspath": {file|json},
212 213 "targetline": {targetline|json},
213 214 "line": {line|json},
214 215 "lineno": {lineno|json},
215 216 "revdate": {revdate|json}
216 217 }'
217 218 filelog = '\{
218 219 "entries": [{join(entries%changelistentry, ", ")}]
219 220 }'
220 221 helptopics = '\{
221 222 "topics": [{join(topics%helptopicentry, ", ")}],
222 223 "earlycommands": [{join(earlycommands%helptopicentry, ", ")}],
223 224 "othercommands": [{join(othercommands%helptopicentry, ", ")}]
224 225 }'
225 226 helptopicentry = '\{
226 227 "topic": {topic|utf8|json},
227 228 "summary": {summary|utf8|json}
228 229 }'
229 230 help = '\{
230 231 "topic": {topic|utf8|json},
231 232 "rawdoc": {doc|utf8|json}
232 233 }'
233 234 filenodelink = '\{
234 235 "file": {file|json},
235 236 "status": {status|json}
236 237 }'
237 238 filenolink = '{filenodelink}'
238 239 index = '\{
239 240 "entries": [{join(entries%indexentry, ", ")}]
240 241 }'
241 242 indexentry = '\{
242 243 "name": {name|utf8|json},
243 244 "description": {description|utf8|json},
244 245 "contact": {contact|utf8|json},
245 246 "lastchange": {lastchange|json},
246 247 "labels": {labels|json}
247 248 }'
248 249 error = '\{
249 250 "error": {error|utf8|json}
250 251 }'
@@ -1,2264 +1,2381
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 780 "date": [
781 781 0.0,
782 782 0
783 783 ],
784 784 "desc": "merge test-branch into default",
785 "diff": [],
785 786 "files": [
786 787 {
787 788 "file": "foo-new",
788 789 "status": "modified"
789 790 }
790 791 ],
791 792 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
792 793 "parents": [
793 794 "ceed296fe500c3fac9541e31dad860cb49c89e45",
794 795 "ed66c30e87eb65337c05a4229efaa5f1d5285a90"
795 796 ],
796 797 "phase": "draft",
797 798 "tags": [
798 799 "tip"
799 800 ],
800 801 "user": "test"
801 802 }
802 803
803 804 changeset/{revision} shows tags
804 805
805 806 $ request json-rev/78896eb0e102
806 807 200 Script output follows
807 808
808 809 {
809 810 "bookmarks": [],
810 811 "branch": "default",
811 812 "date": [
812 813 0.0,
813 814 0
814 815 ],
815 816 "desc": "move foo",
817 "diff": [
818 {
819 "blockno": 1,
820 "lines": [
821 {
822 "l": "--- a/foo\tThu Jan 01 00:00:00 1970 +0000\n",
823 "n": 1,
824 "t": "-"
825 },
826 {
827 "l": "+++ /dev/null\tThu Jan 01 00:00:00 1970 +0000\n",
828 "n": 2,
829 "t": "+"
830 },
831 {
832 "l": "@@ -1,1 +0,0 @@\n",
833 "n": 3,
834 "t": "@"
835 },
836 {
837 "l": "-bar\n",
838 "n": 4,
839 "t": "-"
840 }
841 ]
842 },
843 {
844 "blockno": 2,
845 "lines": [
846 {
847 "l": "--- /dev/null\tThu Jan 01 00:00:00 1970 +0000\n",
848 "n": 1,
849 "t": "-"
850 },
851 {
852 "l": "+++ b/foo-new\tThu Jan 01 00:00:00 1970 +0000\n",
853 "n": 2,
854 "t": "+"
855 },
856 {
857 "l": "@@ -0,0 +1,1 @@\n",
858 "n": 3,
859 "t": "@"
860 },
861 {
862 "l": "+bar\n",
863 "n": 4,
864 "t": "+"
865 }
866 ]
867 }
868 ],
816 869 "files": [
817 870 {
818 871 "file": "foo",
819 872 "status": "removed"
820 873 },
821 874 {
822 875 "file": "foo-new",
823 876 "status": "added"
824 877 }
825 878 ],
826 879 "node": "78896eb0e102174ce9278438a95e12543e4367a7",
827 880 "parents": [
828 881 "8d7c456572acf3557e8ed8a07286b10c408bcec5"
829 882 ],
830 883 "phase": "public",
831 884 "tags": [
832 885 "tag1"
833 886 ],
834 887 "user": "test"
835 888 }
836 889
837 890 changeset/{revision} shows bookmarks
838 891
839 892 $ request json-rev/8d7c456572ac
840 893 200 Script output follows
841 894
842 895 {
843 896 "bookmarks": [
844 897 "bookmark1"
845 898 ],
846 899 "branch": "default",
847 900 "date": [
848 901 0.0,
849 902 0
850 903 ],
851 904 "desc": "modify da/foo",
905 "diff": [
906 {
907 "blockno": 1,
908 "lines": [
909 {
910 "l": "--- a/da/foo\tThu Jan 01 00:00:00 1970 +0000\n",
911 "n": 1,
912 "t": "-"
913 },
914 {
915 "l": "+++ b/da/foo\tThu Jan 01 00:00:00 1970 +0000\n",
916 "n": 2,
917 "t": "+"
918 },
919 {
920 "l": "@@ -1,1 +1,1 @@\n",
921 "n": 3,
922 "t": "@"
923 },
924 {
925 "l": "-foo\n",
926 "n": 4,
927 "t": "-"
928 },
929 {
930 "l": "+bar\n",
931 "n": 5,
932 "t": "+"
933 }
934 ]
935 }
936 ],
852 937 "files": [
853 938 {
854 939 "file": "da/foo",
855 940 "status": "modified"
856 941 }
857 942 ],
858 943 "node": "8d7c456572acf3557e8ed8a07286b10c408bcec5",
859 944 "parents": [
860 945 "f8bbb9024b10f93cdbb8d940337398291d40dea8"
861 946 ],
862 947 "phase": "public",
863 948 "tags": [],
864 949 "user": "test"
865 950 }
866 951
867 952 changeset/{revision} shows branches
868 953
869 954 $ request json-rev/6ab967a8ab34
870 955 200 Script output follows
871 956
872 957 {
873 958 "bookmarks": [],
874 959 "branch": "test-branch",
875 960 "date": [
876 961 0.0,
877 962 0
878 963 ],
879 964 "desc": "create test branch",
965 "diff": [
966 {
967 "blockno": 1,
968 "lines": [
969 {
970 "l": "--- a/foo\tThu Jan 01 00:00:00 1970 +0000\n",
971 "n": 1,
972 "t": "-"
973 },
974 {
975 "l": "+++ b/foo\tThu Jan 01 00:00:00 1970 +0000\n",
976 "n": 2,
977 "t": "+"
978 },
979 {
980 "l": "@@ -1,1 +1,1 @@\n",
981 "n": 3,
982 "t": "@"
983 },
984 {
985 "l": "-foo\n",
986 "n": 4,
987 "t": "-"
988 },
989 {
990 "l": "+branch\n",
991 "n": 5,
992 "t": "+"
993 }
994 ]
995 }
996 ],
880 997 "files": [
881 998 {
882 999 "file": "foo",
883 1000 "status": "modified"
884 1001 }
885 1002 ],
886 1003 "node": "6ab967a8ab3489227a83f80e920faa039a71819f",
887 1004 "parents": [
888 1005 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
889 1006 ],
890 1007 "phase": "draft",
891 1008 "tags": [],
892 1009 "user": "test"
893 1010 }
894 1011
895 1012 manifest/{revision}/{path} shows info about a directory at a revision
896 1013
897 1014 $ request json-manifest/06e557f3edf6/
898 1015 200 Script output follows
899 1016
900 1017 {
901 1018 "abspath": "/",
902 1019 "bookmarks": [],
903 1020 "directories": [
904 1021 {
905 1022 "abspath": "/da",
906 1023 "basename": "da",
907 1024 "emptydirs": ""
908 1025 }
909 1026 ],
910 1027 "files": [
911 1028 {
912 1029 "abspath": "foo",
913 1030 "basename": "foo",
914 1031 "date": [
915 1032 0.0,
916 1033 0
917 1034 ],
918 1035 "flags": "",
919 1036 "size": 4
920 1037 }
921 1038 ],
922 1039 "node": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
923 1040 "tags": []
924 1041 }
925 1042
926 1043 tags/ shows tags info
927 1044
928 1045 $ request json-tags
929 1046 200 Script output follows
930 1047
931 1048 {
932 1049 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
933 1050 "tags": [
934 1051 {
935 1052 "date": [
936 1053 0.0,
937 1054 0
938 1055 ],
939 1056 "node": "f2890a05fea49bfaf9fb27ed5490894eba32da78",
940 1057 "tag": "tag2"
941 1058 },
942 1059 {
943 1060 "date": [
944 1061 0.0,
945 1062 0
946 1063 ],
947 1064 "node": "78896eb0e102174ce9278438a95e12543e4367a7",
948 1065 "tag": "tag1"
949 1066 }
950 1067 ]
951 1068 }
952 1069
953 1070 bookmarks/ shows bookmarks info
954 1071
955 1072 $ request json-bookmarks
956 1073 200 Script output follows
957 1074
958 1075 {
959 1076 "bookmarks": [
960 1077 {
961 1078 "bookmark": "bookmark2",
962 1079 "date": [
963 1080 0.0,
964 1081 0
965 1082 ],
966 1083 "node": "ceed296fe500c3fac9541e31dad860cb49c89e45"
967 1084 },
968 1085 {
969 1086 "bookmark": "bookmark1",
970 1087 "date": [
971 1088 0.0,
972 1089 0
973 1090 ],
974 1091 "node": "8d7c456572acf3557e8ed8a07286b10c408bcec5"
975 1092 }
976 1093 ],
977 1094 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7"
978 1095 }
979 1096
980 1097 branches/ shows branches info
981 1098
982 1099 $ request json-branches
983 1100 200 Script output follows
984 1101
985 1102 {
986 1103 "branches": [
987 1104 {
988 1105 "branch": "default",
989 1106 "date": [
990 1107 0.0,
991 1108 0
992 1109 ],
993 1110 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
994 1111 "status": "open"
995 1112 },
996 1113 {
997 1114 "branch": "test-branch",
998 1115 "date": [
999 1116 0.0,
1000 1117 0
1001 1118 ],
1002 1119 "node": "ed66c30e87eb65337c05a4229efaa5f1d5285a90",
1003 1120 "status": "inactive"
1004 1121 }
1005 1122 ]
1006 1123 }
1007 1124
1008 1125 summary/ shows a summary of repository state
1009 1126
1010 1127 $ request json-summary
1011 1128 200 Script output follows
1012 1129
1013 1130 {
1014 1131 "archives": [
1015 1132 {
1016 1133 "extension": ".tar.bz2",
1017 1134 "node": "tip",
1018 1135 "type": "bz2",
1019 1136 "url": "http://*:$HGPORT/archive/tip.tar.bz2" (glob)
1020 1137 }
1021 1138 ],
1022 1139 "bookmarks": [
1023 1140 {
1024 1141 "bookmark": "bookmark2",
1025 1142 "date": [
1026 1143 0.0,
1027 1144 0
1028 1145 ],
1029 1146 "node": "ceed296fe500c3fac9541e31dad860cb49c89e45"
1030 1147 },
1031 1148 {
1032 1149 "bookmark": "bookmark1",
1033 1150 "date": [
1034 1151 0.0,
1035 1152 0
1036 1153 ],
1037 1154 "node": "8d7c456572acf3557e8ed8a07286b10c408bcec5"
1038 1155 }
1039 1156 ],
1040 1157 "branches": [
1041 1158 {
1042 1159 "branch": "default",
1043 1160 "date": [
1044 1161 0.0,
1045 1162 0
1046 1163 ],
1047 1164 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
1048 1165 "status": "open"
1049 1166 },
1050 1167 {
1051 1168 "branch": "test-branch",
1052 1169 "date": [
1053 1170 0.0,
1054 1171 0
1055 1172 ],
1056 1173 "node": "ed66c30e87eb65337c05a4229efaa5f1d5285a90",
1057 1174 "status": "inactive"
1058 1175 }
1059 1176 ],
1060 1177 "labels": [],
1061 1178 "lastchange": [
1062 1179 0.0,
1063 1180 0
1064 1181 ],
1065 1182 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
1066 1183 "shortlog": [
1067 1184 {
1068 1185 "bookmarks": [],
1069 1186 "branch": "default",
1070 1187 "date": [
1071 1188 0.0,
1072 1189 0
1073 1190 ],
1074 1191 "desc": "merge test-branch into default",
1075 1192 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
1076 1193 "parents": [
1077 1194 "ceed296fe500c3fac9541e31dad860cb49c89e45",
1078 1195 "ed66c30e87eb65337c05a4229efaa5f1d5285a90"
1079 1196 ],
1080 1197 "phase": "draft",
1081 1198 "tags": [
1082 1199 "tip"
1083 1200 ],
1084 1201 "user": "test"
1085 1202 },
1086 1203 {
1087 1204 "bookmarks": [],
1088 1205 "branch": "test-branch",
1089 1206 "date": [
1090 1207 0.0,
1091 1208 0
1092 1209 ],
1093 1210 "desc": "another commit in test-branch",
1094 1211 "node": "ed66c30e87eb65337c05a4229efaa5f1d5285a90",
1095 1212 "parents": [
1096 1213 "6ab967a8ab3489227a83f80e920faa039a71819f"
1097 1214 ],
1098 1215 "phase": "draft",
1099 1216 "tags": [],
1100 1217 "user": "test"
1101 1218 },
1102 1219 {
1103 1220 "bookmarks": [],
1104 1221 "branch": "test-branch",
1105 1222 "date": [
1106 1223 0.0,
1107 1224 0
1108 1225 ],
1109 1226 "desc": "create test branch",
1110 1227 "node": "6ab967a8ab3489227a83f80e920faa039a71819f",
1111 1228 "parents": [
1112 1229 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
1113 1230 ],
1114 1231 "phase": "draft",
1115 1232 "tags": [],
1116 1233 "user": "test"
1117 1234 },
1118 1235 {
1119 1236 "bookmarks": [
1120 1237 "bookmark2"
1121 1238 ],
1122 1239 "branch": "default",
1123 1240 "date": [
1124 1241 0.0,
1125 1242 0
1126 1243 ],
1127 1244 "desc": "create tag2",
1128 1245 "node": "ceed296fe500c3fac9541e31dad860cb49c89e45",
1129 1246 "parents": [
1130 1247 "f2890a05fea49bfaf9fb27ed5490894eba32da78"
1131 1248 ],
1132 1249 "phase": "draft",
1133 1250 "tags": [],
1134 1251 "user": "test"
1135 1252 },
1136 1253 {
1137 1254 "bookmarks": [],
1138 1255 "branch": "default",
1139 1256 "date": [
1140 1257 0.0,
1141 1258 0
1142 1259 ],
1143 1260 "desc": "another commit to da/foo",
1144 1261 "node": "f2890a05fea49bfaf9fb27ed5490894eba32da78",
1145 1262 "parents": [
1146 1263 "93a8ce14f89156426b7fa981af8042da53f03aa0"
1147 1264 ],
1148 1265 "phase": "draft",
1149 1266 "tags": [
1150 1267 "tag2"
1151 1268 ],
1152 1269 "user": "test"
1153 1270 },
1154 1271 {
1155 1272 "bookmarks": [],
1156 1273 "branch": "default",
1157 1274 "date": [
1158 1275 0.0,
1159 1276 0
1160 1277 ],
1161 1278 "desc": "create tag",
1162 1279 "node": "93a8ce14f89156426b7fa981af8042da53f03aa0",
1163 1280 "parents": [
1164 1281 "78896eb0e102174ce9278438a95e12543e4367a7"
1165 1282 ],
1166 1283 "phase": "public",
1167 1284 "tags": [],
1168 1285 "user": "test"
1169 1286 },
1170 1287 {
1171 1288 "bookmarks": [],
1172 1289 "branch": "default",
1173 1290 "date": [
1174 1291 0.0,
1175 1292 0
1176 1293 ],
1177 1294 "desc": "move foo",
1178 1295 "node": "78896eb0e102174ce9278438a95e12543e4367a7",
1179 1296 "parents": [
1180 1297 "8d7c456572acf3557e8ed8a07286b10c408bcec5"
1181 1298 ],
1182 1299 "phase": "public",
1183 1300 "tags": [
1184 1301 "tag1"
1185 1302 ],
1186 1303 "user": "test"
1187 1304 },
1188 1305 {
1189 1306 "bookmarks": [
1190 1307 "bookmark1"
1191 1308 ],
1192 1309 "branch": "default",
1193 1310 "date": [
1194 1311 0.0,
1195 1312 0
1196 1313 ],
1197 1314 "desc": "modify da/foo",
1198 1315 "node": "8d7c456572acf3557e8ed8a07286b10c408bcec5",
1199 1316 "parents": [
1200 1317 "f8bbb9024b10f93cdbb8d940337398291d40dea8"
1201 1318 ],
1202 1319 "phase": "public",
1203 1320 "tags": [],
1204 1321 "user": "test"
1205 1322 },
1206 1323 {
1207 1324 "bookmarks": [],
1208 1325 "branch": "default",
1209 1326 "date": [
1210 1327 0.0,
1211 1328 0
1212 1329 ],
1213 1330 "desc": "modify foo",
1214 1331 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
1215 1332 "parents": [
1216 1333 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
1217 1334 ],
1218 1335 "phase": "public",
1219 1336 "tags": [],
1220 1337 "user": "test"
1221 1338 },
1222 1339 {
1223 1340 "bookmarks": [],
1224 1341 "branch": "default",
1225 1342 "date": [
1226 1343 0.0,
1227 1344 0
1228 1345 ],
1229 1346 "desc": "initial",
1230 1347 "node": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
1231 1348 "parents": [],
1232 1349 "phase": "public",
1233 1350 "tags": [],
1234 1351 "user": "test"
1235 1352 }
1236 1353 ],
1237 1354 "tags": [
1238 1355 {
1239 1356 "date": [
1240 1357 0.0,
1241 1358 0
1242 1359 ],
1243 1360 "node": "f2890a05fea49bfaf9fb27ed5490894eba32da78",
1244 1361 "tag": "tag2"
1245 1362 },
1246 1363 {
1247 1364 "date": [
1248 1365 0.0,
1249 1366 0
1250 1367 ],
1251 1368 "node": "78896eb0e102174ce9278438a95e12543e4367a7",
1252 1369 "tag": "tag1"
1253 1370 }
1254 1371 ]
1255 1372 }
1256 1373
1257 1374 $ request json-changelog?rev=create
1258 1375 200 Script output follows
1259 1376
1260 1377 {
1261 1378 "entries": [
1262 1379 {
1263 1380 "bookmarks": [],
1264 1381 "branch": "test-branch",
1265 1382 "date": [
1266 1383 0.0,
1267 1384 0
1268 1385 ],
1269 1386 "desc": "create test branch",
1270 1387 "node": "6ab967a8ab3489227a83f80e920faa039a71819f",
1271 1388 "parents": [
1272 1389 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
1273 1390 ],
1274 1391 "phase": "draft",
1275 1392 "tags": [],
1276 1393 "user": "test"
1277 1394 },
1278 1395 {
1279 1396 "bookmarks": [
1280 1397 "bookmark2"
1281 1398 ],
1282 1399 "branch": "default",
1283 1400 "date": [
1284 1401 0.0,
1285 1402 0
1286 1403 ],
1287 1404 "desc": "create tag2",
1288 1405 "node": "ceed296fe500c3fac9541e31dad860cb49c89e45",
1289 1406 "parents": [
1290 1407 "f2890a05fea49bfaf9fb27ed5490894eba32da78"
1291 1408 ],
1292 1409 "phase": "draft",
1293 1410 "tags": [],
1294 1411 "user": "test"
1295 1412 },
1296 1413 {
1297 1414 "bookmarks": [],
1298 1415 "branch": "default",
1299 1416 "date": [
1300 1417 0.0,
1301 1418 0
1302 1419 ],
1303 1420 "desc": "create tag",
1304 1421 "node": "93a8ce14f89156426b7fa981af8042da53f03aa0",
1305 1422 "parents": [
1306 1423 "78896eb0e102174ce9278438a95e12543e4367a7"
1307 1424 ],
1308 1425 "phase": "public",
1309 1426 "tags": [],
1310 1427 "user": "test"
1311 1428 }
1312 1429 ],
1313 1430 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
1314 1431 "query": "create"
1315 1432 }
1316 1433
1317 1434 filediff/{revision}/{path} shows changes to a file in a revision
1318 1435
1319 1436 $ request json-diff/f8bbb9024b10/foo
1320 1437 200 Script output follows
1321 1438
1322 1439 {
1323 1440 "author": "test",
1324 1441 "children": [],
1325 1442 "date": [
1326 1443 0.0,
1327 1444 0
1328 1445 ],
1329 1446 "desc": "modify foo",
1330 1447 "diff": [
1331 1448 {
1332 1449 "blockno": 1,
1333 1450 "lines": [
1334 1451 {
1335 1452 "l": "--- a/foo\tThu Jan 01 00:00:00 1970 +0000\n",
1336 1453 "n": 1,
1337 1454 "t": "-"
1338 1455 },
1339 1456 {
1340 1457 "l": "+++ b/foo\tThu Jan 01 00:00:00 1970 +0000\n",
1341 1458 "n": 2,
1342 1459 "t": "+"
1343 1460 },
1344 1461 {
1345 1462 "l": "@@ -1,1 +1,1 @@\n",
1346 1463 "n": 3,
1347 1464 "t": "@"
1348 1465 },
1349 1466 {
1350 1467 "l": "-foo\n",
1351 1468 "n": 4,
1352 1469 "t": "-"
1353 1470 },
1354 1471 {
1355 1472 "l": "+bar\n",
1356 1473 "n": 5,
1357 1474 "t": "+"
1358 1475 }
1359 1476 ]
1360 1477 }
1361 1478 ],
1362 1479 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
1363 1480 "parents": [
1364 1481 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
1365 1482 ],
1366 1483 "path": "foo"
1367 1484 }
1368 1485
1369 1486 comparison/{revision}/{path} shows information about before and after for a file
1370 1487
1371 1488 $ request json-comparison/f8bbb9024b10/foo
1372 1489 200 Script output follows
1373 1490
1374 1491 {
1375 1492 "author": "test",
1376 1493 "children": [],
1377 1494 "comparison": [
1378 1495 {
1379 1496 "lines": [
1380 1497 {
1381 1498 "ll": "foo",
1382 1499 "ln": 1,
1383 1500 "rl": "bar",
1384 1501 "rn": 1,
1385 1502 "t": "replace"
1386 1503 }
1387 1504 ]
1388 1505 }
1389 1506 ],
1390 1507 "date": [
1391 1508 0.0,
1392 1509 0
1393 1510 ],
1394 1511 "desc": "modify foo",
1395 1512 "leftnode": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
1396 1513 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
1397 1514 "parents": [
1398 1515 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
1399 1516 ],
1400 1517 "path": "foo",
1401 1518 "rightnode": "f8bbb9024b10f93cdbb8d940337398291d40dea8"
1402 1519 }
1403 1520
1404 1521 annotate/{revision}/{path} shows annotations for each line
1405 1522
1406 1523 $ request json-annotate/f8bbb9024b10/foo
1407 1524 200 Script output follows
1408 1525
1409 1526 {
1410 1527 "abspath": "foo",
1411 1528 "annotate": [
1412 1529 {
1413 1530 "abspath": "foo",
1414 1531 "author": "test",
1415 1532 "desc": "modify foo",
1416 1533 "line": "bar\n",
1417 1534 "lineno": 1,
1418 1535 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
1419 1536 "revdate": [
1420 1537 0.0,
1421 1538 0
1422 1539 ],
1423 1540 "targetline": 1
1424 1541 }
1425 1542 ],
1426 1543 "author": "test",
1427 1544 "children": [],
1428 1545 "date": [
1429 1546 0.0,
1430 1547 0
1431 1548 ],
1432 1549 "desc": "modify foo",
1433 1550 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
1434 1551 "parents": [
1435 1552 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
1436 1553 ],
1437 1554 "permissions": ""
1438 1555 }
1439 1556
1440 1557 filelog/{revision}/{path} shows history of a single file
1441 1558
1442 1559 $ request json-filelog/f8bbb9024b10/foo
1443 1560 200 Script output follows
1444 1561
1445 1562 {
1446 1563 "entries": [
1447 1564 {
1448 1565 "bookmarks": [],
1449 1566 "branch": "default",
1450 1567 "date": [
1451 1568 0.0,
1452 1569 0
1453 1570 ],
1454 1571 "desc": "modify foo",
1455 1572 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
1456 1573 "parents": [
1457 1574 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
1458 1575 ],
1459 1576 "phase": "public",
1460 1577 "tags": [],
1461 1578 "user": "test"
1462 1579 },
1463 1580 {
1464 1581 "bookmarks": [],
1465 1582 "branch": "default",
1466 1583 "date": [
1467 1584 0.0,
1468 1585 0
1469 1586 ],
1470 1587 "desc": "initial",
1471 1588 "node": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
1472 1589 "parents": [],
1473 1590 "phase": "public",
1474 1591 "tags": [],
1475 1592 "user": "test"
1476 1593 }
1477 1594 ]
1478 1595 }
1479 1596
1480 1597 $ request json-filelog/cc725e08502a/da/foo
1481 1598 200 Script output follows
1482 1599
1483 1600 {
1484 1601 "entries": [
1485 1602 {
1486 1603 "bookmarks": [],
1487 1604 "branch": "default",
1488 1605 "date": [
1489 1606 0.0,
1490 1607 0
1491 1608 ],
1492 1609 "desc": "another commit to da/foo",
1493 1610 "node": "f2890a05fea49bfaf9fb27ed5490894eba32da78",
1494 1611 "parents": [
1495 1612 "8d7c456572acf3557e8ed8a07286b10c408bcec5"
1496 1613 ],
1497 1614 "phase": "draft",
1498 1615 "tags": [
1499 1616 "tag2"
1500 1617 ],
1501 1618 "user": "test"
1502 1619 },
1503 1620 {
1504 1621 "bookmarks": [
1505 1622 "bookmark1"
1506 1623 ],
1507 1624 "branch": "default",
1508 1625 "date": [
1509 1626 0.0,
1510 1627 0
1511 1628 ],
1512 1629 "desc": "modify da/foo",
1513 1630 "node": "8d7c456572acf3557e8ed8a07286b10c408bcec5",
1514 1631 "parents": [
1515 1632 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
1516 1633 ],
1517 1634 "phase": "public",
1518 1635 "tags": [],
1519 1636 "user": "test"
1520 1637 },
1521 1638 {
1522 1639 "bookmarks": [],
1523 1640 "branch": "default",
1524 1641 "date": [
1525 1642 0.0,
1526 1643 0
1527 1644 ],
1528 1645 "desc": "initial",
1529 1646 "node": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
1530 1647 "parents": [],
1531 1648 "phase": "public",
1532 1649 "tags": [],
1533 1650 "user": "test"
1534 1651 }
1535 1652 ]
1536 1653 }
1537 1654
1538 1655 (archive/ doesn't use templating, so ignore it)
1539 1656
1540 1657 (static/ doesn't use templating, so ignore it)
1541 1658
1542 1659 graph/ shows information that can be used to render a graph of the DAG
1543 1660
1544 1661 $ request json-graph
1545 1662 200 Script output follows
1546 1663
1547 1664 {
1548 1665 "changeset_count": 10,
1549 1666 "changesets": [
1550 1667 {
1551 1668 "bookmarks": [],
1552 1669 "branch": "default",
1553 1670 "col": 0,
1554 1671 "color": 1,
1555 1672 "date": [
1556 1673 0.0,
1557 1674 0
1558 1675 ],
1559 1676 "desc": "merge test-branch into default",
1560 1677 "edges": [
1561 1678 {
1562 1679 "bcolor": "",
1563 1680 "col": 0,
1564 1681 "color": 1,
1565 1682 "nextcol": 0,
1566 1683 "width": -1
1567 1684 },
1568 1685 {
1569 1686 "bcolor": "",
1570 1687 "col": 0,
1571 1688 "color": 1,
1572 1689 "nextcol": 1,
1573 1690 "width": -1
1574 1691 }
1575 1692 ],
1576 1693 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
1577 1694 "parents": [
1578 1695 "ceed296fe500c3fac9541e31dad860cb49c89e45",
1579 1696 "ed66c30e87eb65337c05a4229efaa5f1d5285a90"
1580 1697 ],
1581 1698 "phase": "draft",
1582 1699 "row": 0,
1583 1700 "tags": [
1584 1701 "tip"
1585 1702 ],
1586 1703 "user": "test"
1587 1704 },
1588 1705 {
1589 1706 "bookmarks": [],
1590 1707 "branch": "test-branch",
1591 1708 "col": 1,
1592 1709 "color": 2,
1593 1710 "date": [
1594 1711 0.0,
1595 1712 0
1596 1713 ],
1597 1714 "desc": "another commit in test-branch",
1598 1715 "edges": [
1599 1716 {
1600 1717 "bcolor": "",
1601 1718 "col": 0,
1602 1719 "color": 1,
1603 1720 "nextcol": 0,
1604 1721 "width": -1
1605 1722 },
1606 1723 {
1607 1724 "bcolor": "",
1608 1725 "col": 1,
1609 1726 "color": 2,
1610 1727 "nextcol": 1,
1611 1728 "width": -1
1612 1729 }
1613 1730 ],
1614 1731 "node": "ed66c30e87eb65337c05a4229efaa5f1d5285a90",
1615 1732 "parents": [
1616 1733 "6ab967a8ab3489227a83f80e920faa039a71819f"
1617 1734 ],
1618 1735 "phase": "draft",
1619 1736 "row": 1,
1620 1737 "tags": [],
1621 1738 "user": "test"
1622 1739 },
1623 1740 {
1624 1741 "bookmarks": [],
1625 1742 "branch": "test-branch",
1626 1743 "col": 1,
1627 1744 "color": 2,
1628 1745 "date": [
1629 1746 0.0,
1630 1747 0
1631 1748 ],
1632 1749 "desc": "create test branch",
1633 1750 "edges": [
1634 1751 {
1635 1752 "bcolor": "",
1636 1753 "col": 0,
1637 1754 "color": 1,
1638 1755 "nextcol": 0,
1639 1756 "width": -1
1640 1757 },
1641 1758 {
1642 1759 "bcolor": "",
1643 1760 "col": 1,
1644 1761 "color": 2,
1645 1762 "nextcol": 1,
1646 1763 "width": -1
1647 1764 }
1648 1765 ],
1649 1766 "node": "6ab967a8ab3489227a83f80e920faa039a71819f",
1650 1767 "parents": [
1651 1768 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
1652 1769 ],
1653 1770 "phase": "draft",
1654 1771 "row": 2,
1655 1772 "tags": [],
1656 1773 "user": "test"
1657 1774 },
1658 1775 {
1659 1776 "bookmarks": [
1660 1777 "bookmark2"
1661 1778 ],
1662 1779 "branch": "default",
1663 1780 "col": 0,
1664 1781 "color": 1,
1665 1782 "date": [
1666 1783 0.0,
1667 1784 0
1668 1785 ],
1669 1786 "desc": "create tag2",
1670 1787 "edges": [
1671 1788 {
1672 1789 "bcolor": "",
1673 1790 "col": 0,
1674 1791 "color": 1,
1675 1792 "nextcol": 0,
1676 1793 "width": -1
1677 1794 },
1678 1795 {
1679 1796 "bcolor": "",
1680 1797 "col": 1,
1681 1798 "color": 2,
1682 1799 "nextcol": 1,
1683 1800 "width": -1
1684 1801 }
1685 1802 ],
1686 1803 "node": "ceed296fe500c3fac9541e31dad860cb49c89e45",
1687 1804 "parents": [
1688 1805 "f2890a05fea49bfaf9fb27ed5490894eba32da78"
1689 1806 ],
1690 1807 "phase": "draft",
1691 1808 "row": 3,
1692 1809 "tags": [],
1693 1810 "user": "test"
1694 1811 },
1695 1812 {
1696 1813 "bookmarks": [],
1697 1814 "branch": "default",
1698 1815 "col": 0,
1699 1816 "color": 1,
1700 1817 "date": [
1701 1818 0.0,
1702 1819 0
1703 1820 ],
1704 1821 "desc": "another commit to da/foo",
1705 1822 "edges": [
1706 1823 {
1707 1824 "bcolor": "",
1708 1825 "col": 0,
1709 1826 "color": 1,
1710 1827 "nextcol": 0,
1711 1828 "width": -1
1712 1829 },
1713 1830 {
1714 1831 "bcolor": "",
1715 1832 "col": 1,
1716 1833 "color": 2,
1717 1834 "nextcol": 1,
1718 1835 "width": -1
1719 1836 }
1720 1837 ],
1721 1838 "node": "f2890a05fea49bfaf9fb27ed5490894eba32da78",
1722 1839 "parents": [
1723 1840 "93a8ce14f89156426b7fa981af8042da53f03aa0"
1724 1841 ],
1725 1842 "phase": "draft",
1726 1843 "row": 4,
1727 1844 "tags": [
1728 1845 "tag2"
1729 1846 ],
1730 1847 "user": "test"
1731 1848 },
1732 1849 {
1733 1850 "bookmarks": [],
1734 1851 "branch": "default",
1735 1852 "col": 0,
1736 1853 "color": 1,
1737 1854 "date": [
1738 1855 0.0,
1739 1856 0
1740 1857 ],
1741 1858 "desc": "create tag",
1742 1859 "edges": [
1743 1860 {
1744 1861 "bcolor": "",
1745 1862 "col": 0,
1746 1863 "color": 1,
1747 1864 "nextcol": 0,
1748 1865 "width": -1
1749 1866 },
1750 1867 {
1751 1868 "bcolor": "",
1752 1869 "col": 1,
1753 1870 "color": 2,
1754 1871 "nextcol": 1,
1755 1872 "width": -1
1756 1873 }
1757 1874 ],
1758 1875 "node": "93a8ce14f89156426b7fa981af8042da53f03aa0",
1759 1876 "parents": [
1760 1877 "78896eb0e102174ce9278438a95e12543e4367a7"
1761 1878 ],
1762 1879 "phase": "public",
1763 1880 "row": 5,
1764 1881 "tags": [],
1765 1882 "user": "test"
1766 1883 },
1767 1884 {
1768 1885 "bookmarks": [],
1769 1886 "branch": "default",
1770 1887 "col": 0,
1771 1888 "color": 1,
1772 1889 "date": [
1773 1890 0.0,
1774 1891 0
1775 1892 ],
1776 1893 "desc": "move foo",
1777 1894 "edges": [
1778 1895 {
1779 1896 "bcolor": "",
1780 1897 "col": 0,
1781 1898 "color": 1,
1782 1899 "nextcol": 0,
1783 1900 "width": -1
1784 1901 },
1785 1902 {
1786 1903 "bcolor": "",
1787 1904 "col": 1,
1788 1905 "color": 2,
1789 1906 "nextcol": 1,
1790 1907 "width": -1
1791 1908 }
1792 1909 ],
1793 1910 "node": "78896eb0e102174ce9278438a95e12543e4367a7",
1794 1911 "parents": [
1795 1912 "8d7c456572acf3557e8ed8a07286b10c408bcec5"
1796 1913 ],
1797 1914 "phase": "public",
1798 1915 "row": 6,
1799 1916 "tags": [
1800 1917 "tag1"
1801 1918 ],
1802 1919 "user": "test"
1803 1920 },
1804 1921 {
1805 1922 "bookmarks": [
1806 1923 "bookmark1"
1807 1924 ],
1808 1925 "branch": "default",
1809 1926 "col": 0,
1810 1927 "color": 1,
1811 1928 "date": [
1812 1929 0.0,
1813 1930 0
1814 1931 ],
1815 1932 "desc": "modify da/foo",
1816 1933 "edges": [
1817 1934 {
1818 1935 "bcolor": "",
1819 1936 "col": 0,
1820 1937 "color": 1,
1821 1938 "nextcol": 0,
1822 1939 "width": -1
1823 1940 },
1824 1941 {
1825 1942 "bcolor": "",
1826 1943 "col": 1,
1827 1944 "color": 2,
1828 1945 "nextcol": 1,
1829 1946 "width": -1
1830 1947 }
1831 1948 ],
1832 1949 "node": "8d7c456572acf3557e8ed8a07286b10c408bcec5",
1833 1950 "parents": [
1834 1951 "f8bbb9024b10f93cdbb8d940337398291d40dea8"
1835 1952 ],
1836 1953 "phase": "public",
1837 1954 "row": 7,
1838 1955 "tags": [],
1839 1956 "user": "test"
1840 1957 },
1841 1958 {
1842 1959 "bookmarks": [],
1843 1960 "branch": "default",
1844 1961 "col": 0,
1845 1962 "color": 1,
1846 1963 "date": [
1847 1964 0.0,
1848 1965 0
1849 1966 ],
1850 1967 "desc": "modify foo",
1851 1968 "edges": [
1852 1969 {
1853 1970 "bcolor": "",
1854 1971 "col": 0,
1855 1972 "color": 1,
1856 1973 "nextcol": 0,
1857 1974 "width": -1
1858 1975 },
1859 1976 {
1860 1977 "bcolor": "",
1861 1978 "col": 1,
1862 1979 "color": 2,
1863 1980 "nextcol": 0,
1864 1981 "width": -1
1865 1982 }
1866 1983 ],
1867 1984 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
1868 1985 "parents": [
1869 1986 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
1870 1987 ],
1871 1988 "phase": "public",
1872 1989 "row": 8,
1873 1990 "tags": [],
1874 1991 "user": "test"
1875 1992 },
1876 1993 {
1877 1994 "bookmarks": [],
1878 1995 "branch": "default",
1879 1996 "col": 0,
1880 1997 "color": 2,
1881 1998 "date": [
1882 1999 0.0,
1883 2000 0
1884 2001 ],
1885 2002 "desc": "initial",
1886 2003 "edges": [],
1887 2004 "node": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
1888 2005 "parents": [],
1889 2006 "phase": "public",
1890 2007 "row": 9,
1891 2008 "tags": [],
1892 2009 "user": "test"
1893 2010 }
1894 2011 ],
1895 2012 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7"
1896 2013 }
1897 2014
1898 2015 help/ shows help topics
1899 2016
1900 2017 $ request json-help
1901 2018 200 Script output follows
1902 2019
1903 2020 {
1904 2021 "earlycommands": [
1905 2022 {
1906 2023 "summary": "abort an unfinished operation (EXPERIMENTAL)",
1907 2024 "topic": "abort"
1908 2025 },
1909 2026 {
1910 2027 "summary": "add the specified files on the next commit",
1911 2028 "topic": "add"
1912 2029 },
1913 2030 {
1914 2031 "summary": "show changeset information by line for each file",
1915 2032 "topic": "annotate"
1916 2033 },
1917 2034 {
1918 2035 "summary": "make a copy of an existing repository",
1919 2036 "topic": "clone"
1920 2037 },
1921 2038 {
1922 2039 "summary": "commit the specified files or all outstanding changes",
1923 2040 "topic": "commit"
1924 2041 },
1925 2042 {
1926 2043 "summary": "resumes an interrupted operation (EXPERIMENTAL)",
1927 2044 "topic": "continue"
1928 2045 },
1929 2046 {
1930 2047 "summary": "diff repository (or selected files)",
1931 2048 "topic": "diff"
1932 2049 },
1933 2050 {
1934 2051 "summary": "dump the header and diffs for one or more changesets",
1935 2052 "topic": "export"
1936 2053 },
1937 2054 {
1938 2055 "summary": "forget the specified files on the next commit",
1939 2056 "topic": "forget"
1940 2057 },
1941 2058 {
1942 2059 "summary": "create a new repository in the given directory",
1943 2060 "topic": "init"
1944 2061 },
1945 2062 {
1946 2063 "summary": "show revision history of entire repository or files",
1947 2064 "topic": "log"
1948 2065 },
1949 2066 {
1950 2067 "summary": "merge another revision into working directory",
1951 2068 "topic": "merge"
1952 2069 },
1953 2070 {
1954 2071 "summary": "pull changes from the specified source",
1955 2072 "topic": "pull"
1956 2073 },
1957 2074 {
1958 2075 "summary": "push changes to the specified destination",
1959 2076 "topic": "push"
1960 2077 },
1961 2078 {
1962 2079 "summary": "remove the specified files on the next commit",
1963 2080 "topic": "remove"
1964 2081 },
1965 2082 {
1966 2083 "summary": "start stand-alone webserver",
1967 2084 "topic": "serve"
1968 2085 },
1969 2086 {
1970 2087 "summary": "show changed files in the working directory",
1971 2088 "topic": "status"
1972 2089 },
1973 2090 {
1974 2091 "summary": "summarize working directory state",
1975 2092 "topic": "summary"
1976 2093 },
1977 2094 {
1978 2095 "summary": "update working directory (or switch revisions)",
1979 2096 "topic": "update"
1980 2097 }
1981 2098 ],
1982 2099 "othercommands": [
1983 2100 {
1984 2101 "summary": "add all new files, delete all missing files",
1985 2102 "topic": "addremove"
1986 2103 },
1987 2104 {
1988 2105 "summary": "create an unversioned archive of a repository revision",
1989 2106 "topic": "archive"
1990 2107 },
1991 2108 {
1992 2109 "summary": "reverse effect of earlier changeset",
1993 2110 "topic": "backout"
1994 2111 },
1995 2112 {
1996 2113 "summary": "subdivision search of changesets",
1997 2114 "topic": "bisect"
1998 2115 },
1999 2116 {
2000 2117 "summary": "create a new bookmark or list existing bookmarks",
2001 2118 "topic": "bookmarks"
2002 2119 },
2003 2120 {
2004 2121 "summary": "set or show the current branch name",
2005 2122 "topic": "branch"
2006 2123 },
2007 2124 {
2008 2125 "summary": "list repository named branches",
2009 2126 "topic": "branches"
2010 2127 },
2011 2128 {
2012 2129 "summary": "create a bundle file",
2013 2130 "topic": "bundle"
2014 2131 },
2015 2132 {
2016 2133 "summary": "output the current or given revision of files",
2017 2134 "topic": "cat"
2018 2135 },
2019 2136 {
2020 2137 "summary": "show combined config settings from all hgrc files",
2021 2138 "topic": "config"
2022 2139 },
2023 2140 {
2024 2141 "summary": "mark files as copied for the next commit",
2025 2142 "topic": "copy"
2026 2143 },
2027 2144 {
2028 2145 "summary": "list tracked files",
2029 2146 "topic": "files"
2030 2147 },
2031 2148 {
2032 2149 "summary": "copy changes from other branches onto the current branch",
2033 2150 "topic": "graft"
2034 2151 },
2035 2152 {
2036 2153 "summary": "search for a pattern in specified files",
2037 2154 "topic": "grep"
2038 2155 },
2039 2156 {
2040 2157 "summary": "show branch heads",
2041 2158 "topic": "heads"
2042 2159 },
2043 2160 {
2044 2161 "summary": "show help for a given topic or a help overview",
2045 2162 "topic": "help"
2046 2163 },
2047 2164 {
2048 2165 "summary": "identify the working directory or specified revision",
2049 2166 "topic": "identify"
2050 2167 },
2051 2168 {
2052 2169 "summary": "import an ordered set of patches",
2053 2170 "topic": "import"
2054 2171 },
2055 2172 {
2056 2173 "summary": "show new changesets found in source",
2057 2174 "topic": "incoming"
2058 2175 },
2059 2176 {
2060 2177 "summary": "output the current or given revision of the project manifest",
2061 2178 "topic": "manifest"
2062 2179 },
2063 2180 {
2064 2181 "summary": "show changesets not found in the destination",
2065 2182 "topic": "outgoing"
2066 2183 },
2067 2184 {
2068 2185 "summary": "show aliases for remote repositories",
2069 2186 "topic": "paths"
2070 2187 },
2071 2188 {
2072 2189 "summary": "set or show the current phase name",
2073 2190 "topic": "phase"
2074 2191 },
2075 2192 {
2076 2193 "summary": "roll back an interrupted transaction",
2077 2194 "topic": "recover"
2078 2195 },
2079 2196 {
2080 2197 "summary": "rename files; equivalent of copy + remove",
2081 2198 "topic": "rename"
2082 2199 },
2083 2200 {
2084 2201 "summary": "redo merges or set/view the merge status of files",
2085 2202 "topic": "resolve"
2086 2203 },
2087 2204 {
2088 2205 "summary": "restore files to their checkout state",
2089 2206 "topic": "revert"
2090 2207 },
2091 2208 {
2092 2209 "summary": "print the root (top) of the current working directory",
2093 2210 "topic": "root"
2094 2211 },
2095 2212 {
2096 2213 "summary": "save and set aside changes from the working directory",
2097 2214 "topic": "shelve"
2098 2215 },
2099 2216 {
2100 2217 "summary": "add one or more tags for the current or given revision",
2101 2218 "topic": "tag"
2102 2219 },
2103 2220 {
2104 2221 "summary": "list repository tags",
2105 2222 "topic": "tags"
2106 2223 },
2107 2224 {
2108 2225 "summary": "apply one or more bundle files",
2109 2226 "topic": "unbundle"
2110 2227 },
2111 2228 {
2112 2229 "summary": "restore a shelved change to the working directory",
2113 2230 "topic": "unshelve"
2114 2231 },
2115 2232 {
2116 2233 "summary": "verify the integrity of the repository",
2117 2234 "topic": "verify"
2118 2235 },
2119 2236 {
2120 2237 "summary": "output version and copyright information",
2121 2238 "topic": "version"
2122 2239 }
2123 2240 ],
2124 2241 "topics": [
2125 2242 {
2126 2243 "summary": "Bundle File Formats",
2127 2244 "topic": "bundlespec"
2128 2245 },
2129 2246 {
2130 2247 "summary": "Colorizing Outputs",
2131 2248 "topic": "color"
2132 2249 },
2133 2250 {
2134 2251 "summary": "Configuration Files",
2135 2252 "topic": "config"
2136 2253 },
2137 2254 {
2138 2255 "summary": "Date Formats",
2139 2256 "topic": "dates"
2140 2257 },
2141 2258 {
2142 2259 "summary": "Deprecated Features",
2143 2260 "topic": "deprecated"
2144 2261 },
2145 2262 {
2146 2263 "summary": "Diff Formats",
2147 2264 "topic": "diffs"
2148 2265 },
2149 2266 {
2150 2267 "summary": "Environment Variables",
2151 2268 "topic": "environment"
2152 2269 },
2153 2270 {
2154 2271 "summary": "Using Additional Features",
2155 2272 "topic": "extensions"
2156 2273 },
2157 2274 {
2158 2275 "summary": "Specifying File Sets",
2159 2276 "topic": "filesets"
2160 2277 },
2161 2278 {
2162 2279 "summary": "Command-line flags",
2163 2280 "topic": "flags"
2164 2281 },
2165 2282 {
2166 2283 "summary": "Glossary",
2167 2284 "topic": "glossary"
2168 2285 },
2169 2286 {
2170 2287 "summary": "Syntax for Mercurial Ignore Files",
2171 2288 "topic": "hgignore"
2172 2289 },
2173 2290 {
2174 2291 "summary": "Configuring hgweb",
2175 2292 "topic": "hgweb"
2176 2293 },
2177 2294 {
2178 2295 "summary": "Technical implementation topics",
2179 2296 "topic": "internals"
2180 2297 },
2181 2298 {
2182 2299 "summary": "Merge Tools",
2183 2300 "topic": "merge-tools"
2184 2301 },
2185 2302 {
2186 2303 "summary": "Pager Support",
2187 2304 "topic": "pager"
2188 2305 },
2189 2306 {
2190 2307 "summary": "File Name Patterns",
2191 2308 "topic": "patterns"
2192 2309 },
2193 2310 {
2194 2311 "summary": "Working with Phases",
2195 2312 "topic": "phases"
2196 2313 },
2197 2314 {
2198 2315 "summary": "Specifying Revisions",
2199 2316 "topic": "revisions"
2200 2317 },
2201 2318 {
2202 2319 "summary": "Using Mercurial from scripts and automation",
2203 2320 "topic": "scripting"
2204 2321 },
2205 2322 {
2206 2323 "summary": "Subrepositories",
2207 2324 "topic": "subrepos"
2208 2325 },
2209 2326 {
2210 2327 "summary": "Template Usage",
2211 2328 "topic": "templating"
2212 2329 },
2213 2330 {
2214 2331 "summary": "URL Paths",
2215 2332 "topic": "urls"
2216 2333 }
2217 2334 ]
2218 2335 }
2219 2336
2220 2337 help/{topic} shows an individual help topic
2221 2338
2222 2339 $ request json-help/phases
2223 2340 200 Script output follows
2224 2341
2225 2342 {
2226 2343 "rawdoc": "Working with Phases\n*", (glob)
2227 2344 "topic": "phases"
2228 2345 }
2229 2346
2230 2347 Error page shouldn't crash
2231 2348
2232 2349 $ request json-changeset/deadbeef
2233 2350 404 Not Found
2234 2351
2235 2352 {
2236 2353 "error": "unknown revision 'deadbeef'"
2237 2354 }
2238 2355 [1]
2239 2356
2240 2357 Commit message with Japanese Kanji 'Noh', which ends with '\x5c'
2241 2358
2242 2359 $ echo foo >> da/foo
2243 2360 >>> open('msg', 'wb').write(b'\x94\x5c\x0a') and None
2244 2361 $ HGENCODING=cp932 hg ci -l msg
2245 2362
2246 2363 Commit message with null character
2247 2364
2248 2365 $ echo foo >> da/foo
2249 2366 >>> open('msg', 'wb').write(b'commit with null character: \0\n') and None
2250 2367 $ hg ci -l msg
2251 2368 $ rm msg
2252 2369
2253 2370 Stop and restart with HGENCODING=cp932
2254 2371
2255 2372 $ killdaemons.py
2256 2373 $ HGENCODING=cp932 hg serve -p $HGPORT -d --pid-file=hg.pid \
2257 2374 > -A access.log -E error.log
2258 2375 $ cat hg.pid >> $DAEMON_PIDS
2259 2376
2260 2377 Test json escape of multibyte characters
2261 2378
2262 2379 $ request json-filelog/tip/da/foo?revcount=2 | grep '"desc":'
2263 2380 "desc": "commit with null character: \u0000",
2264 2381 "desc": "\u80fd",
General Comments 0
You need to be logged in to leave comments. Login now