annotate tests/test-hgweb-json.t @ 24545:9e0c67e84896

json: implement {tags} template Tags is pretty easy to implement. Let's start there. The output is slightly different from `hg tags -Tjson`. For reference, the CLI has the following output: [ { "node": "e2049974f9a23176c2addb61d8f5b86e0d620490", "rev": 29880, "tag": "tip", "type": "" }, ... ] Our output has the format: { "node": "0aeb19ea57a6d223bacddda3871cb78f24b06510", "tags": [ { "node": "e2049974f9a23176c2addb61d8f5b86e0d620490", "tag": "tag1", "date": [1427775457.0, 25200] }, ... ] } "rev" is omitted because it isn't a reliable identifier. We shouldn't be exposing them in web APIs and giving the impression it remotely resembles a stable identifier. Perhaps we could one day hide this behind a config option (it might be useful to expose when running servers locally). The "type" of the tag isn't defined because this information isn't yet exposed to the hgweb templater (it could be in a follow-up) and because it is questionable whether different types should be exposed at all. (Should the web interface really be exposing "local" tags?) We use an object for the outer type instead of Array for a few reasons. First, it is extensible. If we ever need to throw more global properties into the output, we can do that without breaking backwards compatibility (property additions should be backwards compatible). Second, uniformity in web APIs is nice. Having everything return objects seems much saner than a mix of array and object. Third, there are security issues with arrays in older browsers. The JSON web services world almost never uses arrays as the main type for this reason. Another possibly controversial part about this patch is how dates are defined. While JSON has a Date type, it is based on the JavaScript Date type, which is widely considered a pile of garbage. It is a non-starter for this reason. Many of Mercurial's built-in date filters drop seconds resolution. So that's a non-starter as well, since we want the API to be lossless where possible. rfc3339date, rfc822date, isodatesec, and date are all lossless. However, they each require the client to perform string parsing on top of JSON decoding. While date parsing libraries are pretty ubiquitous, some languages don't have them out of the box. However, pretty much every programming language can deal with UNIX timestamps (which are just integers or floats). So, we choose to use Mercurial's internal date representation, which in JSON is modeled as float seconds since UNIX epoch and an integer timezone offset from UTC (keep in mind JavaScript/JSON models all "Numbers" as double prevision floating point numbers, so there isn't a difference between ints and floats in JSON).
author Gregory Szorc <gregory.szorc@gmail.com>
date Tue, 31 Mar 2015 14:52:21 -0700
parents 71e96b9fd3fd
children adfd808c123f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
24544
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
1 #require json
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
2 #require serve
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
3
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
4 $ request() {
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
5 > $TESTDIR/get-with-headers.py --json localhost:$HGPORT "$1"
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
6 > }
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
7
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
8 $ hg init test
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
9 $ cd test
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
10 $ mkdir da
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
11 $ echo foo > da/foo
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
12 $ echo foo > foo
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
13 $ hg -q ci -A -m initial
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
14 $ echo bar > foo
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
15 $ hg ci -m 'modify foo'
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
16 $ echo bar > da/foo
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
17 $ hg ci -m 'modify da/foo'
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
18 $ hg bookmark bookmark1
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
19 $ hg up default
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
20 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
21 (leaving bookmark bookmark1)
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
22 $ hg mv foo foo-new
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
23 $ hg commit -m 'move foo'
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
24 $ hg tag -m 'create tag' tag1
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
25 $ echo baz > da/foo
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
26 $ hg commit -m 'another commit to da/foo'
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
27 $ hg tag -m 'create tag2' tag2
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
28 $ hg bookmark bookmark2
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
29 $ hg -q up -r 0
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
30 $ hg -q branch test-branch
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
31 $ echo branch > foo
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
32 $ hg commit -m 'create test branch'
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
33
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
34 $ hg log -G
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
35 @ changeset: 7:6ab967a8ab34
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
36 | branch: test-branch
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
37 | tag: tip
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
38 | parent: 0:06e557f3edf6
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
39 | user: test
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
40 | date: Thu Jan 01 00:00:00 1970 +0000
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
41 | summary: create test branch
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
42 |
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
43 | o changeset: 6:ceed296fe500
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
44 | | bookmark: bookmark2
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
45 | | user: test
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
46 | | date: Thu Jan 01 00:00:00 1970 +0000
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
47 | | summary: create tag2
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
48 | |
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
49 | o changeset: 5:f2890a05fea4
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
50 | | tag: tag2
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
51 | | user: test
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
52 | | date: Thu Jan 01 00:00:00 1970 +0000
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
53 | | summary: another commit to da/foo
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
54 | |
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
55 | o changeset: 4:93a8ce14f891
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
56 | | user: test
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
57 | | date: Thu Jan 01 00:00:00 1970 +0000
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
58 | | summary: create tag
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
59 | |
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
60 | o changeset: 3:78896eb0e102
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
61 | | tag: tag1
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
62 | | user: test
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
63 | | date: Thu Jan 01 00:00:00 1970 +0000
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
64 | | summary: move foo
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
65 | |
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
66 | o changeset: 2:8d7c456572ac
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
67 | | bookmark: bookmark1
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
68 | | user: test
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
69 | | date: Thu Jan 01 00:00:00 1970 +0000
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
70 | | summary: modify da/foo
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
71 | |
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
72 | o changeset: 1:f8bbb9024b10
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
73 |/ user: test
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
74 | date: Thu Jan 01 00:00:00 1970 +0000
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
75 | summary: modify foo
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
76 |
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
77 o changeset: 0:06e557f3edf6
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
78 user: test
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
79 date: Thu Jan 01 00:00:00 1970 +0000
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
80 summary: initial
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
81
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
82
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
83 $ hg serve -p $HGPORT -d --pid-file=hg.pid -A access.log -E error.log
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
84 $ cat hg.pid >> $DAEMON_PIDS
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
85
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
86 (Try to keep these in roughly the order they are defined in webcommands.py)
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
87
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
88 (log is handled by filelog/ and changelog/ - ignore it)
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
89
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
90 (rawfile/ doesn't use templating - nothing to test)
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
91
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
92 file/{revision}/{path} shows file revision
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
93
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
94 $ request json-rev/06e557f3edf6/foo
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
95 200 Script output follows
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
96
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
97 "not yet implemented"
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
98
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
99 file/{revision} shows root directory info
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
100
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
101 $ request json-rev/06e557f3edf6
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
102 200 Script output follows
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
103
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
104 "not yet implemented"
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
105
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
106 changelog/ shows information about several changesets
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
107
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
108 $ request json-changelog
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
109 200 Script output follows
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
110
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
111 "not yet implemented"
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
112
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
113 changelog/{revision} shows information about a single changeset
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
114
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
115 $ request json-changelog/06e557f3edf6
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
116 200 Script output follows
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
117
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
118 "not yet implemented"
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
119
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
120 shortlog/ shows information about a set of changesets
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
121
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
122 $ request json-shortlog
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
123 200 Script output follows
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
124
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
125 "not yet implemented"
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
126
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
127 changeset/ renders the tip changeset
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
128
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
129 $ request json-rev
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
130 200 Script output follows
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
131
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
132 "not yet implemented"
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
133
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
134 changeset/{revision} shows tags
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
135
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
136 $ request json-rev/78896eb0e102
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
137 200 Script output follows
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
138
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
139 "not yet implemented"
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
140
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
141 changeset/{revision} shows bookmarks
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
142
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
143 $ request json-rev/8d7c456572ac
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
144 200 Script output follows
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
145
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
146 "not yet implemented"
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
147
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
148 changeset/{revision} shows branches
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
149
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
150 $ request json-rev/6ab967a8ab34
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
151 200 Script output follows
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
152
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
153 "not yet implemented"
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
154
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
155 manifest/{revision}/{path} shows info about a directory at a revision
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
156
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
157 $ request json-manifest/06e557f3edf6/
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
158 200 Script output follows
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
159
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
160 "not yet implemented"
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
161
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
162 tags/ shows tags info
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
163
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
164 $ request json-tags
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
165 200 Script output follows
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
166
24545
9e0c67e84896 json: implement {tags} template
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24544
diff changeset
167 {
9e0c67e84896 json: implement {tags} template
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24544
diff changeset
168 "node": "6ab967a8ab3489227a83f80e920faa039a71819f",
9e0c67e84896 json: implement {tags} template
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24544
diff changeset
169 "tags": [
9e0c67e84896 json: implement {tags} template
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24544
diff changeset
170 {
9e0c67e84896 json: implement {tags} template
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24544
diff changeset
171 "date": [
9e0c67e84896 json: implement {tags} template
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24544
diff changeset
172 0.0,
9e0c67e84896 json: implement {tags} template
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24544
diff changeset
173 0
9e0c67e84896 json: implement {tags} template
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24544
diff changeset
174 ],
9e0c67e84896 json: implement {tags} template
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24544
diff changeset
175 "node": "f2890a05fea49bfaf9fb27ed5490894eba32da78",
9e0c67e84896 json: implement {tags} template
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24544
diff changeset
176 "tag": "tag2"
9e0c67e84896 json: implement {tags} template
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24544
diff changeset
177 },
9e0c67e84896 json: implement {tags} template
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24544
diff changeset
178 {
9e0c67e84896 json: implement {tags} template
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24544
diff changeset
179 "date": [
9e0c67e84896 json: implement {tags} template
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24544
diff changeset
180 0.0,
9e0c67e84896 json: implement {tags} template
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24544
diff changeset
181 0
9e0c67e84896 json: implement {tags} template
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24544
diff changeset
182 ],
9e0c67e84896 json: implement {tags} template
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24544
diff changeset
183 "node": "78896eb0e102174ce9278438a95e12543e4367a7",
9e0c67e84896 json: implement {tags} template
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24544
diff changeset
184 "tag": "tag1"
9e0c67e84896 json: implement {tags} template
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24544
diff changeset
185 }
9e0c67e84896 json: implement {tags} template
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24544
diff changeset
186 ]
9e0c67e84896 json: implement {tags} template
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24544
diff changeset
187 }
24544
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
188
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
189 bookmarks/ shows bookmarks info
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
190
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
191 $ request json-bookmarks
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
192 200 Script output follows
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
193
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
194 "not yet implemented"
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
195
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
196 branches/ shows branches info
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
197
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
198 $ request json-branches
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
199 200 Script output follows
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
200
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
201 "not yet implemented"
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
202
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
203 summary/ shows a summary of repository state
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
204
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
205 $ request json-summary
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
206 200 Script output follows
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
207
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
208 "not yet implemented"
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
209
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
210 filediff/{revision}/{path} shows changes to a file in a revision
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
211
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
212 $ request json-diff/f8bbb9024b10/foo
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
213 200 Script output follows
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
214
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
215 "not yet implemented"
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
216
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
217 comparison/{revision}/{path} shows information about before and after for a file
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
218
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
219 $ request json-comparison/f8bbb9024b10/foo
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
220 200 Script output follows
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
221
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
222 "not yet implemented"
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
223
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
224 annotate/{revision}/{path} shows annotations for each line
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
225
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
226 $ request json-annotate/f8bbb9024b10/foo
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
227 200 Script output follows
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
228
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
229 "not yet implemented"
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
230
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
231 filelog/{revision}/{path} shows history of a single file
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
232
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
233 $ request json-filelog/f8bbb9024b10/foo
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
234 200 Script output follows
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
235
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
236 "not yet implemented"
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
237
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
238 (archive/ doesn't use templating, so ignore it)
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
239
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
240 (static/ doesn't use templating, so ignore it)
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
241
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
242 graph/ shows information that can be used to render a graph of the DAG
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
243
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
244 $ request json-graph
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
245 200 Script output follows
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
246
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
247 "not yet implemented"
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
248
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
249 help/ shows help topics
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
250
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
251 $ request json-help
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
252 200 Script output follows
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
253
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
254 "not yet implemented"
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
255
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
256 help/{topic} shows an individual help topic
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
257
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
258 $ request json-help/phases
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
259 200 Script output follows
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
260
71e96b9fd3fd templates: add a stub template for json
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
261 "not yet implemented"