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