Mercurial > hg
comparison tests/test-hgweb-json.t @ 24563:830280536946
json: implement {changeset} template
Output only contains basic changeset information for the moment. The
format is compatible with `hg log -Tjson`.
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Tue, 31 Mar 2015 22:35:12 -0700 |
parents | e55449dae606 |
children | 5ec4bda3097a |
comparison
equal
deleted
inserted
replaced
24562:e55449dae606 | 24563:830280536946 |
---|---|
28 $ hg bookmark bookmark2 | 28 $ hg bookmark bookmark2 |
29 $ hg -q up -r 0 | 29 $ hg -q up -r 0 |
30 $ hg -q branch test-branch | 30 $ hg -q branch test-branch |
31 $ echo branch > foo | 31 $ echo branch > foo |
32 $ hg commit -m 'create test branch' | 32 $ hg commit -m 'create test branch' |
33 $ echo branch_commit_2 > foo | |
34 $ hg commit -m 'another commit in test-branch' | |
35 $ hg -q up default | |
36 $ hg merge --tool :local test-branch | |
37 0 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
38 (branch merge, don't forget to commit) | |
39 $ hg commit -m 'merge test-branch into default' | |
33 | 40 |
34 $ hg log -G | 41 $ hg log -G |
35 @ changeset: 7:6ab967a8ab34 | 42 @ changeset: 9:cc725e08502a |
36 | branch: test-branch | 43 |\ tag: tip |
37 | tag: tip | 44 | | parent: 6:ceed296fe500 |
38 | parent: 0:06e557f3edf6 | 45 | | parent: 8:ed66c30e87eb |
39 | user: test | 46 | | user: test |
40 | date: Thu Jan 01 00:00:00 1970 +0000 | 47 | | date: Thu Jan 01 00:00:00 1970 +0000 |
41 | summary: create test branch | 48 | | summary: merge test-branch into default |
42 | | 49 | | |
43 | o changeset: 6:ceed296fe500 | 50 | o changeset: 8:ed66c30e87eb |
51 | | branch: test-branch | |
52 | | user: test | |
53 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
54 | | summary: another commit in test-branch | |
55 | | | |
56 | o changeset: 7:6ab967a8ab34 | |
57 | | branch: test-branch | |
58 | | parent: 0:06e557f3edf6 | |
59 | | user: test | |
60 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
61 | | summary: create test branch | |
62 | | | |
63 o | changeset: 6:ceed296fe500 | |
44 | | bookmark: bookmark2 | 64 | | bookmark: bookmark2 |
45 | | user: test | 65 | | user: test |
46 | | date: Thu Jan 01 00:00:00 1970 +0000 | 66 | | date: Thu Jan 01 00:00:00 1970 +0000 |
47 | | summary: create tag2 | 67 | | summary: create tag2 |
48 | | | 68 | | |
49 | o changeset: 5:f2890a05fea4 | 69 o | changeset: 5:f2890a05fea4 |
50 | | tag: tag2 | 70 | | tag: tag2 |
51 | | user: test | 71 | | user: test |
52 | | date: Thu Jan 01 00:00:00 1970 +0000 | 72 | | date: Thu Jan 01 00:00:00 1970 +0000 |
53 | | summary: another commit to da/foo | 73 | | summary: another commit to da/foo |
54 | | | 74 | | |
55 | o changeset: 4:93a8ce14f891 | 75 o | changeset: 4:93a8ce14f891 |
56 | | user: test | 76 | | user: test |
57 | | date: Thu Jan 01 00:00:00 1970 +0000 | 77 | | date: Thu Jan 01 00:00:00 1970 +0000 |
58 | | summary: create tag | 78 | | summary: create tag |
59 | | | 79 | | |
60 | o changeset: 3:78896eb0e102 | 80 o | changeset: 3:78896eb0e102 |
61 | | tag: tag1 | 81 | | tag: tag1 |
62 | | user: test | 82 | | user: test |
63 | | date: Thu Jan 01 00:00:00 1970 +0000 | 83 | | date: Thu Jan 01 00:00:00 1970 +0000 |
64 | | summary: move foo | 84 | | summary: move foo |
65 | | | 85 | | |
66 | o changeset: 2:8d7c456572ac | 86 o | changeset: 2:8d7c456572ac |
67 | | bookmark: bookmark1 | 87 | | bookmark: bookmark1 |
68 | | user: test | 88 | | user: test |
69 | | date: Thu Jan 01 00:00:00 1970 +0000 | 89 | | date: Thu Jan 01 00:00:00 1970 +0000 |
70 | | summary: modify da/foo | 90 | | summary: modify da/foo |
71 | | | 91 | | |
72 | o changeset: 1:f8bbb9024b10 | 92 o | changeset: 1:f8bbb9024b10 |
73 |/ user: test | 93 |/ user: test |
74 | date: Thu Jan 01 00:00:00 1970 +0000 | 94 | date: Thu Jan 01 00:00:00 1970 +0000 |
75 | summary: modify foo | 95 | summary: modify foo |
76 | | 96 | |
77 o changeset: 0:06e557f3edf6 | 97 o changeset: 0:06e557f3edf6 |
127 changeset/ renders the tip changeset | 147 changeset/ renders the tip changeset |
128 | 148 |
129 $ request json-rev | 149 $ request json-rev |
130 200 Script output follows | 150 200 Script output follows |
131 | 151 |
132 "not yet implemented" | 152 { |
153 "bookmarks": [], | |
154 "branch": "default", | |
155 "date": [ | |
156 0.0, | |
157 0 | |
158 ], | |
159 "desc": "merge test-branch into default", | |
160 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7", | |
161 "parents": [ | |
162 "ceed296fe500c3fac9541e31dad860cb49c89e45", | |
163 "ed66c30e87eb65337c05a4229efaa5f1d5285a90" | |
164 ], | |
165 "tags": [ | |
166 "tip" | |
167 ], | |
168 "user": "test" | |
169 } | |
133 | 170 |
134 changeset/{revision} shows tags | 171 changeset/{revision} shows tags |
135 | 172 |
136 $ request json-rev/78896eb0e102 | 173 $ request json-rev/78896eb0e102 |
137 200 Script output follows | 174 200 Script output follows |
138 | 175 |
139 "not yet implemented" | 176 { |
177 "bookmarks": [], | |
178 "branch": "default", | |
179 "date": [ | |
180 0.0, | |
181 0 | |
182 ], | |
183 "desc": "move foo", | |
184 "node": "78896eb0e102174ce9278438a95e12543e4367a7", | |
185 "parents": [ | |
186 "8d7c456572acf3557e8ed8a07286b10c408bcec5" | |
187 ], | |
188 "tags": [ | |
189 "tag1" | |
190 ], | |
191 "user": "test" | |
192 } | |
140 | 193 |
141 changeset/{revision} shows bookmarks | 194 changeset/{revision} shows bookmarks |
142 | 195 |
143 $ request json-rev/8d7c456572ac | 196 $ request json-rev/8d7c456572ac |
144 200 Script output follows | 197 200 Script output follows |
145 | 198 |
146 "not yet implemented" | 199 { |
200 "bookmarks": [ | |
201 "bookmark1" | |
202 ], | |
203 "branch": "default", | |
204 "date": [ | |
205 0.0, | |
206 0 | |
207 ], | |
208 "desc": "modify da/foo", | |
209 "node": "8d7c456572acf3557e8ed8a07286b10c408bcec5", | |
210 "parents": [ | |
211 "f8bbb9024b10f93cdbb8d940337398291d40dea8" | |
212 ], | |
213 "tags": [], | |
214 "user": "test" | |
215 } | |
147 | 216 |
148 changeset/{revision} shows branches | 217 changeset/{revision} shows branches |
149 | 218 |
150 $ request json-rev/6ab967a8ab34 | 219 $ request json-rev/6ab967a8ab34 |
151 200 Script output follows | 220 200 Script output follows |
152 | 221 |
153 "not yet implemented" | 222 { |
223 "bookmarks": [], | |
224 "branch": "test-branch", | |
225 "date": [ | |
226 0.0, | |
227 0 | |
228 ], | |
229 "desc": "create test branch", | |
230 "node": "6ab967a8ab3489227a83f80e920faa039a71819f", | |
231 "parents": [ | |
232 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e" | |
233 ], | |
234 "tags": [], | |
235 "user": "test" | |
236 } | |
154 | 237 |
155 manifest/{revision}/{path} shows info about a directory at a revision | 238 manifest/{revision}/{path} shows info about a directory at a revision |
156 | 239 |
157 $ request json-manifest/06e557f3edf6/ | 240 $ request json-manifest/06e557f3edf6/ |
158 200 Script output follows | 241 200 Script output follows |
163 | 246 |
164 $ request json-tags | 247 $ request json-tags |
165 200 Script output follows | 248 200 Script output follows |
166 | 249 |
167 { | 250 { |
168 "node": "6ab967a8ab3489227a83f80e920faa039a71819f", | 251 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7", |
169 "tags": [ | 252 "tags": [ |
170 { | 253 { |
171 "date": [ | 254 "date": [ |
172 0.0, | 255 0.0, |
173 0 | 256 0 |
208 0 | 291 0 |
209 ], | 292 ], |
210 "node": "ceed296fe500c3fac9541e31dad860cb49c89e45" | 293 "node": "ceed296fe500c3fac9541e31dad860cb49c89e45" |
211 } | 294 } |
212 ], | 295 ], |
213 "node": "6ab967a8ab3489227a83f80e920faa039a71819f" | 296 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7" |
214 } | 297 } |
215 | 298 |
216 branches/ shows branches info | 299 branches/ shows branches info |
217 | 300 |
218 $ request json-branches | 301 $ request json-branches |
219 200 Script output follows | 302 200 Script output follows |
220 | 303 |
221 { | 304 { |
222 "branches": [ | 305 "branches": [ |
223 { | 306 { |
224 "branch": "test-branch", | 307 "branch": "default", |
225 "date": [ | 308 "date": [ |
226 0.0, | 309 0.0, |
227 0 | 310 0 |
228 ], | 311 ], |
229 "node": "6ab967a8ab3489227a83f80e920faa039a71819f", | 312 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7", |
230 "status": "open" | 313 "status": "open" |
231 }, | 314 }, |
232 { | 315 { |
233 "branch": "default", | 316 "branch": "test-branch", |
234 "date": [ | 317 "date": [ |
235 0.0, | 318 0.0, |
236 0 | 319 0 |
237 ], | 320 ], |
238 "node": "ceed296fe500c3fac9541e31dad860cb49c89e45", | 321 "node": "ed66c30e87eb65337c05a4229efaa5f1d5285a90", |
239 "status": "open" | 322 "status": "inactive" |
240 } | 323 } |
241 ] | 324 ] |
242 } | 325 } |
243 | 326 |
244 summary/ shows a summary of repository state | 327 summary/ shows a summary of repository state |