Show More
@@ -1,20 +1,28 b'' | |||
|
1 | 1 | mimetype = 'application/json' |
|
2 | 2 | filerevision = '"not yet implemented"' |
|
3 | 3 | search = '"not yet implemented"' |
|
4 | 4 | shortlog = '"not yet implemented"' |
|
5 | 5 | changelog = '"not yet implemented"' |
|
6 | 6 | changeset = '"not yet implemented"' |
|
7 | 7 | manifest = '"not yet implemented"' |
|
8 | tags = '"not yet implemented"' | |
|
8 | tags = '\{ | |
|
9 | "node": {node|json}, | |
|
10 | "tags": [{join(entriesnotip%tagentry, ", ")}] | |
|
11 | }' | |
|
12 | tagentry = '\{ | |
|
13 | "tag": {tag|json}, | |
|
14 | "node": {node|json}, | |
|
15 | "date": {date|json} | |
|
16 | }' | |
|
9 | 17 | bookmarks = '"not yet implemented"' |
|
10 | 18 | branches = '"not yet implemented"' |
|
11 | 19 | summary = '"not yet implemented"' |
|
12 | 20 | filediff = '"not yet implemented"' |
|
13 | 21 | filecomparison = '"not yet implemented"' |
|
14 | 22 | fileannotate = '"not yet implemented"' |
|
15 | 23 | filelog = '"not yet implemented"' |
|
16 | 24 | graph = '"not yet implemented"' |
|
17 | 25 | helptopics = '"not yet implemented"' |
|
18 | 26 | help = '"not yet implemented"' |
|
19 | 27 | filenodelink = '' |
|
20 | 28 | filenolink = '' |
@@ -1,241 +1,261 b'' | |||
|
1 | 1 | #require json |
|
2 | 2 | #require serve |
|
3 | 3 | |
|
4 | 4 | $ request() { |
|
5 | 5 | > $TESTDIR/get-with-headers.py --json localhost:$HGPORT "$1" |
|
6 | 6 | > } |
|
7 | 7 | |
|
8 | 8 | $ hg init test |
|
9 | 9 | $ cd test |
|
10 | 10 | $ mkdir da |
|
11 | 11 | $ echo foo > da/foo |
|
12 | 12 | $ echo foo > foo |
|
13 | 13 | $ hg -q ci -A -m initial |
|
14 | 14 | $ echo bar > foo |
|
15 | 15 | $ hg ci -m 'modify foo' |
|
16 | 16 | $ echo bar > da/foo |
|
17 | 17 | $ hg ci -m 'modify da/foo' |
|
18 | 18 | $ hg bookmark bookmark1 |
|
19 | 19 | $ hg up default |
|
20 | 20 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
21 | 21 | (leaving bookmark bookmark1) |
|
22 | 22 | $ hg mv foo foo-new |
|
23 | 23 | $ hg commit -m 'move foo' |
|
24 | 24 | $ hg tag -m 'create tag' tag1 |
|
25 | 25 | $ echo baz > da/foo |
|
26 | 26 | $ hg commit -m 'another commit to da/foo' |
|
27 | 27 | $ hg tag -m 'create tag2' tag2 |
|
28 | 28 | $ hg bookmark bookmark2 |
|
29 | 29 | $ hg -q up -r 0 |
|
30 | 30 | $ hg -q branch test-branch |
|
31 | 31 | $ echo branch > foo |
|
32 | 32 | $ hg commit -m 'create test branch' |
|
33 | 33 | |
|
34 | 34 | $ hg log -G |
|
35 | 35 | @ changeset: 7:6ab967a8ab34 |
|
36 | 36 | | branch: test-branch |
|
37 | 37 | | tag: tip |
|
38 | 38 | | parent: 0:06e557f3edf6 |
|
39 | 39 | | user: test |
|
40 | 40 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
41 | 41 | | summary: create test branch |
|
42 | 42 | | |
|
43 | 43 | | o changeset: 6:ceed296fe500 |
|
44 | 44 | | | bookmark: bookmark2 |
|
45 | 45 | | | user: test |
|
46 | 46 | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
47 | 47 | | | summary: create tag2 |
|
48 | 48 | | | |
|
49 | 49 | | o changeset: 5:f2890a05fea4 |
|
50 | 50 | | | tag: tag2 |
|
51 | 51 | | | user: test |
|
52 | 52 | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
53 | 53 | | | summary: another commit to da/foo |
|
54 | 54 | | | |
|
55 | 55 | | o changeset: 4:93a8ce14f891 |
|
56 | 56 | | | user: test |
|
57 | 57 | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
58 | 58 | | | summary: create tag |
|
59 | 59 | | | |
|
60 | 60 | | o changeset: 3:78896eb0e102 |
|
61 | 61 | | | tag: tag1 |
|
62 | 62 | | | user: test |
|
63 | 63 | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
64 | 64 | | | summary: move foo |
|
65 | 65 | | | |
|
66 | 66 | | o changeset: 2:8d7c456572ac |
|
67 | 67 | | | bookmark: bookmark1 |
|
68 | 68 | | | user: test |
|
69 | 69 | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
70 | 70 | | | summary: modify da/foo |
|
71 | 71 | | | |
|
72 | 72 | | o changeset: 1:f8bbb9024b10 |
|
73 | 73 | |/ user: test |
|
74 | 74 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
75 | 75 | | summary: modify foo |
|
76 | 76 | | |
|
77 | 77 | o changeset: 0:06e557f3edf6 |
|
78 | 78 | user: test |
|
79 | 79 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
80 | 80 | summary: initial |
|
81 | 81 | |
|
82 | 82 | |
|
83 | 83 | $ hg serve -p $HGPORT -d --pid-file=hg.pid -A access.log -E error.log |
|
84 | 84 | $ cat hg.pid >> $DAEMON_PIDS |
|
85 | 85 | |
|
86 | 86 | (Try to keep these in roughly the order they are defined in webcommands.py) |
|
87 | 87 | |
|
88 | 88 | (log is handled by filelog/ and changelog/ - ignore it) |
|
89 | 89 | |
|
90 | 90 | (rawfile/ doesn't use templating - nothing to test) |
|
91 | 91 | |
|
92 | 92 | file/{revision}/{path} shows file revision |
|
93 | 93 | |
|
94 | 94 | $ request json-rev/06e557f3edf6/foo |
|
95 | 95 | 200 Script output follows |
|
96 | 96 | |
|
97 | 97 | "not yet implemented" |
|
98 | 98 | |
|
99 | 99 | file/{revision} shows root directory info |
|
100 | 100 | |
|
101 | 101 | $ request json-rev/06e557f3edf6 |
|
102 | 102 | 200 Script output follows |
|
103 | 103 | |
|
104 | 104 | "not yet implemented" |
|
105 | 105 | |
|
106 | 106 | changelog/ shows information about several changesets |
|
107 | 107 | |
|
108 | 108 | $ request json-changelog |
|
109 | 109 | 200 Script output follows |
|
110 | 110 | |
|
111 | 111 | "not yet implemented" |
|
112 | 112 | |
|
113 | 113 | changelog/{revision} shows information about a single changeset |
|
114 | 114 | |
|
115 | 115 | $ request json-changelog/06e557f3edf6 |
|
116 | 116 | 200 Script output follows |
|
117 | 117 | |
|
118 | 118 | "not yet implemented" |
|
119 | 119 | |
|
120 | 120 | shortlog/ shows information about a set of changesets |
|
121 | 121 | |
|
122 | 122 | $ request json-shortlog |
|
123 | 123 | 200 Script output follows |
|
124 | 124 | |
|
125 | 125 | "not yet implemented" |
|
126 | 126 | |
|
127 | 127 | changeset/ renders the tip changeset |
|
128 | 128 | |
|
129 | 129 | $ request json-rev |
|
130 | 130 | 200 Script output follows |
|
131 | 131 | |
|
132 | 132 | "not yet implemented" |
|
133 | 133 | |
|
134 | 134 | changeset/{revision} shows tags |
|
135 | 135 | |
|
136 | 136 | $ request json-rev/78896eb0e102 |
|
137 | 137 | 200 Script output follows |
|
138 | 138 | |
|
139 | 139 | "not yet implemented" |
|
140 | 140 | |
|
141 | 141 | changeset/{revision} shows bookmarks |
|
142 | 142 | |
|
143 | 143 | $ request json-rev/8d7c456572ac |
|
144 | 144 | 200 Script output follows |
|
145 | 145 | |
|
146 | 146 | "not yet implemented" |
|
147 | 147 | |
|
148 | 148 | changeset/{revision} shows branches |
|
149 | 149 | |
|
150 | 150 | $ request json-rev/6ab967a8ab34 |
|
151 | 151 | 200 Script output follows |
|
152 | 152 | |
|
153 | 153 | "not yet implemented" |
|
154 | 154 | |
|
155 | 155 | manifest/{revision}/{path} shows info about a directory at a revision |
|
156 | 156 | |
|
157 | 157 | $ request json-manifest/06e557f3edf6/ |
|
158 | 158 | 200 Script output follows |
|
159 | 159 | |
|
160 | 160 | "not yet implemented" |
|
161 | 161 | |
|
162 | 162 | tags/ shows tags info |
|
163 | 163 | |
|
164 | 164 | $ request json-tags |
|
165 | 165 | 200 Script output follows |
|
166 | 166 | |
|
167 | "not yet implemented" | |
|
167 | { | |
|
168 | "node": "6ab967a8ab3489227a83f80e920faa039a71819f", | |
|
169 | "tags": [ | |
|
170 | { | |
|
171 | "date": [ | |
|
172 | 0.0, | |
|
173 | 0 | |
|
174 | ], | |
|
175 | "node": "f2890a05fea49bfaf9fb27ed5490894eba32da78", | |
|
176 | "tag": "tag2" | |
|
177 | }, | |
|
178 | { | |
|
179 | "date": [ | |
|
180 | 0.0, | |
|
181 | 0 | |
|
182 | ], | |
|
183 | "node": "78896eb0e102174ce9278438a95e12543e4367a7", | |
|
184 | "tag": "tag1" | |
|
185 | } | |
|
186 | ] | |
|
187 | } | |
|
168 | 188 | |
|
169 | 189 | bookmarks/ shows bookmarks info |
|
170 | 190 | |
|
171 | 191 | $ request json-bookmarks |
|
172 | 192 | 200 Script output follows |
|
173 | 193 | |
|
174 | 194 | "not yet implemented" |
|
175 | 195 | |
|
176 | 196 | branches/ shows branches info |
|
177 | 197 | |
|
178 | 198 | $ request json-branches |
|
179 | 199 | 200 Script output follows |
|
180 | 200 | |
|
181 | 201 | "not yet implemented" |
|
182 | 202 | |
|
183 | 203 | summary/ shows a summary of repository state |
|
184 | 204 | |
|
185 | 205 | $ request json-summary |
|
186 | 206 | 200 Script output follows |
|
187 | 207 | |
|
188 | 208 | "not yet implemented" |
|
189 | 209 | |
|
190 | 210 | filediff/{revision}/{path} shows changes to a file in a revision |
|
191 | 211 | |
|
192 | 212 | $ request json-diff/f8bbb9024b10/foo |
|
193 | 213 | 200 Script output follows |
|
194 | 214 | |
|
195 | 215 | "not yet implemented" |
|
196 | 216 | |
|
197 | 217 | comparison/{revision}/{path} shows information about before and after for a file |
|
198 | 218 | |
|
199 | 219 | $ request json-comparison/f8bbb9024b10/foo |
|
200 | 220 | 200 Script output follows |
|
201 | 221 | |
|
202 | 222 | "not yet implemented" |
|
203 | 223 | |
|
204 | 224 | annotate/{revision}/{path} shows annotations for each line |
|
205 | 225 | |
|
206 | 226 | $ request json-annotate/f8bbb9024b10/foo |
|
207 | 227 | 200 Script output follows |
|
208 | 228 | |
|
209 | 229 | "not yet implemented" |
|
210 | 230 | |
|
211 | 231 | filelog/{revision}/{path} shows history of a single file |
|
212 | 232 | |
|
213 | 233 | $ request json-filelog/f8bbb9024b10/foo |
|
214 | 234 | 200 Script output follows |
|
215 | 235 | |
|
216 | 236 | "not yet implemented" |
|
217 | 237 | |
|
218 | 238 | (archive/ doesn't use templating, so ignore it) |
|
219 | 239 | |
|
220 | 240 | (static/ doesn't use templating, so ignore it) |
|
221 | 241 | |
|
222 | 242 | graph/ shows information that can be used to render a graph of the DAG |
|
223 | 243 | |
|
224 | 244 | $ request json-graph |
|
225 | 245 | 200 Script output follows |
|
226 | 246 | |
|
227 | 247 | "not yet implemented" |
|
228 | 248 | |
|
229 | 249 | help/ shows help topics |
|
230 | 250 | |
|
231 | 251 | $ request json-help |
|
232 | 252 | 200 Script output follows |
|
233 | 253 | |
|
234 | 254 | "not yet implemented" |
|
235 | 255 | |
|
236 | 256 | help/{topic} shows an individual help topic |
|
237 | 257 | |
|
238 | 258 | $ request json-help/phases |
|
239 | 259 | 200 Script output follows |
|
240 | 260 | |
|
241 | 261 | "not yet implemented" |
General Comments 0
You need to be logged in to leave comments.
Login now