Show More
@@ -1,44 +1,57 b'' | |||
|
1 | 1 | mimetype = 'application/json' |
|
2 | 2 | filerevision = '"not yet implemented"' |
|
3 | 3 | search = '"not yet implemented"' |
|
4 | 4 | shortlog = '"not yet implemented"' |
|
5 | 5 | changelog = '"not yet implemented"' |
|
6 | changeset = '"not yet implemented"' | |
|
6 | changeset = '\{ | |
|
7 | "node": {node|json}, | |
|
8 | "date": {date|json}, | |
|
9 | "desc": {desc|json}, | |
|
10 | "branch": {if(branch, branch%changesetbranch, "default"|json)}, | |
|
11 | "bookmarks": [{join(changesetbookmark, ", ")}], | |
|
12 | "tags": [{join(changesettag, ", ")}], | |
|
13 | "user": {author|json}, | |
|
14 | "parents": [{join(parent%changesetparent, ", ")}] | |
|
15 | }' | |
|
16 | changesetbranch = '{name|json}' | |
|
17 | changesetbookmark = '{bookmark|json}' | |
|
18 | changesettag = '{tag|json}' | |
|
19 | changesetparent = '{node|json}' | |
|
7 | 20 | manifest = '"not yet implemented"' |
|
8 | 21 | tags = '\{ |
|
9 | 22 | "node": {node|json}, |
|
10 | 23 | "tags": [{join(entriesnotip%tagentry, ", ")}] |
|
11 | 24 | }' |
|
12 | 25 | tagentry = '\{ |
|
13 | 26 | "tag": {tag|json}, |
|
14 | 27 | "node": {node|json}, |
|
15 | 28 | "date": {date|json} |
|
16 | 29 | }' |
|
17 | 30 | bookmarks = '\{ |
|
18 | 31 | "node": {node|json}, |
|
19 | 32 | "bookmarks": [{join(entries%bookmarkentry, ", ")}] |
|
20 | 33 | }' |
|
21 | 34 | bookmarkentry = '\{ |
|
22 | 35 | "bookmark": {bookmark|json}, |
|
23 | 36 | "node": {node|json}, |
|
24 | 37 | "date": {date|json} |
|
25 | 38 | }' |
|
26 | 39 | branches = '\{ |
|
27 | 40 | "branches": [{join(entries%branchentry, ", ")}] |
|
28 | 41 | }' |
|
29 | 42 | branchentry = '\{ |
|
30 | 43 | "branch": {branch|json}, |
|
31 | 44 | "node": {node|json}, |
|
32 | 45 | "date": {date|json}, |
|
33 | 46 | "status": {status|json} |
|
34 | 47 | }' |
|
35 | 48 | summary = '"not yet implemented"' |
|
36 | 49 | filediff = '"not yet implemented"' |
|
37 | 50 | filecomparison = '"not yet implemented"' |
|
38 | 51 | fileannotate = '"not yet implemented"' |
|
39 | 52 | filelog = '"not yet implemented"' |
|
40 | 53 | graph = '"not yet implemented"' |
|
41 | 54 | helptopics = '"not yet implemented"' |
|
42 | 55 | help = '"not yet implemented"' |
|
43 | 56 | filenodelink = '' |
|
44 | 57 | filenolink = '' |
@@ -1,302 +1,385 b'' | |||
|
1 | 1 | #require json |
|
2 | 2 | #require serve |
|
3 | 3 | |
|
4 | 4 | $ request() { |
|
5 | 5 | > $TESTDIR/get-with-headers.py --json localhost:$HGPORT "$1" |
|
6 | 6 | > } |
|
7 | 7 | |
|
8 | 8 | $ hg init test |
|
9 | 9 | $ cd test |
|
10 | 10 | $ mkdir da |
|
11 | 11 | $ echo foo > da/foo |
|
12 | 12 | $ echo foo > foo |
|
13 | 13 | $ hg -q ci -A -m initial |
|
14 | 14 | $ echo bar > foo |
|
15 | 15 | $ hg ci -m 'modify foo' |
|
16 | 16 | $ echo bar > da/foo |
|
17 | 17 | $ hg ci -m 'modify da/foo' |
|
18 | 18 | $ hg bookmark bookmark1 |
|
19 | 19 | $ hg up default |
|
20 | 20 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
21 | 21 | (leaving bookmark bookmark1) |
|
22 | 22 | $ hg mv foo foo-new |
|
23 | 23 | $ hg commit -m 'move foo' |
|
24 | 24 | $ hg tag -m 'create tag' tag1 |
|
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 | $ echo branch_commit_2 > foo | |
|
34 | $ hg commit -m 'another commit in test-branch' | |
|
35 | $ hg -q up default | |
|
36 | $ hg merge --tool :local test-branch | |
|
37 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
|
38 | (branch merge, don't forget to commit) | |
|
39 | $ hg commit -m 'merge test-branch into default' | |
|
33 | 40 | |
|
34 | 41 | $ hg log -G |
|
35 |
@ changeset: |
|
|
36 | | branch: test-branch | |
|
37 | | tag: tip | |
|
38 |
| parent: |
|
|
39 | | user: test | |
|
40 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
41 |
| summary: |
|
|
42 | | | |
|
43 |
| o changeset: |
|
|
42 | @ changeset: 9:cc725e08502a | |
|
43 | |\ tag: tip | |
|
44 | | | parent: 6:ceed296fe500 | |
|
45 | | | parent: 8:ed66c30e87eb | |
|
46 | | | user: test | |
|
47 | | | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
48 | | | summary: merge test-branch into default | |
|
49 | | | | |
|
50 | | o changeset: 8:ed66c30e87eb | |
|
51 | | | branch: test-branch | |
|
52 | | | user: test | |
|
53 | | | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
54 | | | summary: another commit in test-branch | |
|
55 | | | | |
|
56 | | o changeset: 7:6ab967a8ab34 | |
|
57 | | | branch: test-branch | |
|
58 | | | parent: 0:06e557f3edf6 | |
|
59 | | | user: test | |
|
60 | | | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
61 | | | summary: create test branch | |
|
62 | | | | |
|
63 | o | changeset: 6:ceed296fe500 | |
|
44 | 64 | | | bookmark: bookmark2 |
|
45 | 65 | | | user: test |
|
46 | 66 | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
47 | 67 | | | summary: create tag2 |
|
48 | 68 | | | |
|
49 |
|
|
|
69 | o | changeset: 5:f2890a05fea4 | |
|
50 | 70 | | | tag: tag2 |
|
51 | 71 | | | user: test |
|
52 | 72 | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
53 | 73 | | | summary: another commit to da/foo |
|
54 | 74 | | | |
|
55 |
|
|
|
75 | o | changeset: 4:93a8ce14f891 | |
|
56 | 76 | | | user: test |
|
57 | 77 | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
58 | 78 | | | summary: create tag |
|
59 | 79 | | | |
|
60 |
|
|
|
80 | o | changeset: 3:78896eb0e102 | |
|
61 | 81 | | | tag: tag1 |
|
62 | 82 | | | user: test |
|
63 | 83 | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
64 | 84 | | | summary: move foo |
|
65 | 85 | | | |
|
66 |
|
|
|
86 | o | changeset: 2:8d7c456572ac | |
|
67 | 87 | | | bookmark: bookmark1 |
|
68 | 88 | | | user: test |
|
69 | 89 | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
70 | 90 | | | summary: modify da/foo |
|
71 | 91 | | | |
|
72 |
|
|
|
92 | o | changeset: 1:f8bbb9024b10 | |
|
73 | 93 | |/ user: test |
|
74 | 94 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
75 | 95 | | summary: modify foo |
|
76 | 96 | | |
|
77 | 97 | o changeset: 0:06e557f3edf6 |
|
78 | 98 | user: test |
|
79 | 99 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
80 | 100 | summary: initial |
|
81 | 101 |
|
|
82 | 102 | |
|
83 | 103 | $ hg serve -p $HGPORT -d --pid-file=hg.pid -A access.log -E error.log |
|
84 | 104 | $ cat hg.pid >> $DAEMON_PIDS |
|
85 | 105 | |
|
86 | 106 | (Try to keep these in roughly the order they are defined in webcommands.py) |
|
87 | 107 | |
|
88 | 108 | (log is handled by filelog/ and changelog/ - ignore it) |
|
89 | 109 | |
|
90 | 110 |
|
|
91 | 111 | |
|
92 | 112 |
file |
|
93 | 113 | |
|
94 | 114 | $ request json-file/06e557f3edf6/foo |
|
95 | 115 | 200 Script output follows |
|
96 | 116 | |
|
97 | 117 | "not yet implemented" |
|
98 | 118 | |
|
99 | 119 | file/{revision} shows root directory info |
|
100 | 120 | |
|
101 | 121 | $ request json-file/06e557f3edf6 |
|
102 | 122 | 200 Script output follows |
|
103 | 123 | |
|
104 | 124 | "not yet implemented" |
|
105 | 125 | |
|
106 | 126 | changelog/ shows information about several changesets |
|
107 | 127 | |
|
108 | 128 | $ request json-changelog |
|
109 | 129 | 200 Script output follows |
|
110 | 130 | |
|
111 | 131 | "not yet implemented" |
|
112 | 132 | |
|
113 | 133 | changelog/{revision} shows information about a single changeset |
|
114 | 134 | |
|
115 | 135 | $ request json-changelog/06e557f3edf6 |
|
116 | 136 | 200 Script output follows |
|
117 | 137 | |
|
118 | 138 | "not yet implemented" |
|
119 | 139 | |
|
120 | 140 | shortlog/ shows information about a set of changesets |
|
121 | 141 | |
|
122 | 142 | $ request json-shortlog |
|
123 | 143 | 200 Script output follows |
|
124 | 144 | |
|
125 | 145 | "not yet implemented" |
|
126 | 146 | |
|
127 | 147 | changeset/ renders the tip changeset |
|
128 | 148 | |
|
129 | 149 | $ request json-rev |
|
130 | 150 | 200 Script output follows |
|
131 | 151 | |
|
132 | "not yet implemented" | |
|
152 | { | |
|
153 | "bookmarks": [], | |
|
154 | "branch": "default", | |
|
155 | "date": [ | |
|
156 | 0.0, | |
|
157 | 0 | |
|
158 | ], | |
|
159 | "desc": "merge test-branch into default", | |
|
160 | "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7", | |
|
161 | "parents": [ | |
|
162 | "ceed296fe500c3fac9541e31dad860cb49c89e45", | |
|
163 | "ed66c30e87eb65337c05a4229efaa5f1d5285a90" | |
|
164 | ], | |
|
165 | "tags": [ | |
|
166 | "tip" | |
|
167 | ], | |
|
168 | "user": "test" | |
|
169 | } | |
|
133 | 170 | |
|
134 | 171 | changeset/{revision} shows tags |
|
135 | 172 | |
|
136 | 173 | $ request json-rev/78896eb0e102 |
|
137 | 174 | 200 Script output follows |
|
138 | 175 | |
|
139 | "not yet implemented" | |
|
176 | { | |
|
177 | "bookmarks": [], | |
|
178 | "branch": "default", | |
|
179 | "date": [ | |
|
180 | 0.0, | |
|
181 | 0 | |
|
182 | ], | |
|
183 | "desc": "move foo", | |
|
184 | "node": "78896eb0e102174ce9278438a95e12543e4367a7", | |
|
185 | "parents": [ | |
|
186 | "8d7c456572acf3557e8ed8a07286b10c408bcec5" | |
|
187 | ], | |
|
188 | "tags": [ | |
|
189 | "tag1" | |
|
190 | ], | |
|
191 | "user": "test" | |
|
192 | } | |
|
140 | 193 | |
|
141 | 194 | changeset/{revision} shows bookmarks |
|
142 | 195 | |
|
143 | 196 | $ request json-rev/8d7c456572ac |
|
144 | 197 | 200 Script output follows |
|
145 | 198 | |
|
146 | "not yet implemented" | |
|
199 | { | |
|
200 | "bookmarks": [ | |
|
201 | "bookmark1" | |
|
202 | ], | |
|
203 | "branch": "default", | |
|
204 | "date": [ | |
|
205 | 0.0, | |
|
206 | 0 | |
|
207 | ], | |
|
208 | "desc": "modify da/foo", | |
|
209 | "node": "8d7c456572acf3557e8ed8a07286b10c408bcec5", | |
|
210 | "parents": [ | |
|
211 | "f8bbb9024b10f93cdbb8d940337398291d40dea8" | |
|
212 | ], | |
|
213 | "tags": [], | |
|
214 | "user": "test" | |
|
215 | } | |
|
147 | 216 | |
|
148 | 217 | changeset/{revision} shows branches |
|
149 | 218 | |
|
150 | 219 | $ request json-rev/6ab967a8ab34 |
|
151 | 220 | 200 Script output follows |
|
152 | 221 | |
|
153 | "not yet implemented" | |
|
222 | { | |
|
223 | "bookmarks": [], | |
|
224 | "branch": "test-branch", | |
|
225 | "date": [ | |
|
226 | 0.0, | |
|
227 | 0 | |
|
228 | ], | |
|
229 | "desc": "create test branch", | |
|
230 | "node": "6ab967a8ab3489227a83f80e920faa039a71819f", | |
|
231 | "parents": [ | |
|
232 | "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e" | |
|
233 | ], | |
|
234 | "tags": [], | |
|
235 | "user": "test" | |
|
236 | } | |
|
154 | 237 | |
|
155 | 238 |
manifest |
|
156 | 239 | |
|
157 | 240 | $ request json-manifest/06e557f3edf6/ |
|
158 | 241 | 200 Script output follows |
|
159 | 242 | |
|
160 | 243 | "not yet implemented" |
|
161 | 244 | |
|
162 | 245 | tags/ shows tags info |
|
163 | 246 | |
|
164 | 247 | $ request json-tags |
|
165 | 248 | 200 Script output follows |
|
166 | 249 | |
|
167 | 250 | { |
|
168 | "node": "6ab967a8ab3489227a83f80e920faa039a71819f", | |
|
251 | "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7", | |
|
169 | 252 | "tags": [ |
|
170 | 253 | { |
|
171 | 254 | "date": [ |
|
172 | 255 | 0.0, |
|
173 | 256 | 0 |
|
174 | 257 | ], |
|
175 | 258 | "node": "f2890a05fea49bfaf9fb27ed5490894eba32da78", |
|
176 | 259 | "tag": "tag2" |
|
177 | 260 | }, |
|
178 | 261 | { |
|
179 | 262 | "date": [ |
|
180 | 263 | 0.0, |
|
181 | 264 | 0 |
|
182 | 265 | ], |
|
183 | 266 | "node": "78896eb0e102174ce9278438a95e12543e4367a7", |
|
184 | 267 | "tag": "tag1" |
|
185 | 268 |
|
|
186 | 269 | ] |
|
187 | 270 | } |
|
188 | 271 | |
|
189 | 272 | bookmarks/ shows bookmarks info |
|
190 | 273 | |
|
191 | 274 | $ request json-bookmarks |
|
192 | 275 | 200 Script output follows |
|
193 | 276 | |
|
194 | 277 | { |
|
195 | 278 | "bookmarks": [ |
|
196 | 279 | { |
|
197 | 280 | "bookmark": "bookmark1", |
|
198 | 281 | "date": [ |
|
199 | 282 | 0.0, |
|
200 | 283 | 0 |
|
201 | 284 | ], |
|
202 | 285 | "node": "8d7c456572acf3557e8ed8a07286b10c408bcec5" |
|
203 | 286 | }, |
|
204 | 287 | { |
|
205 | 288 | "bookmark": "bookmark2", |
|
206 | 289 | "date": [ |
|
207 | 290 | 0.0, |
|
208 | 291 | 0 |
|
209 | 292 | ], |
|
210 | 293 | "node": "ceed296fe500c3fac9541e31dad860cb49c89e45" |
|
211 | 294 |
|
|
212 | 295 | ], |
|
213 | "node": "6ab967a8ab3489227a83f80e920faa039a71819f" | |
|
296 | "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7" | |
|
214 | 297 | } |
|
215 | 298 | |
|
216 | 299 | branches/ shows branches info |
|
217 | 300 | |
|
218 | 301 | $ request json-branches |
|
219 | 302 | 200 Script output follows |
|
220 | 303 | |
|
221 | 304 | { |
|
222 | 305 | "branches": [ |
|
223 | 306 | { |
|
307 | "branch": "default", | |
|
308 | "date": [ | |
|
309 | 0.0, | |
|
310 | 0 | |
|
311 | ], | |
|
312 | "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7", | |
|
313 | "status": "open" | |
|
314 | }, | |
|
315 | { | |
|
224 | 316 | "branch": "test-branch", |
|
225 | 317 | "date": [ |
|
226 | 318 | 0.0, |
|
227 | 319 | 0 |
|
228 | 320 | ], |
|
229 | "node": "6ab967a8ab3489227a83f80e920faa039a71819f", | |
|
230 |
"status": " |
|
|
231 | }, | |
|
232 | { | |
|
233 | "branch": "default", | |
|
234 | "date": [ | |
|
235 | 0.0, | |
|
236 | 0 | |
|
237 | ], | |
|
238 | "node": "ceed296fe500c3fac9541e31dad860cb49c89e45", | |
|
239 | "status": "open" | |
|
321 | "node": "ed66c30e87eb65337c05a4229efaa5f1d5285a90", | |
|
322 | "status": "inactive" | |
|
240 | 323 |
|
|
241 | 324 | ] |
|
242 | 325 | } |
|
243 | 326 | |
|
244 | 327 | summary/ shows a summary of repository state |
|
245 | 328 | |
|
246 | 329 | $ request json-summary |
|
247 | 330 | 200 Script output follows |
|
248 | 331 | |
|
249 | 332 | "not yet implemented" |
|
250 | 333 | |
|
251 | 334 |
filediff |
|
252 | 335 | |
|
253 | 336 | $ request json-diff/f8bbb9024b10/foo |
|
254 | 337 | 200 Script output follows |
|
255 | 338 | |
|
256 | 339 | "not yet implemented" |
|
257 | 340 | |
|
258 | 341 |
comparison |
|
259 | 342 | |
|
260 | 343 | $ request json-comparison/f8bbb9024b10/foo |
|
261 | 344 | 200 Script output follows |
|
262 | 345 | |
|
263 | 346 | "not yet implemented" |
|
264 | 347 | |
|
265 | 348 |
annotate |
|
266 | 349 | |
|
267 | 350 | $ request json-annotate/f8bbb9024b10/foo |
|
268 | 351 | 200 Script output follows |
|
269 | 352 | |
|
270 | 353 | "not yet implemented" |
|
271 | 354 | |
|
272 | 355 |
filelog |
|
273 | 356 | |
|
274 | 357 | $ request json-filelog/f8bbb9024b10/foo |
|
275 | 358 | 200 Script output follows |
|
276 | 359 | |
|
277 | 360 | "not yet implemented" |
|
278 | 361 | |
|
279 | 362 | (archive/ doesn't use templating, so ignore it) |
|
280 | 363 | |
|
281 | 364 |
|
|
282 | 365 | |
|
283 | 366 | graph/ shows information that can be used to render a graph of the DAG |
|
284 | 367 | |
|
285 | 368 | $ request json-graph |
|
286 | 369 | 200 Script output follows |
|
287 | 370 | |
|
288 | 371 | "not yet implemented" |
|
289 | 372 | |
|
290 | 373 | help/ shows help topics |
|
291 | 374 | |
|
292 | 375 | $ request json-help |
|
293 | 376 | 200 Script output follows |
|
294 | 377 | |
|
295 | 378 | "not yet implemented" |
|
296 | 379 | |
|
297 | 380 | help/{topic} shows an individual help topic |
|
298 | 381 | |
|
299 | 382 | $ request json-help/phases |
|
300 | 383 | 200 Script output follows |
|
301 | 384 | |
|
302 | 385 | "not yet implemented" |
General Comments 0
You need to be logged in to leave comments.
Login now