##// END OF EJS Templates
json: implement {changeset} template...
Gregory Szorc -
r24563:83028053 default
parent child Browse files
Show More
@@ -3,7 +3,20 b' filerevision = \'"not yet implemented"\''
3 3 search = '"not yet implemented"'
4 4 shortlog = '"not yet implemented"'
5 5 changelog = '"not yet implemented"'
6 changeset = '"not yet implemented"'
6 changeset = '\{
7 "node": {node|json},
8 "date": {date|json},
9 "desc": {desc|json},
10 "branch": {if(branch, branch%changesetbranch, "default"|json)},
11 "bookmarks": [{join(changesetbookmark, ", ")}],
12 "tags": [{join(changesettag, ", ")}],
13 "user": {author|json},
14 "parents": [{join(parent%changesetparent, ", ")}]
15 }'
16 changesetbranch = '{name|json}'
17 changesetbookmark = '{bookmark|json}'
18 changesettag = '{tag|json}'
19 changesetparent = '{node|json}'
7 20 manifest = '"not yet implemented"'
8 21 tags = '\{
9 22 "node": {node|json},
@@ -30,46 +30,66 b''
30 30 $ hg -q branch test-branch
31 31 $ echo branch > foo
32 32 $ hg commit -m 'create test branch'
33 $ echo branch_commit_2 > foo
34 $ hg commit -m 'another commit in test-branch'
35 $ hg -q up default
36 $ hg merge --tool :local test-branch
37 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
38 (branch merge, don't forget to commit)
39 $ hg commit -m 'merge test-branch into default'
33 40
34 41 $ hg log -G
35 @ changeset: 7:6ab967a8ab34
36 | branch: test-branch
37 | tag: tip
38 | parent: 0:06e557f3edf6
39 | user: test
40 | date: Thu Jan 01 00:00:00 1970 +0000
41 | summary: create test branch
42 |
43 | o changeset: 6:ceed296fe500
42 @ changeset: 9:cc725e08502a
43 |\ tag: tip
44 | | parent: 6:ceed296fe500
45 | | parent: 8:ed66c30e87eb
46 | | user: test
47 | | date: Thu Jan 01 00:00:00 1970 +0000
48 | | summary: merge test-branch into default
49 | |
50 | o changeset: 8:ed66c30e87eb
51 | | branch: test-branch
52 | | user: test
53 | | date: Thu Jan 01 00:00:00 1970 +0000
54 | | summary: another commit in test-branch
55 | |
56 | o changeset: 7:6ab967a8ab34
57 | | branch: test-branch
58 | | parent: 0:06e557f3edf6
59 | | user: test
60 | | date: Thu Jan 01 00:00:00 1970 +0000
61 | | summary: create test branch
62 | |
63 o | changeset: 6:ceed296fe500
44 64 | | bookmark: bookmark2
45 65 | | user: test
46 66 | | date: Thu Jan 01 00:00:00 1970 +0000
47 67 | | summary: create tag2
48 68 | |
49 | o changeset: 5:f2890a05fea4
69 o | changeset: 5:f2890a05fea4
50 70 | | tag: tag2
51 71 | | user: test
52 72 | | date: Thu Jan 01 00:00:00 1970 +0000
53 73 | | summary: another commit to da/foo
54 74 | |
55 | o changeset: 4:93a8ce14f891
75 o | changeset: 4:93a8ce14f891
56 76 | | user: test
57 77 | | date: Thu Jan 01 00:00:00 1970 +0000
58 78 | | summary: create tag
59 79 | |
60 | o changeset: 3:78896eb0e102
80 o | changeset: 3:78896eb0e102
61 81 | | tag: tag1
62 82 | | user: test
63 83 | | date: Thu Jan 01 00:00:00 1970 +0000
64 84 | | summary: move foo
65 85 | |
66 | o changeset: 2:8d7c456572ac
86 o | changeset: 2:8d7c456572ac
67 87 | | bookmark: bookmark1
68 88 | | user: test
69 89 | | date: Thu Jan 01 00:00:00 1970 +0000
70 90 | | summary: modify da/foo
71 91 | |
72 | o changeset: 1:f8bbb9024b10
92 o | changeset: 1:f8bbb9024b10
73 93 |/ user: test
74 94 | date: Thu Jan 01 00:00:00 1970 +0000
75 95 | summary: modify foo
@@ -129,28 +149,91 b' changeset/ renders the tip changeset'
129 149 $ request json-rev
130 150 200 Script output follows
131 151
132 "not yet implemented"
152 {
153 "bookmarks": [],
154 "branch": "default",
155 "date": [
156 0.0,
157 0
158 ],
159 "desc": "merge test-branch into default",
160 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
161 "parents": [
162 "ceed296fe500c3fac9541e31dad860cb49c89e45",
163 "ed66c30e87eb65337c05a4229efaa5f1d5285a90"
164 ],
165 "tags": [
166 "tip"
167 ],
168 "user": "test"
169 }
133 170
134 171 changeset/{revision} shows tags
135 172
136 173 $ request json-rev/78896eb0e102
137 174 200 Script output follows
138 175
139 "not yet implemented"
176 {
177 "bookmarks": [],
178 "branch": "default",
179 "date": [
180 0.0,
181 0
182 ],
183 "desc": "move foo",
184 "node": "78896eb0e102174ce9278438a95e12543e4367a7",
185 "parents": [
186 "8d7c456572acf3557e8ed8a07286b10c408bcec5"
187 ],
188 "tags": [
189 "tag1"
190 ],
191 "user": "test"
192 }
140 193
141 194 changeset/{revision} shows bookmarks
142 195
143 196 $ request json-rev/8d7c456572ac
144 197 200 Script output follows
145 198
146 "not yet implemented"
199 {
200 "bookmarks": [
201 "bookmark1"
202 ],
203 "branch": "default",
204 "date": [
205 0.0,
206 0
207 ],
208 "desc": "modify da/foo",
209 "node": "8d7c456572acf3557e8ed8a07286b10c408bcec5",
210 "parents": [
211 "f8bbb9024b10f93cdbb8d940337398291d40dea8"
212 ],
213 "tags": [],
214 "user": "test"
215 }
147 216
148 217 changeset/{revision} shows branches
149 218
150 219 $ request json-rev/6ab967a8ab34
151 220 200 Script output follows
152 221
153 "not yet implemented"
222 {
223 "bookmarks": [],
224 "branch": "test-branch",
225 "date": [
226 0.0,
227 0
228 ],
229 "desc": "create test branch",
230 "node": "6ab967a8ab3489227a83f80e920faa039a71819f",
231 "parents": [
232 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
233 ],
234 "tags": [],
235 "user": "test"
236 }
154 237
155 238 manifest/{revision}/{path} shows info about a directory at a revision
156 239
@@ -165,7 +248,7 b' tags/ shows tags info'
165 248 200 Script output follows
166 249
167 250 {
168 "node": "6ab967a8ab3489227a83f80e920faa039a71819f",
251 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
169 252 "tags": [
170 253 {
171 254 "date": [
@@ -210,7 +293,7 b' bookmarks/ shows bookmarks info'
210 293 "node": "ceed296fe500c3fac9541e31dad860cb49c89e45"
211 294 }
212 295 ],
213 "node": "6ab967a8ab3489227a83f80e920faa039a71819f"
296 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7"
214 297 }
215 298
216 299 branches/ shows branches info
@@ -221,22 +304,22 b' branches/ shows branches info'
221 304 {
222 305 "branches": [
223 306 {
307 "branch": "default",
308 "date": [
309 0.0,
310 0
311 ],
312 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
313 "status": "open"
314 },
315 {
224 316 "branch": "test-branch",
225 317 "date": [
226 318 0.0,
227 319 0
228 320 ],
229 "node": "6ab967a8ab3489227a83f80e920faa039a71819f",
230 "status": "open"
231 },
232 {
233 "branch": "default",
234 "date": [
235 0.0,
236 0
237 ],
238 "node": "ceed296fe500c3fac9541e31dad860cb49c89e45",
239 "status": "open"
321 "node": "ed66c30e87eb65337c05a4229efaa5f1d5285a90",
322 "status": "inactive"
240 323 }
241 324 ]
242 325 }
General Comments 0
You need to be logged in to leave comments. Login now