##// END OF EJS Templates
hgweb: add "children" into the JSON template for a changeset...
Manuel Jacob -
r51257:c0fbd63d default
parent child Browse files
Show More
@@ -1,251 +1,252 b''
1 default = 'shortlog'
1 default = 'shortlog'
2 mimetype = 'application/json'
2 mimetype = 'application/json'
3
3
4 filerevision = '\{
4 filerevision = '\{
5 "node": {node|json},
5 "node": {node|json},
6 "path": {file|json},
6 "path": {file|json},
7 "date": {date|json},
7 "date": {date|json},
8 "desc": {desc|utf8|json},
8 "desc": {desc|utf8|json},
9 "branch": {if(branch, branch%changesetbranch, "default"|json)},
9 "branch": {if(branch, branch%changesetbranch, "default"|json)},
10 "bookmarks": [{join(bookmarks%changelistentryname, ", ")}],
10 "bookmarks": [{join(bookmarks%changelistentryname, ", ")}],
11 "tags": [{join(tags%changelistentryname, ", ")}],
11 "tags": [{join(tags%changelistentryname, ", ")}],
12 "user": {author|utf8|json},
12 "user": {author|utf8|json},
13 "parents": [{join(parent%changesetparent, ", ")}],
13 "parents": [{join(parent%changesetparent, ", ")}],
14 "phase": {phase|json},
14 "phase": {phase|json},
15 "lines": [{join(text%lineentry, ", ")}]
15 "lines": [{join(text%lineentry, ", ")}]
16 }'
16 }'
17 lineentry = '\{
17 lineentry = '\{
18 "line": {line|json}
18 "line": {line|json}
19 }'
19 }'
20 search = '\{
20 search = '\{
21 "node": {node|json},
21 "node": {node|json},
22 "query": {query|json},
22 "query": {query|json},
23 "entries": [{join(entries%changelistentry, ", ")}]
23 "entries": [{join(entries%changelistentry, ", ")}]
24 }'
24 }'
25 # changelog and shortlog are the same web API but with different
25 # changelog and shortlog are the same web API but with different
26 # number of entries.
26 # number of entries.
27 changelog = changelist.tmpl
27 changelog = changelist.tmpl
28 shortlog = changelist.tmpl
28 shortlog = changelist.tmpl
29 graph = graph.tmpl
29 graph = graph.tmpl
30 changelistentry = '\{
30 changelistentry = '\{
31 "node": {node|json},
31 "node": {node|json},
32 "date": {date|json},
32 "date": {date|json},
33 "desc": {desc|utf8|json},
33 "desc": {desc|utf8|json},
34 "branch": {if(branch, branch%changesetbranch, "default"|json)},
34 "branch": {if(branch, branch%changesetbranch, "default"|json)},
35 "bookmarks": [{join(bookmarks%changelistentryname, ", ")}],
35 "bookmarks": [{join(bookmarks%changelistentryname, ", ")}],
36 "tags": [{join(tags%changelistentryname, ", ")}],
36 "tags": [{join(tags%changelistentryname, ", ")}],
37 "user": {author|utf8|json},
37 "user": {author|utf8|json},
38 "phase": {phase|json},
38 "phase": {phase|json},
39 "parents": [{if(allparents, join(allparents%changesetparent, ", "),
39 "parents": [{if(allparents, join(allparents%changesetparent, ", "),
40 join(parent%changesetparent, ", "))}]
40 join(parent%changesetparent, ", "))}]
41 }'
41 }'
42 graphentry = '\{
42 graphentry = '\{
43 "node": {node|json},
43 "node": {node|json},
44 "date": {date|json},
44 "date": {date|json},
45 "desc": {desc|utf8|json},
45 "desc": {desc|utf8|json},
46 "branch": {if(branch, branch%changesetbranch, "default"|json)},
46 "branch": {if(branch, branch%changesetbranch, "default"|json)},
47 "bookmarks": [{join(bookmarks%changelistentryname, ", ")}],
47 "bookmarks": [{join(bookmarks%changelistentryname, ", ")}],
48 "tags": [{join(tags%changelistentryname, ", ")}],
48 "tags": [{join(tags%changelistentryname, ", ")}],
49 "user": {author|utf8|json},
49 "user": {author|utf8|json},
50 "phase": {phase|json},
50 "phase": {phase|json},
51 "col": {col|json},
51 "col": {col|json},
52 "row": {row|json},
52 "row": {row|json},
53 "color": {color|json},
53 "color": {color|json},
54 "edges": {edges|json},
54 "edges": {edges|json},
55 "parents": [{if(allparents, join(allparents%changesetparent, ", "),
55 "parents": [{if(allparents, join(allparents%changesetparent, ", "),
56 join(parent%changesetparent, ", "))}]
56 join(parent%changesetparent, ", "))}]
57 }'
57 }'
58 changelistentryname = '{name|utf8|json}'
58 changelistentryname = '{name|utf8|json}'
59 changeset = '\{
59 changeset = '\{
60 "node": {node|json},
60 "node": {node|json},
61 "date": {date|json},
61 "date": {date|json},
62 "desc": {desc|utf8|json},
62 "desc": {desc|utf8|json},
63 "branch": {if(branch, branch%changesetbranch, "default"|json)},
63 "branch": {if(branch, branch%changesetbranch, "default"|json)},
64 "bookmarks": [{join(changesetbookmark, ", ")}],
64 "bookmarks": [{join(changesetbookmark, ", ")}],
65 "tags": [{join(changesettag, ", ")}],
65 "tags": [{join(changesettag, ", ")}],
66 "user": {author|utf8|json},
66 "user": {author|utf8|json},
67 "parents": [{join(parent%changesetparent, ", ")}],
67 "parents": [{join(parent%changesetparent, ", ")}],
68 "children": [{join(child%changesetparent, ", ")}],
68 "files": [{join(files, ", ")}],
69 "files": [{join(files, ", ")}],
69 "diff": [{join(diff, ", ")}],
70 "diff": [{join(diff, ", ")}],
70 "phase": {phase|json}
71 "phase": {phase|json}
71 }'
72 }'
72 changesetbranch = '{name|utf8|json}'
73 changesetbranch = '{name|utf8|json}'
73 changesetbookmark = '{bookmark|utf8|json}'
74 changesetbookmark = '{bookmark|utf8|json}'
74 changesettag = '{tag|utf8|json}'
75 changesettag = '{tag|utf8|json}'
75 changesetparent = '{node|json}'
76 changesetparent = '{node|json}'
76 manifest = '\{
77 manifest = '\{
77 "node": {node|json},
78 "node": {node|json},
78 "abspath": {path|json},
79 "abspath": {path|json},
79 "directories": [{join(dentries%direntry, ", ")}],
80 "directories": [{join(dentries%direntry, ", ")}],
80 "files": [{join(fentries%fileentry, ", ")}],
81 "files": [{join(fentries%fileentry, ", ")}],
81 "bookmarks": [{join(bookmarks%name, ", ")}],
82 "bookmarks": [{join(bookmarks%name, ", ")}],
82 "tags": [{join(tags%name, ", ")}]
83 "tags": [{join(tags%name, ", ")}]
83 }'
84 }'
84 name = '{name|utf8|json}'
85 name = '{name|utf8|json}'
85 direntry = '\{
86 direntry = '\{
86 "abspath": {path|json},
87 "abspath": {path|json},
87 "basename": {basename|json},
88 "basename": {basename|json},
88 "emptydirs": {emptydirs|json}
89 "emptydirs": {emptydirs|json}
89 }'
90 }'
90 fileentry = '\{
91 fileentry = '\{
91 "abspath": {file|json},
92 "abspath": {file|json},
92 "basename": {basename|json},
93 "basename": {basename|json},
93 "date": {date|json},
94 "date": {date|json},
94 "size": {size|json},
95 "size": {size|json},
95 "flags": {permissions|json}
96 "flags": {permissions|json}
96 }'
97 }'
97 tags = '\{
98 tags = '\{
98 "node": {node|json},
99 "node": {node|json},
99 "tags": [{join(entriesnotip%tagentry, ", ")}]
100 "tags": [{join(entriesnotip%tagentry, ", ")}]
100 }'
101 }'
101 tagentry = '\{
102 tagentry = '\{
102 "tag": {tag|utf8|json},
103 "tag": {tag|utf8|json},
103 "node": {node|json},
104 "node": {node|json},
104 "date": {date|json}
105 "date": {date|json}
105 }'
106 }'
106 bookmarks = '\{
107 bookmarks = '\{
107 "node": {node|json},
108 "node": {node|json},
108 "bookmarks": [{join(entries%bookmarkentry, ", ")}]
109 "bookmarks": [{join(entries%bookmarkentry, ", ")}]
109 }'
110 }'
110 bookmarkentry = '\{
111 bookmarkentry = '\{
111 "bookmark": {bookmark|utf8|json},
112 "bookmark": {bookmark|utf8|json},
112 "node": {node|json},
113 "node": {node|json},
113 "date": {date|json}
114 "date": {date|json}
114 }'
115 }'
115 branches = '\{
116 branches = '\{
116 "branches": [{join(entries%branchentry, ", ")}]
117 "branches": [{join(entries%branchentry, ", ")}]
117 }'
118 }'
118 branchentry = '\{
119 branchentry = '\{
119 "branch": {branch|utf8|json},
120 "branch": {branch|utf8|json},
120 "node": {node|json},
121 "node": {node|json},
121 "date": {date|json},
122 "date": {date|json},
122 "status": {status|json}
123 "status": {status|json}
123 }'
124 }'
124 shortlogentry = '{changelistentry}'
125 shortlogentry = '{changelistentry}'
125 summary = '\{
126 summary = '\{
126 "node": {node|json},
127 "node": {node|json},
127 "lastchange": {lastchange|json},
128 "lastchange": {lastchange|json},
128 "bookmarks": [{join(bookmarks%bookmarkentry, ", ")}],
129 "bookmarks": [{join(bookmarks%bookmarkentry, ", ")}],
129 "branches": [{join(branches%branchentry, ", ")}],
130 "branches": [{join(branches%branchentry, ", ")}],
130 "shortlog": [{join(shortlog%shortlogentry, ", ")}],
131 "shortlog": [{join(shortlog%shortlogentry, ", ")}],
131 "tags": [{join(tags%tagentry, ", ")}],
132 "tags": [{join(tags%tagentry, ", ")}],
132 "archives": [{join(archives%archiveentry, ", ")}],
133 "archives": [{join(archives%archiveentry, ", ")}],
133 "labels": {labels|json}
134 "labels": {labels|json}
134 }'
135 }'
135 archiveentry = '\{
136 archiveentry = '\{
136 "node": {node|json},
137 "node": {node|json},
137 "extension": {extension|json},
138 "extension": {extension|json},
138 "type": {type|json},
139 "type": {type|json},
139 "url": {"{urlbase}{url}archive/{node}{extension}"|json}
140 "url": {"{urlbase}{url}archive/{node}{extension}"|json}
140 }'
141 }'
141 filediff = '\{
142 filediff = '\{
142 "path": {file|json},
143 "path": {file|json},
143 "node": {node|json},
144 "node": {node|json},
144 "date": {date|json},
145 "date": {date|json},
145 "desc": {desc|utf8|json},
146 "desc": {desc|utf8|json},
146 "author": {author|utf8|json},
147 "author": {author|utf8|json},
147 "parents": [{join(parent%changesetparent, ", ")}],
148 "parents": [{join(parent%changesetparent, ", ")}],
148 "children": [{join(child%changesetparent, ", ")}],
149 "children": [{join(child%changesetparent, ", ")}],
149 "diff": [{join(diff, ", ")}]
150 "diff": [{join(diff, ", ")}]
150 }'
151 }'
151 diffblock = '\{
152 diffblock = '\{
152 "blockno": {blockno|json},
153 "blockno": {blockno|json},
153 "lines": [{join(lines, ", ")}]
154 "lines": [{join(lines, ", ")}]
154 }'
155 }'
155 difflineplus = '\{
156 difflineplus = '\{
156 "t": "+",
157 "t": "+",
157 "n": {lineno|json},
158 "n": {lineno|json},
158 "l": {line|json}
159 "l": {line|json}
159 }'
160 }'
160 difflineminus = '\{
161 difflineminus = '\{
161 "t": "-",
162 "t": "-",
162 "n": {lineno|json},
163 "n": {lineno|json},
163 "l": {line|json}
164 "l": {line|json}
164 }'
165 }'
165 difflineat = '\{
166 difflineat = '\{
166 "t": "@",
167 "t": "@",
167 "n": {lineno|json},
168 "n": {lineno|json},
168 "l": {line|json}
169 "l": {line|json}
169 }'
170 }'
170 diffline = '\{
171 diffline = '\{
171 "t": "",
172 "t": "",
172 "n": {lineno|json},
173 "n": {lineno|json},
173 "l": {line|json}
174 "l": {line|json}
174 }'
175 }'
175 filecomparison = '\{
176 filecomparison = '\{
176 "path": {file|json},
177 "path": {file|json},
177 "node": {node|json},
178 "node": {node|json},
178 "date": {date|json},
179 "date": {date|json},
179 "desc": {desc|utf8|json},
180 "desc": {desc|utf8|json},
180 "author": {author|utf8|json},
181 "author": {author|utf8|json},
181 "parents": [{join(parent%changesetparent, ", ")}],
182 "parents": [{join(parent%changesetparent, ", ")}],
182 "children": [{join(child%changesetparent, ", ")}],
183 "children": [{join(child%changesetparent, ", ")}],
183 "leftnode": {leftnode|json},
184 "leftnode": {leftnode|json},
184 "rightnode": {rightnode|json},
185 "rightnode": {rightnode|json},
185 "comparison": [{join(comparison, ", ")}]
186 "comparison": [{join(comparison, ", ")}]
186 }'
187 }'
187 comparisonblock = '\{
188 comparisonblock = '\{
188 "lines": [{join(lines, ", ")}]
189 "lines": [{join(lines, ", ")}]
189 }'
190 }'
190 comparisonline = '\{
191 comparisonline = '\{
191 "t": {type|json},
192 "t": {type|json},
192 "ln": {leftlineno|json},
193 "ln": {leftlineno|json},
193 "ll": {leftline|json},
194 "ll": {leftline|json},
194 "rn": {rightlineno|json},
195 "rn": {rightlineno|json},
195 "rl": {rightline|json}
196 "rl": {rightline|json}
196 }'
197 }'
197 fileannotate = '\{
198 fileannotate = '\{
198 "abspath": {file|json},
199 "abspath": {file|json},
199 "node": {node|json},
200 "node": {node|json},
200 "author": {author|utf8|json},
201 "author": {author|utf8|json},
201 "date": {date|json},
202 "date": {date|json},
202 "desc": {desc|utf8|json},
203 "desc": {desc|utf8|json},
203 "parents": [{join(parent%changesetparent, ", ")}],
204 "parents": [{join(parent%changesetparent, ", ")}],
204 "children": [{join(child%changesetparent, ", ")}],
205 "children": [{join(child%changesetparent, ", ")}],
205 "permissions": {permissions|json},
206 "permissions": {permissions|json},
206 "annotate": [{join(annotate%fileannotation, ", ")}]
207 "annotate": [{join(annotate%fileannotation, ", ")}]
207 }'
208 }'
208 fileannotation = '\{
209 fileannotation = '\{
209 "node": {node|json},
210 "node": {node|json},
210 "author": {author|utf8|json},
211 "author": {author|utf8|json},
211 "desc": {desc|utf8|json},
212 "desc": {desc|utf8|json},
212 "abspath": {file|json},
213 "abspath": {file|json},
213 "targetline": {targetline|json},
214 "targetline": {targetline|json},
214 "line": {line|json},
215 "line": {line|json},
215 "lineno": {lineno|json},
216 "lineno": {lineno|json},
216 "revdate": {revdate|json}
217 "revdate": {revdate|json}
217 }'
218 }'
218 filelog = '\{
219 filelog = '\{
219 "entries": [{join(entries%changelistentry, ", ")}]
220 "entries": [{join(entries%changelistentry, ", ")}]
220 }'
221 }'
221 helptopics = '\{
222 helptopics = '\{
222 "topics": [{join(topics%helptopicentry, ", ")}],
223 "topics": [{join(topics%helptopicentry, ", ")}],
223 "earlycommands": [{join(earlycommands%helptopicentry, ", ")}],
224 "earlycommands": [{join(earlycommands%helptopicentry, ", ")}],
224 "othercommands": [{join(othercommands%helptopicentry, ", ")}]
225 "othercommands": [{join(othercommands%helptopicentry, ", ")}]
225 }'
226 }'
226 helptopicentry = '\{
227 helptopicentry = '\{
227 "topic": {topic|utf8|json},
228 "topic": {topic|utf8|json},
228 "summary": {summary|utf8|json}
229 "summary": {summary|utf8|json}
229 }'
230 }'
230 help = '\{
231 help = '\{
231 "topic": {topic|utf8|json},
232 "topic": {topic|utf8|json},
232 "rawdoc": {doc|utf8|json}
233 "rawdoc": {doc|utf8|json}
233 }'
234 }'
234 filenodelink = '\{
235 filenodelink = '\{
235 "file": {file|json},
236 "file": {file|json},
236 "status": {status|json}
237 "status": {status|json}
237 }'
238 }'
238 filenolink = '{filenodelink}'
239 filenolink = '{filenodelink}'
239 index = '\{
240 index = '\{
240 "entries": [{join(entries%indexentry, ", ")}]
241 "entries": [{join(entries%indexentry, ", ")}]
241 }'
242 }'
242 indexentry = '\{
243 indexentry = '\{
243 "name": {name|utf8|json},
244 "name": {name|utf8|json},
244 "description": {description|utf8|json},
245 "description": {description|utf8|json},
245 "contact": {contact|utf8|json},
246 "contact": {contact|utf8|json},
246 "lastchange": {lastchange|json},
247 "lastchange": {lastchange|json},
247 "labels": {labels|json}
248 "labels": {labels|json}
248 }'
249 }'
249 error = '\{
250 error = '\{
250 "error": {error|utf8|json}
251 "error": {error|utf8|json}
251 }'
252 }'
@@ -1,2393 +1,2403 b''
1 #require serve
1 #require serve
2
2
3 $ request() {
3 $ request() {
4 > get-with-headers.py --json localhost:$HGPORT "$1"
4 > get-with-headers.py --json localhost:$HGPORT "$1"
5 > }
5 > }
6
6
7 $ hg init test
7 $ hg init test
8 $ cd test
8 $ cd test
9 $ mkdir da
9 $ mkdir da
10 $ echo foo > da/foo
10 $ echo foo > da/foo
11 $ echo foo > foo
11 $ echo foo > foo
12 $ hg -q ci -A -m initial
12 $ hg -q ci -A -m initial
13 $ echo bar > foo
13 $ echo bar > foo
14 $ hg ci -m 'modify foo'
14 $ hg ci -m 'modify foo'
15 $ echo bar > da/foo
15 $ echo bar > da/foo
16 $ hg ci -m 'modify da/foo'
16 $ hg ci -m 'modify da/foo'
17 $ hg bookmark bookmark1
17 $ hg bookmark bookmark1
18 $ hg up default
18 $ hg up default
19 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
19 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
20 (leaving bookmark bookmark1)
20 (leaving bookmark bookmark1)
21 $ hg mv foo foo-new
21 $ hg mv foo foo-new
22 $ hg commit -m 'move foo'
22 $ hg commit -m 'move foo'
23 $ hg tag -m 'create tag' tag1
23 $ hg tag -m 'create tag' tag1
24 $ hg phase --public -r .
24 $ hg phase --public -r .
25 $ echo baz > da/foo
25 $ echo baz > da/foo
26 $ hg commit -m 'another commit to da/foo'
26 $ hg commit -m 'another commit to da/foo'
27 $ hg tag -m 'create tag2' tag2
27 $ hg tag -m 'create tag2' tag2
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
33 $ echo branch_commit_2 > foo
34 $ hg commit -m 'another commit in test-branch'
34 $ hg commit -m 'another commit in test-branch'
35 $ hg -q up default
35 $ hg -q up default
36 $ hg merge --tool :local test-branch
36 $ hg merge --tool :local test-branch
37 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
37 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
38 (branch merge, don't forget to commit)
38 (branch merge, don't forget to commit)
39 $ hg commit -m 'merge test-branch into default'
39 $ hg commit -m 'merge test-branch into default'
40
40
41 $ hg log -G
41 $ hg log -G
42 @ changeset: 9:cc725e08502a
42 @ changeset: 9:cc725e08502a
43 |\ tag: tip
43 |\ tag: tip
44 | | parent: 6:ceed296fe500
44 | | parent: 6:ceed296fe500
45 | | parent: 8:ed66c30e87eb
45 | | parent: 8:ed66c30e87eb
46 | | user: test
46 | | user: test
47 | | date: Thu Jan 01 00:00:00 1970 +0000
47 | | date: Thu Jan 01 00:00:00 1970 +0000
48 | | summary: merge test-branch into default
48 | | summary: merge test-branch into default
49 | |
49 | |
50 | o changeset: 8:ed66c30e87eb
50 | o changeset: 8:ed66c30e87eb
51 | | branch: test-branch
51 | | branch: test-branch
52 | | user: test
52 | | user: test
53 | | date: Thu Jan 01 00:00:00 1970 +0000
53 | | date: Thu Jan 01 00:00:00 1970 +0000
54 | | summary: another commit in test-branch
54 | | summary: another commit in test-branch
55 | |
55 | |
56 | o changeset: 7:6ab967a8ab34
56 | o changeset: 7:6ab967a8ab34
57 | | branch: test-branch
57 | | branch: test-branch
58 | | parent: 0:06e557f3edf6
58 | | parent: 0:06e557f3edf6
59 | | user: test
59 | | user: test
60 | | date: Thu Jan 01 00:00:00 1970 +0000
60 | | date: Thu Jan 01 00:00:00 1970 +0000
61 | | summary: create test branch
61 | | summary: create test branch
62 | |
62 | |
63 o | changeset: 6:ceed296fe500
63 o | changeset: 6:ceed296fe500
64 | | bookmark: bookmark2
64 | | bookmark: bookmark2
65 | | user: test
65 | | user: test
66 | | date: Thu Jan 01 00:00:00 1970 +0000
66 | | date: Thu Jan 01 00:00:00 1970 +0000
67 | | summary: create tag2
67 | | summary: create tag2
68 | |
68 | |
69 o | changeset: 5:f2890a05fea4
69 o | changeset: 5:f2890a05fea4
70 | | tag: tag2
70 | | tag: tag2
71 | | user: test
71 | | user: test
72 | | date: Thu Jan 01 00:00:00 1970 +0000
72 | | date: Thu Jan 01 00:00:00 1970 +0000
73 | | summary: another commit to da/foo
73 | | summary: another commit to da/foo
74 | |
74 | |
75 o | changeset: 4:93a8ce14f891
75 o | changeset: 4:93a8ce14f891
76 | | user: test
76 | | user: test
77 | | date: Thu Jan 01 00:00:00 1970 +0000
77 | | date: Thu Jan 01 00:00:00 1970 +0000
78 | | summary: create tag
78 | | summary: create tag
79 | |
79 | |
80 o | changeset: 3:78896eb0e102
80 o | changeset: 3:78896eb0e102
81 | | tag: tag1
81 | | tag: tag1
82 | | user: test
82 | | user: test
83 | | date: Thu Jan 01 00:00:00 1970 +0000
83 | | date: Thu Jan 01 00:00:00 1970 +0000
84 | | summary: move foo
84 | | summary: move foo
85 | |
85 | |
86 o | changeset: 2:8d7c456572ac
86 o | changeset: 2:8d7c456572ac
87 | | bookmark: bookmark1
87 | | bookmark: bookmark1
88 | | user: test
88 | | user: test
89 | | date: Thu Jan 01 00:00:00 1970 +0000
89 | | date: Thu Jan 01 00:00:00 1970 +0000
90 | | summary: modify da/foo
90 | | summary: modify da/foo
91 | |
91 | |
92 o | changeset: 1:f8bbb9024b10
92 o | changeset: 1:f8bbb9024b10
93 |/ user: test
93 |/ user: test
94 | date: Thu Jan 01 00:00:00 1970 +0000
94 | date: Thu Jan 01 00:00:00 1970 +0000
95 | summary: modify foo
95 | summary: modify foo
96 |
96 |
97 o changeset: 0:06e557f3edf6
97 o changeset: 0:06e557f3edf6
98 user: test
98 user: test
99 date: Thu Jan 01 00:00:00 1970 +0000
99 date: Thu Jan 01 00:00:00 1970 +0000
100 summary: initial
100 summary: initial
101
101
102
102
103 $ echo '[web]' >> .hg/hgrc
103 $ echo '[web]' >> .hg/hgrc
104 $ echo 'allow-archive = bz2' >> .hg/hgrc
104 $ echo 'allow-archive = bz2' >> .hg/hgrc
105 $ hg serve -p $HGPORT -d --pid-file=hg.pid -A access.log -E error.log
105 $ hg serve -p $HGPORT -d --pid-file=hg.pid -A access.log -E error.log
106 $ cat hg.pid >> $DAEMON_PIDS
106 $ cat hg.pid >> $DAEMON_PIDS
107
107
108 (Try to keep these in roughly the order they are defined in webcommands.py)
108 (Try to keep these in roughly the order they are defined in webcommands.py)
109
109
110 (log is handled by filelog/ and changelog/ - ignore it)
110 (log is handled by filelog/ and changelog/ - ignore it)
111
111
112 (rawfile/ doesn't use templating - nothing to test)
112 (rawfile/ doesn't use templating - nothing to test)
113
113
114 file/{revision}/{path} shows file revision
114 file/{revision}/{path} shows file revision
115
115
116 $ request json-file/78896eb0e102/foo-new
116 $ request json-file/78896eb0e102/foo-new
117 200 Script output follows
117 200 Script output follows
118
118
119 {
119 {
120 "bookmarks": [],
120 "bookmarks": [],
121 "branch": "default",
121 "branch": "default",
122 "date": [
122 "date": [
123 0.0,
123 0.0,
124 0
124 0
125 ],
125 ],
126 "desc": "move foo",
126 "desc": "move foo",
127 "lines": [
127 "lines": [
128 {
128 {
129 "line": "bar\n"
129 "line": "bar\n"
130 }
130 }
131 ],
131 ],
132 "node": "78896eb0e102174ce9278438a95e12543e4367a7",
132 "node": "78896eb0e102174ce9278438a95e12543e4367a7",
133 "parents": [
133 "parents": [
134 "f8bbb9024b10f93cdbb8d940337398291d40dea8"
134 "f8bbb9024b10f93cdbb8d940337398291d40dea8"
135 ],
135 ],
136 "path": "foo-new",
136 "path": "foo-new",
137 "phase": "public",
137 "phase": "public",
138 "tags": [
138 "tags": [
139 "tag1"
139 "tag1"
140 ],
140 ],
141 "user": "test"
141 "user": "test"
142 }
142 }
143
143
144 file/{revision} shows root directory info
144 file/{revision} shows root directory info
145
145
146 $ request json-file/cc725e08502a
146 $ request json-file/cc725e08502a
147 200 Script output follows
147 200 Script output follows
148
148
149 {
149 {
150 "abspath": "/",
150 "abspath": "/",
151 "bookmarks": [],
151 "bookmarks": [],
152 "directories": [
152 "directories": [
153 {
153 {
154 "abspath": "/da",
154 "abspath": "/da",
155 "basename": "da",
155 "basename": "da",
156 "emptydirs": ""
156 "emptydirs": ""
157 }
157 }
158 ],
158 ],
159 "files": [
159 "files": [
160 {
160 {
161 "abspath": ".hgtags",
161 "abspath": ".hgtags",
162 "basename": ".hgtags",
162 "basename": ".hgtags",
163 "date": [
163 "date": [
164 0.0,
164 0.0,
165 0
165 0
166 ],
166 ],
167 "flags": "",
167 "flags": "",
168 "size": 92
168 "size": 92
169 },
169 },
170 {
170 {
171 "abspath": "foo-new",
171 "abspath": "foo-new",
172 "basename": "foo-new",
172 "basename": "foo-new",
173 "date": [
173 "date": [
174 0.0,
174 0.0,
175 0
175 0
176 ],
176 ],
177 "flags": "",
177 "flags": "",
178 "size": 4
178 "size": 4
179 }
179 }
180 ],
180 ],
181 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
181 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
182 "tags": [
182 "tags": [
183 "tip"
183 "tip"
184 ]
184 ]
185 }
185 }
186
186
187 changelog/ shows information about several changesets
187 changelog/ shows information about several changesets
188
188
189 $ request json-changelog
189 $ request json-changelog
190 200 Script output follows
190 200 Script output follows
191
191
192 {
192 {
193 "changeset_count": 10,
193 "changeset_count": 10,
194 "changesets": [
194 "changesets": [
195 {
195 {
196 "bookmarks": [],
196 "bookmarks": [],
197 "branch": "default",
197 "branch": "default",
198 "date": [
198 "date": [
199 0.0,
199 0.0,
200 0
200 0
201 ],
201 ],
202 "desc": "merge test-branch into default",
202 "desc": "merge test-branch into default",
203 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
203 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
204 "parents": [
204 "parents": [
205 "ceed296fe500c3fac9541e31dad860cb49c89e45",
205 "ceed296fe500c3fac9541e31dad860cb49c89e45",
206 "ed66c30e87eb65337c05a4229efaa5f1d5285a90"
206 "ed66c30e87eb65337c05a4229efaa5f1d5285a90"
207 ],
207 ],
208 "phase": "draft",
208 "phase": "draft",
209 "tags": [
209 "tags": [
210 "tip"
210 "tip"
211 ],
211 ],
212 "user": "test"
212 "user": "test"
213 },
213 },
214 {
214 {
215 "bookmarks": [],
215 "bookmarks": [],
216 "branch": "test-branch",
216 "branch": "test-branch",
217 "date": [
217 "date": [
218 0.0,
218 0.0,
219 0
219 0
220 ],
220 ],
221 "desc": "another commit in test-branch",
221 "desc": "another commit in test-branch",
222 "node": "ed66c30e87eb65337c05a4229efaa5f1d5285a90",
222 "node": "ed66c30e87eb65337c05a4229efaa5f1d5285a90",
223 "parents": [
223 "parents": [
224 "6ab967a8ab3489227a83f80e920faa039a71819f"
224 "6ab967a8ab3489227a83f80e920faa039a71819f"
225 ],
225 ],
226 "phase": "draft",
226 "phase": "draft",
227 "tags": [],
227 "tags": [],
228 "user": "test"
228 "user": "test"
229 },
229 },
230 {
230 {
231 "bookmarks": [],
231 "bookmarks": [],
232 "branch": "test-branch",
232 "branch": "test-branch",
233 "date": [
233 "date": [
234 0.0,
234 0.0,
235 0
235 0
236 ],
236 ],
237 "desc": "create test branch",
237 "desc": "create test branch",
238 "node": "6ab967a8ab3489227a83f80e920faa039a71819f",
238 "node": "6ab967a8ab3489227a83f80e920faa039a71819f",
239 "parents": [
239 "parents": [
240 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
240 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
241 ],
241 ],
242 "phase": "draft",
242 "phase": "draft",
243 "tags": [],
243 "tags": [],
244 "user": "test"
244 "user": "test"
245 },
245 },
246 {
246 {
247 "bookmarks": [
247 "bookmarks": [
248 "bookmark2"
248 "bookmark2"
249 ],
249 ],
250 "branch": "default",
250 "branch": "default",
251 "date": [
251 "date": [
252 0.0,
252 0.0,
253 0
253 0
254 ],
254 ],
255 "desc": "create tag2",
255 "desc": "create tag2",
256 "node": "ceed296fe500c3fac9541e31dad860cb49c89e45",
256 "node": "ceed296fe500c3fac9541e31dad860cb49c89e45",
257 "parents": [
257 "parents": [
258 "f2890a05fea49bfaf9fb27ed5490894eba32da78"
258 "f2890a05fea49bfaf9fb27ed5490894eba32da78"
259 ],
259 ],
260 "phase": "draft",
260 "phase": "draft",
261 "tags": [],
261 "tags": [],
262 "user": "test"
262 "user": "test"
263 },
263 },
264 {
264 {
265 "bookmarks": [],
265 "bookmarks": [],
266 "branch": "default",
266 "branch": "default",
267 "date": [
267 "date": [
268 0.0,
268 0.0,
269 0
269 0
270 ],
270 ],
271 "desc": "another commit to da/foo",
271 "desc": "another commit to da/foo",
272 "node": "f2890a05fea49bfaf9fb27ed5490894eba32da78",
272 "node": "f2890a05fea49bfaf9fb27ed5490894eba32da78",
273 "parents": [
273 "parents": [
274 "93a8ce14f89156426b7fa981af8042da53f03aa0"
274 "93a8ce14f89156426b7fa981af8042da53f03aa0"
275 ],
275 ],
276 "phase": "draft",
276 "phase": "draft",
277 "tags": [
277 "tags": [
278 "tag2"
278 "tag2"
279 ],
279 ],
280 "user": "test"
280 "user": "test"
281 },
281 },
282 {
282 {
283 "bookmarks": [],
283 "bookmarks": [],
284 "branch": "default",
284 "branch": "default",
285 "date": [
285 "date": [
286 0.0,
286 0.0,
287 0
287 0
288 ],
288 ],
289 "desc": "create tag",
289 "desc": "create tag",
290 "node": "93a8ce14f89156426b7fa981af8042da53f03aa0",
290 "node": "93a8ce14f89156426b7fa981af8042da53f03aa0",
291 "parents": [
291 "parents": [
292 "78896eb0e102174ce9278438a95e12543e4367a7"
292 "78896eb0e102174ce9278438a95e12543e4367a7"
293 ],
293 ],
294 "phase": "public",
294 "phase": "public",
295 "tags": [],
295 "tags": [],
296 "user": "test"
296 "user": "test"
297 },
297 },
298 {
298 {
299 "bookmarks": [],
299 "bookmarks": [],
300 "branch": "default",
300 "branch": "default",
301 "date": [
301 "date": [
302 0.0,
302 0.0,
303 0
303 0
304 ],
304 ],
305 "desc": "move foo",
305 "desc": "move foo",
306 "node": "78896eb0e102174ce9278438a95e12543e4367a7",
306 "node": "78896eb0e102174ce9278438a95e12543e4367a7",
307 "parents": [
307 "parents": [
308 "8d7c456572acf3557e8ed8a07286b10c408bcec5"
308 "8d7c456572acf3557e8ed8a07286b10c408bcec5"
309 ],
309 ],
310 "phase": "public",
310 "phase": "public",
311 "tags": [
311 "tags": [
312 "tag1"
312 "tag1"
313 ],
313 ],
314 "user": "test"
314 "user": "test"
315 },
315 },
316 {
316 {
317 "bookmarks": [
317 "bookmarks": [
318 "bookmark1"
318 "bookmark1"
319 ],
319 ],
320 "branch": "default",
320 "branch": "default",
321 "date": [
321 "date": [
322 0.0,
322 0.0,
323 0
323 0
324 ],
324 ],
325 "desc": "modify da/foo",
325 "desc": "modify da/foo",
326 "node": "8d7c456572acf3557e8ed8a07286b10c408bcec5",
326 "node": "8d7c456572acf3557e8ed8a07286b10c408bcec5",
327 "parents": [
327 "parents": [
328 "f8bbb9024b10f93cdbb8d940337398291d40dea8"
328 "f8bbb9024b10f93cdbb8d940337398291d40dea8"
329 ],
329 ],
330 "phase": "public",
330 "phase": "public",
331 "tags": [],
331 "tags": [],
332 "user": "test"
332 "user": "test"
333 },
333 },
334 {
334 {
335 "bookmarks": [],
335 "bookmarks": [],
336 "branch": "default",
336 "branch": "default",
337 "date": [
337 "date": [
338 0.0,
338 0.0,
339 0
339 0
340 ],
340 ],
341 "desc": "modify foo",
341 "desc": "modify foo",
342 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
342 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
343 "parents": [
343 "parents": [
344 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
344 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
345 ],
345 ],
346 "phase": "public",
346 "phase": "public",
347 "tags": [],
347 "tags": [],
348 "user": "test"
348 "user": "test"
349 },
349 },
350 {
350 {
351 "bookmarks": [],
351 "bookmarks": [],
352 "branch": "default",
352 "branch": "default",
353 "date": [
353 "date": [
354 0.0,
354 0.0,
355 0
355 0
356 ],
356 ],
357 "desc": "initial",
357 "desc": "initial",
358 "node": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
358 "node": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
359 "parents": [],
359 "parents": [],
360 "phase": "public",
360 "phase": "public",
361 "tags": [],
361 "tags": [],
362 "user": "test"
362 "user": "test"
363 }
363 }
364 ],
364 ],
365 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7"
365 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7"
366 }
366 }
367
367
368 changelog/{revision} shows information starting at a specific changeset
368 changelog/{revision} shows information starting at a specific changeset
369
369
370 $ request json-changelog/f8bbb9024b10
370 $ request json-changelog/f8bbb9024b10
371 200 Script output follows
371 200 Script output follows
372
372
373 {
373 {
374 "changeset_count": 10,
374 "changeset_count": 10,
375 "changesets": [
375 "changesets": [
376 {
376 {
377 "bookmarks": [],
377 "bookmarks": [],
378 "branch": "default",
378 "branch": "default",
379 "date": [
379 "date": [
380 0.0,
380 0.0,
381 0
381 0
382 ],
382 ],
383 "desc": "modify foo",
383 "desc": "modify foo",
384 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
384 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
385 "parents": [
385 "parents": [
386 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
386 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
387 ],
387 ],
388 "phase": "public",
388 "phase": "public",
389 "tags": [],
389 "tags": [],
390 "user": "test"
390 "user": "test"
391 },
391 },
392 {
392 {
393 "bookmarks": [],
393 "bookmarks": [],
394 "branch": "default",
394 "branch": "default",
395 "date": [
395 "date": [
396 0.0,
396 0.0,
397 0
397 0
398 ],
398 ],
399 "desc": "initial",
399 "desc": "initial",
400 "node": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
400 "node": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
401 "parents": [],
401 "parents": [],
402 "phase": "public",
402 "phase": "public",
403 "tags": [],
403 "tags": [],
404 "user": "test"
404 "user": "test"
405 }
405 }
406 ],
406 ],
407 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8"
407 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8"
408 }
408 }
409
409
410 shortlog/ shows information about a set of changesets
410 shortlog/ shows information about a set of changesets
411
411
412 $ request json-shortlog
412 $ request json-shortlog
413 200 Script output follows
413 200 Script output follows
414
414
415 {
415 {
416 "changeset_count": 10,
416 "changeset_count": 10,
417 "changesets": [
417 "changesets": [
418 {
418 {
419 "bookmarks": [],
419 "bookmarks": [],
420 "branch": "default",
420 "branch": "default",
421 "date": [
421 "date": [
422 0.0,
422 0.0,
423 0
423 0
424 ],
424 ],
425 "desc": "merge test-branch into default",
425 "desc": "merge test-branch into default",
426 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
426 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
427 "parents": [
427 "parents": [
428 "ceed296fe500c3fac9541e31dad860cb49c89e45",
428 "ceed296fe500c3fac9541e31dad860cb49c89e45",
429 "ed66c30e87eb65337c05a4229efaa5f1d5285a90"
429 "ed66c30e87eb65337c05a4229efaa5f1d5285a90"
430 ],
430 ],
431 "phase": "draft",
431 "phase": "draft",
432 "tags": [
432 "tags": [
433 "tip"
433 "tip"
434 ],
434 ],
435 "user": "test"
435 "user": "test"
436 },
436 },
437 {
437 {
438 "bookmarks": [],
438 "bookmarks": [],
439 "branch": "test-branch",
439 "branch": "test-branch",
440 "date": [
440 "date": [
441 0.0,
441 0.0,
442 0
442 0
443 ],
443 ],
444 "desc": "another commit in test-branch",
444 "desc": "another commit in test-branch",
445 "node": "ed66c30e87eb65337c05a4229efaa5f1d5285a90",
445 "node": "ed66c30e87eb65337c05a4229efaa5f1d5285a90",
446 "parents": [
446 "parents": [
447 "6ab967a8ab3489227a83f80e920faa039a71819f"
447 "6ab967a8ab3489227a83f80e920faa039a71819f"
448 ],
448 ],
449 "phase": "draft",
449 "phase": "draft",
450 "tags": [],
450 "tags": [],
451 "user": "test"
451 "user": "test"
452 },
452 },
453 {
453 {
454 "bookmarks": [],
454 "bookmarks": [],
455 "branch": "test-branch",
455 "branch": "test-branch",
456 "date": [
456 "date": [
457 0.0,
457 0.0,
458 0
458 0
459 ],
459 ],
460 "desc": "create test branch",
460 "desc": "create test branch",
461 "node": "6ab967a8ab3489227a83f80e920faa039a71819f",
461 "node": "6ab967a8ab3489227a83f80e920faa039a71819f",
462 "parents": [
462 "parents": [
463 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
463 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
464 ],
464 ],
465 "phase": "draft",
465 "phase": "draft",
466 "tags": [],
466 "tags": [],
467 "user": "test"
467 "user": "test"
468 },
468 },
469 {
469 {
470 "bookmarks": [
470 "bookmarks": [
471 "bookmark2"
471 "bookmark2"
472 ],
472 ],
473 "branch": "default",
473 "branch": "default",
474 "date": [
474 "date": [
475 0.0,
475 0.0,
476 0
476 0
477 ],
477 ],
478 "desc": "create tag2",
478 "desc": "create tag2",
479 "node": "ceed296fe500c3fac9541e31dad860cb49c89e45",
479 "node": "ceed296fe500c3fac9541e31dad860cb49c89e45",
480 "parents": [
480 "parents": [
481 "f2890a05fea49bfaf9fb27ed5490894eba32da78"
481 "f2890a05fea49bfaf9fb27ed5490894eba32da78"
482 ],
482 ],
483 "phase": "draft",
483 "phase": "draft",
484 "tags": [],
484 "tags": [],
485 "user": "test"
485 "user": "test"
486 },
486 },
487 {
487 {
488 "bookmarks": [],
488 "bookmarks": [],
489 "branch": "default",
489 "branch": "default",
490 "date": [
490 "date": [
491 0.0,
491 0.0,
492 0
492 0
493 ],
493 ],
494 "desc": "another commit to da/foo",
494 "desc": "another commit to da/foo",
495 "node": "f2890a05fea49bfaf9fb27ed5490894eba32da78",
495 "node": "f2890a05fea49bfaf9fb27ed5490894eba32da78",
496 "parents": [
496 "parents": [
497 "93a8ce14f89156426b7fa981af8042da53f03aa0"
497 "93a8ce14f89156426b7fa981af8042da53f03aa0"
498 ],
498 ],
499 "phase": "draft",
499 "phase": "draft",
500 "tags": [
500 "tags": [
501 "tag2"
501 "tag2"
502 ],
502 ],
503 "user": "test"
503 "user": "test"
504 },
504 },
505 {
505 {
506 "bookmarks": [],
506 "bookmarks": [],
507 "branch": "default",
507 "branch": "default",
508 "date": [
508 "date": [
509 0.0,
509 0.0,
510 0
510 0
511 ],
511 ],
512 "desc": "create tag",
512 "desc": "create tag",
513 "node": "93a8ce14f89156426b7fa981af8042da53f03aa0",
513 "node": "93a8ce14f89156426b7fa981af8042da53f03aa0",
514 "parents": [
514 "parents": [
515 "78896eb0e102174ce9278438a95e12543e4367a7"
515 "78896eb0e102174ce9278438a95e12543e4367a7"
516 ],
516 ],
517 "phase": "public",
517 "phase": "public",
518 "tags": [],
518 "tags": [],
519 "user": "test"
519 "user": "test"
520 },
520 },
521 {
521 {
522 "bookmarks": [],
522 "bookmarks": [],
523 "branch": "default",
523 "branch": "default",
524 "date": [
524 "date": [
525 0.0,
525 0.0,
526 0
526 0
527 ],
527 ],
528 "desc": "move foo",
528 "desc": "move foo",
529 "node": "78896eb0e102174ce9278438a95e12543e4367a7",
529 "node": "78896eb0e102174ce9278438a95e12543e4367a7",
530 "parents": [
530 "parents": [
531 "8d7c456572acf3557e8ed8a07286b10c408bcec5"
531 "8d7c456572acf3557e8ed8a07286b10c408bcec5"
532 ],
532 ],
533 "phase": "public",
533 "phase": "public",
534 "tags": [
534 "tags": [
535 "tag1"
535 "tag1"
536 ],
536 ],
537 "user": "test"
537 "user": "test"
538 },
538 },
539 {
539 {
540 "bookmarks": [
540 "bookmarks": [
541 "bookmark1"
541 "bookmark1"
542 ],
542 ],
543 "branch": "default",
543 "branch": "default",
544 "date": [
544 "date": [
545 0.0,
545 0.0,
546 0
546 0
547 ],
547 ],
548 "desc": "modify da/foo",
548 "desc": "modify da/foo",
549 "node": "8d7c456572acf3557e8ed8a07286b10c408bcec5",
549 "node": "8d7c456572acf3557e8ed8a07286b10c408bcec5",
550 "parents": [
550 "parents": [
551 "f8bbb9024b10f93cdbb8d940337398291d40dea8"
551 "f8bbb9024b10f93cdbb8d940337398291d40dea8"
552 ],
552 ],
553 "phase": "public",
553 "phase": "public",
554 "tags": [],
554 "tags": [],
555 "user": "test"
555 "user": "test"
556 },
556 },
557 {
557 {
558 "bookmarks": [],
558 "bookmarks": [],
559 "branch": "default",
559 "branch": "default",
560 "date": [
560 "date": [
561 0.0,
561 0.0,
562 0
562 0
563 ],
563 ],
564 "desc": "modify foo",
564 "desc": "modify foo",
565 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
565 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
566 "parents": [
566 "parents": [
567 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
567 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
568 ],
568 ],
569 "phase": "public",
569 "phase": "public",
570 "tags": [],
570 "tags": [],
571 "user": "test"
571 "user": "test"
572 },
572 },
573 {
573 {
574 "bookmarks": [],
574 "bookmarks": [],
575 "branch": "default",
575 "branch": "default",
576 "date": [
576 "date": [
577 0.0,
577 0.0,
578 0
578 0
579 ],
579 ],
580 "desc": "initial",
580 "desc": "initial",
581 "node": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
581 "node": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
582 "parents": [],
582 "parents": [],
583 "phase": "public",
583 "phase": "public",
584 "tags": [],
584 "tags": [],
585 "user": "test"
585 "user": "test"
586 }
586 }
587 ],
587 ],
588 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7"
588 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7"
589 }
589 }
590
590
591 shortlog is displayed by default (issue5978)
591 shortlog is displayed by default (issue5978)
592
592
593 $ request '?style=json'
593 $ request '?style=json'
594 200 Script output follows
594 200 Script output follows
595
595
596 {
596 {
597 "changeset_count": 10,
597 "changeset_count": 10,
598 "changesets": [
598 "changesets": [
599 {
599 {
600 "bookmarks": [],
600 "bookmarks": [],
601 "branch": "default",
601 "branch": "default",
602 "date": [
602 "date": [
603 0.0,
603 0.0,
604 0
604 0
605 ],
605 ],
606 "desc": "merge test-branch into default",
606 "desc": "merge test-branch into default",
607 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
607 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
608 "parents": [
608 "parents": [
609 "ceed296fe500c3fac9541e31dad860cb49c89e45",
609 "ceed296fe500c3fac9541e31dad860cb49c89e45",
610 "ed66c30e87eb65337c05a4229efaa5f1d5285a90"
610 "ed66c30e87eb65337c05a4229efaa5f1d5285a90"
611 ],
611 ],
612 "phase": "draft",
612 "phase": "draft",
613 "tags": [
613 "tags": [
614 "tip"
614 "tip"
615 ],
615 ],
616 "user": "test"
616 "user": "test"
617 },
617 },
618 {
618 {
619 "bookmarks": [],
619 "bookmarks": [],
620 "branch": "test-branch",
620 "branch": "test-branch",
621 "date": [
621 "date": [
622 0.0,
622 0.0,
623 0
623 0
624 ],
624 ],
625 "desc": "another commit in test-branch",
625 "desc": "another commit in test-branch",
626 "node": "ed66c30e87eb65337c05a4229efaa5f1d5285a90",
626 "node": "ed66c30e87eb65337c05a4229efaa5f1d5285a90",
627 "parents": [
627 "parents": [
628 "6ab967a8ab3489227a83f80e920faa039a71819f"
628 "6ab967a8ab3489227a83f80e920faa039a71819f"
629 ],
629 ],
630 "phase": "draft",
630 "phase": "draft",
631 "tags": [],
631 "tags": [],
632 "user": "test"
632 "user": "test"
633 },
633 },
634 {
634 {
635 "bookmarks": [],
635 "bookmarks": [],
636 "branch": "test-branch",
636 "branch": "test-branch",
637 "date": [
637 "date": [
638 0.0,
638 0.0,
639 0
639 0
640 ],
640 ],
641 "desc": "create test branch",
641 "desc": "create test branch",
642 "node": "6ab967a8ab3489227a83f80e920faa039a71819f",
642 "node": "6ab967a8ab3489227a83f80e920faa039a71819f",
643 "parents": [
643 "parents": [
644 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
644 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
645 ],
645 ],
646 "phase": "draft",
646 "phase": "draft",
647 "tags": [],
647 "tags": [],
648 "user": "test"
648 "user": "test"
649 },
649 },
650 {
650 {
651 "bookmarks": [
651 "bookmarks": [
652 "bookmark2"
652 "bookmark2"
653 ],
653 ],
654 "branch": "default",
654 "branch": "default",
655 "date": [
655 "date": [
656 0.0,
656 0.0,
657 0
657 0
658 ],
658 ],
659 "desc": "create tag2",
659 "desc": "create tag2",
660 "node": "ceed296fe500c3fac9541e31dad860cb49c89e45",
660 "node": "ceed296fe500c3fac9541e31dad860cb49c89e45",
661 "parents": [
661 "parents": [
662 "f2890a05fea49bfaf9fb27ed5490894eba32da78"
662 "f2890a05fea49bfaf9fb27ed5490894eba32da78"
663 ],
663 ],
664 "phase": "draft",
664 "phase": "draft",
665 "tags": [],
665 "tags": [],
666 "user": "test"
666 "user": "test"
667 },
667 },
668 {
668 {
669 "bookmarks": [],
669 "bookmarks": [],
670 "branch": "default",
670 "branch": "default",
671 "date": [
671 "date": [
672 0.0,
672 0.0,
673 0
673 0
674 ],
674 ],
675 "desc": "another commit to da/foo",
675 "desc": "another commit to da/foo",
676 "node": "f2890a05fea49bfaf9fb27ed5490894eba32da78",
676 "node": "f2890a05fea49bfaf9fb27ed5490894eba32da78",
677 "parents": [
677 "parents": [
678 "93a8ce14f89156426b7fa981af8042da53f03aa0"
678 "93a8ce14f89156426b7fa981af8042da53f03aa0"
679 ],
679 ],
680 "phase": "draft",
680 "phase": "draft",
681 "tags": [
681 "tags": [
682 "tag2"
682 "tag2"
683 ],
683 ],
684 "user": "test"
684 "user": "test"
685 },
685 },
686 {
686 {
687 "bookmarks": [],
687 "bookmarks": [],
688 "branch": "default",
688 "branch": "default",
689 "date": [
689 "date": [
690 0.0,
690 0.0,
691 0
691 0
692 ],
692 ],
693 "desc": "create tag",
693 "desc": "create tag",
694 "node": "93a8ce14f89156426b7fa981af8042da53f03aa0",
694 "node": "93a8ce14f89156426b7fa981af8042da53f03aa0",
695 "parents": [
695 "parents": [
696 "78896eb0e102174ce9278438a95e12543e4367a7"
696 "78896eb0e102174ce9278438a95e12543e4367a7"
697 ],
697 ],
698 "phase": "public",
698 "phase": "public",
699 "tags": [],
699 "tags": [],
700 "user": "test"
700 "user": "test"
701 },
701 },
702 {
702 {
703 "bookmarks": [],
703 "bookmarks": [],
704 "branch": "default",
704 "branch": "default",
705 "date": [
705 "date": [
706 0.0,
706 0.0,
707 0
707 0
708 ],
708 ],
709 "desc": "move foo",
709 "desc": "move foo",
710 "node": "78896eb0e102174ce9278438a95e12543e4367a7",
710 "node": "78896eb0e102174ce9278438a95e12543e4367a7",
711 "parents": [
711 "parents": [
712 "8d7c456572acf3557e8ed8a07286b10c408bcec5"
712 "8d7c456572acf3557e8ed8a07286b10c408bcec5"
713 ],
713 ],
714 "phase": "public",
714 "phase": "public",
715 "tags": [
715 "tags": [
716 "tag1"
716 "tag1"
717 ],
717 ],
718 "user": "test"
718 "user": "test"
719 },
719 },
720 {
720 {
721 "bookmarks": [
721 "bookmarks": [
722 "bookmark1"
722 "bookmark1"
723 ],
723 ],
724 "branch": "default",
724 "branch": "default",
725 "date": [
725 "date": [
726 0.0,
726 0.0,
727 0
727 0
728 ],
728 ],
729 "desc": "modify da/foo",
729 "desc": "modify da/foo",
730 "node": "8d7c456572acf3557e8ed8a07286b10c408bcec5",
730 "node": "8d7c456572acf3557e8ed8a07286b10c408bcec5",
731 "parents": [
731 "parents": [
732 "f8bbb9024b10f93cdbb8d940337398291d40dea8"
732 "f8bbb9024b10f93cdbb8d940337398291d40dea8"
733 ],
733 ],
734 "phase": "public",
734 "phase": "public",
735 "tags": [],
735 "tags": [],
736 "user": "test"
736 "user": "test"
737 },
737 },
738 {
738 {
739 "bookmarks": [],
739 "bookmarks": [],
740 "branch": "default",
740 "branch": "default",
741 "date": [
741 "date": [
742 0.0,
742 0.0,
743 0
743 0
744 ],
744 ],
745 "desc": "modify foo",
745 "desc": "modify foo",
746 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
746 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
747 "parents": [
747 "parents": [
748 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
748 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
749 ],
749 ],
750 "phase": "public",
750 "phase": "public",
751 "tags": [],
751 "tags": [],
752 "user": "test"
752 "user": "test"
753 },
753 },
754 {
754 {
755 "bookmarks": [],
755 "bookmarks": [],
756 "branch": "default",
756 "branch": "default",
757 "date": [
757 "date": [
758 0.0,
758 0.0,
759 0
759 0
760 ],
760 ],
761 "desc": "initial",
761 "desc": "initial",
762 "node": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
762 "node": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
763 "parents": [],
763 "parents": [],
764 "phase": "public",
764 "phase": "public",
765 "tags": [],
765 "tags": [],
766 "user": "test"
766 "user": "test"
767 }
767 }
768 ],
768 ],
769 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7"
769 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7"
770 }
770 }
771
771
772 changeset/ renders the tip changeset
772 changeset/ renders the tip changeset
773
773
774 $ request json-rev
774 $ request json-rev
775 200 Script output follows
775 200 Script output follows
776
776
777 {
777 {
778 "bookmarks": [],
778 "bookmarks": [],
779 "branch": "default",
779 "branch": "default",
780 "children": [],
780 "date": [
781 "date": [
781 0.0,
782 0.0,
782 0
783 0
783 ],
784 ],
784 "desc": "merge test-branch into default",
785 "desc": "merge test-branch into default",
785 "diff": [],
786 "diff": [],
786 "files": [
787 "files": [
787 {
788 {
788 "file": "foo-new",
789 "file": "foo-new",
789 "status": "modified"
790 "status": "modified"
790 }
791 }
791 ],
792 ],
792 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
793 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
793 "parents": [
794 "parents": [
794 "ceed296fe500c3fac9541e31dad860cb49c89e45",
795 "ceed296fe500c3fac9541e31dad860cb49c89e45",
795 "ed66c30e87eb65337c05a4229efaa5f1d5285a90"
796 "ed66c30e87eb65337c05a4229efaa5f1d5285a90"
796 ],
797 ],
797 "phase": "draft",
798 "phase": "draft",
798 "tags": [
799 "tags": [
799 "tip"
800 "tip"
800 ],
801 ],
801 "user": "test"
802 "user": "test"
802 }
803 }
803
804
804 changeset/{revision} shows tags
805 changeset/{revision} shows tags
805
806
806 $ request json-rev/78896eb0e102
807 $ request json-rev/78896eb0e102
807 200 Script output follows
808 200 Script output follows
808
809
809 {
810 {
810 "bookmarks": [],
811 "bookmarks": [],
811 "branch": "default",
812 "branch": "default",
813 "children": [
814 "93a8ce14f89156426b7fa981af8042da53f03aa0"
815 ],
812 "date": [
816 "date": [
813 0.0,
817 0.0,
814 0
818 0
815 ],
819 ],
816 "desc": "move foo",
820 "desc": "move foo",
817 "diff": [
821 "diff": [
818 {
822 {
819 "blockno": 1,
823 "blockno": 1,
820 "lines": [
824 "lines": [
821 {
825 {
822 "l": "--- a/foo\tThu Jan 01 00:00:00 1970 +0000\n",
826 "l": "--- a/foo\tThu Jan 01 00:00:00 1970 +0000\n",
823 "n": 1,
827 "n": 1,
824 "t": "-"
828 "t": "-"
825 },
829 },
826 {
830 {
827 "l": "+++ /dev/null\tThu Jan 01 00:00:00 1970 +0000\n",
831 "l": "+++ /dev/null\tThu Jan 01 00:00:00 1970 +0000\n",
828 "n": 2,
832 "n": 2,
829 "t": "+"
833 "t": "+"
830 },
834 },
831 {
835 {
832 "l": "@@ -1,1 +0,0 @@\n",
836 "l": "@@ -1,1 +0,0 @@\n",
833 "n": 3,
837 "n": 3,
834 "t": "@"
838 "t": "@"
835 },
839 },
836 {
840 {
837 "l": "-bar\n",
841 "l": "-bar\n",
838 "n": 4,
842 "n": 4,
839 "t": "-"
843 "t": "-"
840 }
844 }
841 ]
845 ]
842 },
846 },
843 {
847 {
844 "blockno": 2,
848 "blockno": 2,
845 "lines": [
849 "lines": [
846 {
850 {
847 "l": "--- /dev/null\tThu Jan 01 00:00:00 1970 +0000\n",
851 "l": "--- /dev/null\tThu Jan 01 00:00:00 1970 +0000\n",
848 "n": 1,
852 "n": 1,
849 "t": "-"
853 "t": "-"
850 },
854 },
851 {
855 {
852 "l": "+++ b/foo-new\tThu Jan 01 00:00:00 1970 +0000\n",
856 "l": "+++ b/foo-new\tThu Jan 01 00:00:00 1970 +0000\n",
853 "n": 2,
857 "n": 2,
854 "t": "+"
858 "t": "+"
855 },
859 },
856 {
860 {
857 "l": "@@ -0,0 +1,1 @@\n",
861 "l": "@@ -0,0 +1,1 @@\n",
858 "n": 3,
862 "n": 3,
859 "t": "@"
863 "t": "@"
860 },
864 },
861 {
865 {
862 "l": "+bar\n",
866 "l": "+bar\n",
863 "n": 4,
867 "n": 4,
864 "t": "+"
868 "t": "+"
865 }
869 }
866 ]
870 ]
867 }
871 }
868 ],
872 ],
869 "files": [
873 "files": [
870 {
874 {
871 "file": "foo",
875 "file": "foo",
872 "status": "removed"
876 "status": "removed"
873 },
877 },
874 {
878 {
875 "file": "foo-new",
879 "file": "foo-new",
876 "status": "added"
880 "status": "added"
877 }
881 }
878 ],
882 ],
879 "node": "78896eb0e102174ce9278438a95e12543e4367a7",
883 "node": "78896eb0e102174ce9278438a95e12543e4367a7",
880 "parents": [
884 "parents": [
881 "8d7c456572acf3557e8ed8a07286b10c408bcec5"
885 "8d7c456572acf3557e8ed8a07286b10c408bcec5"
882 ],
886 ],
883 "phase": "public",
887 "phase": "public",
884 "tags": [
888 "tags": [
885 "tag1"
889 "tag1"
886 ],
890 ],
887 "user": "test"
891 "user": "test"
888 }
892 }
889
893
890 changeset/{revision} shows bookmarks
894 changeset/{revision} shows bookmarks
891
895
892 $ request json-rev/8d7c456572ac
896 $ request json-rev/8d7c456572ac
893 200 Script output follows
897 200 Script output follows
894
898
895 {
899 {
896 "bookmarks": [
900 "bookmarks": [
897 "bookmark1"
901 "bookmark1"
898 ],
902 ],
899 "branch": "default",
903 "branch": "default",
904 "children": [
905 "78896eb0e102174ce9278438a95e12543e4367a7"
906 ],
900 "date": [
907 "date": [
901 0.0,
908 0.0,
902 0
909 0
903 ],
910 ],
904 "desc": "modify da/foo",
911 "desc": "modify da/foo",
905 "diff": [
912 "diff": [
906 {
913 {
907 "blockno": 1,
914 "blockno": 1,
908 "lines": [
915 "lines": [
909 {
916 {
910 "l": "--- a/da/foo\tThu Jan 01 00:00:00 1970 +0000\n",
917 "l": "--- a/da/foo\tThu Jan 01 00:00:00 1970 +0000\n",
911 "n": 1,
918 "n": 1,
912 "t": "-"
919 "t": "-"
913 },
920 },
914 {
921 {
915 "l": "+++ b/da/foo\tThu Jan 01 00:00:00 1970 +0000\n",
922 "l": "+++ b/da/foo\tThu Jan 01 00:00:00 1970 +0000\n",
916 "n": 2,
923 "n": 2,
917 "t": "+"
924 "t": "+"
918 },
925 },
919 {
926 {
920 "l": "@@ -1,1 +1,1 @@\n",
927 "l": "@@ -1,1 +1,1 @@\n",
921 "n": 3,
928 "n": 3,
922 "t": "@"
929 "t": "@"
923 },
930 },
924 {
931 {
925 "l": "-foo\n",
932 "l": "-foo\n",
926 "n": 4,
933 "n": 4,
927 "t": "-"
934 "t": "-"
928 },
935 },
929 {
936 {
930 "l": "+bar\n",
937 "l": "+bar\n",
931 "n": 5,
938 "n": 5,
932 "t": "+"
939 "t": "+"
933 }
940 }
934 ]
941 ]
935 }
942 }
936 ],
943 ],
937 "files": [
944 "files": [
938 {
945 {
939 "file": "da/foo",
946 "file": "da/foo",
940 "status": "modified"
947 "status": "modified"
941 }
948 }
942 ],
949 ],
943 "node": "8d7c456572acf3557e8ed8a07286b10c408bcec5",
950 "node": "8d7c456572acf3557e8ed8a07286b10c408bcec5",
944 "parents": [
951 "parents": [
945 "f8bbb9024b10f93cdbb8d940337398291d40dea8"
952 "f8bbb9024b10f93cdbb8d940337398291d40dea8"
946 ],
953 ],
947 "phase": "public",
954 "phase": "public",
948 "tags": [],
955 "tags": [],
949 "user": "test"
956 "user": "test"
950 }
957 }
951
958
952 changeset/{revision} shows branches
959 changeset/{revision} shows branches
953
960
954 $ request json-rev/6ab967a8ab34
961 $ request json-rev/6ab967a8ab34
955 200 Script output follows
962 200 Script output follows
956
963
957 {
964 {
958 "bookmarks": [],
965 "bookmarks": [],
959 "branch": "test-branch",
966 "branch": "test-branch",
967 "children": [
968 "ed66c30e87eb65337c05a4229efaa5f1d5285a90"
969 ],
960 "date": [
970 "date": [
961 0.0,
971 0.0,
962 0
972 0
963 ],
973 ],
964 "desc": "create test branch",
974 "desc": "create test branch",
965 "diff": [
975 "diff": [
966 {
976 {
967 "blockno": 1,
977 "blockno": 1,
968 "lines": [
978 "lines": [
969 {
979 {
970 "l": "--- a/foo\tThu Jan 01 00:00:00 1970 +0000\n",
980 "l": "--- a/foo\tThu Jan 01 00:00:00 1970 +0000\n",
971 "n": 1,
981 "n": 1,
972 "t": "-"
982 "t": "-"
973 },
983 },
974 {
984 {
975 "l": "+++ b/foo\tThu Jan 01 00:00:00 1970 +0000\n",
985 "l": "+++ b/foo\tThu Jan 01 00:00:00 1970 +0000\n",
976 "n": 2,
986 "n": 2,
977 "t": "+"
987 "t": "+"
978 },
988 },
979 {
989 {
980 "l": "@@ -1,1 +1,1 @@\n",
990 "l": "@@ -1,1 +1,1 @@\n",
981 "n": 3,
991 "n": 3,
982 "t": "@"
992 "t": "@"
983 },
993 },
984 {
994 {
985 "l": "-foo\n",
995 "l": "-foo\n",
986 "n": 4,
996 "n": 4,
987 "t": "-"
997 "t": "-"
988 },
998 },
989 {
999 {
990 "l": "+branch\n",
1000 "l": "+branch\n",
991 "n": 5,
1001 "n": 5,
992 "t": "+"
1002 "t": "+"
993 }
1003 }
994 ]
1004 ]
995 }
1005 }
996 ],
1006 ],
997 "files": [
1007 "files": [
998 {
1008 {
999 "file": "foo",
1009 "file": "foo",
1000 "status": "modified"
1010 "status": "modified"
1001 }
1011 }
1002 ],
1012 ],
1003 "node": "6ab967a8ab3489227a83f80e920faa039a71819f",
1013 "node": "6ab967a8ab3489227a83f80e920faa039a71819f",
1004 "parents": [
1014 "parents": [
1005 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
1015 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
1006 ],
1016 ],
1007 "phase": "draft",
1017 "phase": "draft",
1008 "tags": [],
1018 "tags": [],
1009 "user": "test"
1019 "user": "test"
1010 }
1020 }
1011
1021
1012 manifest/{revision}/{path} shows info about a directory at a revision
1022 manifest/{revision}/{path} shows info about a directory at a revision
1013
1023
1014 $ request json-manifest/06e557f3edf6/
1024 $ request json-manifest/06e557f3edf6/
1015 200 Script output follows
1025 200 Script output follows
1016
1026
1017 {
1027 {
1018 "abspath": "/",
1028 "abspath": "/",
1019 "bookmarks": [],
1029 "bookmarks": [],
1020 "directories": [
1030 "directories": [
1021 {
1031 {
1022 "abspath": "/da",
1032 "abspath": "/da",
1023 "basename": "da",
1033 "basename": "da",
1024 "emptydirs": ""
1034 "emptydirs": ""
1025 }
1035 }
1026 ],
1036 ],
1027 "files": [
1037 "files": [
1028 {
1038 {
1029 "abspath": "foo",
1039 "abspath": "foo",
1030 "basename": "foo",
1040 "basename": "foo",
1031 "date": [
1041 "date": [
1032 0.0,
1042 0.0,
1033 0
1043 0
1034 ],
1044 ],
1035 "flags": "",
1045 "flags": "",
1036 "size": 4
1046 "size": 4
1037 }
1047 }
1038 ],
1048 ],
1039 "node": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
1049 "node": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
1040 "tags": []
1050 "tags": []
1041 }
1051 }
1042
1052
1043 tags/ shows tags info
1053 tags/ shows tags info
1044
1054
1045 $ request json-tags
1055 $ request json-tags
1046 200 Script output follows
1056 200 Script output follows
1047
1057
1048 {
1058 {
1049 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
1059 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
1050 "tags": [
1060 "tags": [
1051 {
1061 {
1052 "date": [
1062 "date": [
1053 0.0,
1063 0.0,
1054 0
1064 0
1055 ],
1065 ],
1056 "node": "f2890a05fea49bfaf9fb27ed5490894eba32da78",
1066 "node": "f2890a05fea49bfaf9fb27ed5490894eba32da78",
1057 "tag": "tag2"
1067 "tag": "tag2"
1058 },
1068 },
1059 {
1069 {
1060 "date": [
1070 "date": [
1061 0.0,
1071 0.0,
1062 0
1072 0
1063 ],
1073 ],
1064 "node": "78896eb0e102174ce9278438a95e12543e4367a7",
1074 "node": "78896eb0e102174ce9278438a95e12543e4367a7",
1065 "tag": "tag1"
1075 "tag": "tag1"
1066 }
1076 }
1067 ]
1077 ]
1068 }
1078 }
1069
1079
1070 bookmarks/ shows bookmarks info
1080 bookmarks/ shows bookmarks info
1071
1081
1072 $ request json-bookmarks
1082 $ request json-bookmarks
1073 200 Script output follows
1083 200 Script output follows
1074
1084
1075 {
1085 {
1076 "bookmarks": [
1086 "bookmarks": [
1077 {
1087 {
1078 "bookmark": "bookmark2",
1088 "bookmark": "bookmark2",
1079 "date": [
1089 "date": [
1080 0.0,
1090 0.0,
1081 0
1091 0
1082 ],
1092 ],
1083 "node": "ceed296fe500c3fac9541e31dad860cb49c89e45"
1093 "node": "ceed296fe500c3fac9541e31dad860cb49c89e45"
1084 },
1094 },
1085 {
1095 {
1086 "bookmark": "bookmark1",
1096 "bookmark": "bookmark1",
1087 "date": [
1097 "date": [
1088 0.0,
1098 0.0,
1089 0
1099 0
1090 ],
1100 ],
1091 "node": "8d7c456572acf3557e8ed8a07286b10c408bcec5"
1101 "node": "8d7c456572acf3557e8ed8a07286b10c408bcec5"
1092 }
1102 }
1093 ],
1103 ],
1094 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7"
1104 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7"
1095 }
1105 }
1096
1106
1097 branches/ shows branches info
1107 branches/ shows branches info
1098
1108
1099 $ request json-branches
1109 $ request json-branches
1100 200 Script output follows
1110 200 Script output follows
1101
1111
1102 {
1112 {
1103 "branches": [
1113 "branches": [
1104 {
1114 {
1105 "branch": "default",
1115 "branch": "default",
1106 "date": [
1116 "date": [
1107 0.0,
1117 0.0,
1108 0
1118 0
1109 ],
1119 ],
1110 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
1120 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
1111 "status": "open"
1121 "status": "open"
1112 },
1122 },
1113 {
1123 {
1114 "branch": "test-branch",
1124 "branch": "test-branch",
1115 "date": [
1125 "date": [
1116 0.0,
1126 0.0,
1117 0
1127 0
1118 ],
1128 ],
1119 "node": "ed66c30e87eb65337c05a4229efaa5f1d5285a90",
1129 "node": "ed66c30e87eb65337c05a4229efaa5f1d5285a90",
1120 "status": "inactive"
1130 "status": "inactive"
1121 }
1131 }
1122 ]
1132 ]
1123 }
1133 }
1124
1134
1125 summary/ shows a summary of repository state
1135 summary/ shows a summary of repository state
1126
1136
1127 $ request json-summary
1137 $ request json-summary
1128 200 Script output follows
1138 200 Script output follows
1129
1139
1130 {
1140 {
1131 "archives": [
1141 "archives": [
1132 {
1142 {
1133 "extension": ".tar.bz2",
1143 "extension": ".tar.bz2",
1134 "node": "tip",
1144 "node": "tip",
1135 "type": "bz2",
1145 "type": "bz2",
1136 "url": "http://*:$HGPORT/archive/tip.tar.bz2" (glob)
1146 "url": "http://*:$HGPORT/archive/tip.tar.bz2" (glob)
1137 }
1147 }
1138 ],
1148 ],
1139 "bookmarks": [
1149 "bookmarks": [
1140 {
1150 {
1141 "bookmark": "bookmark2",
1151 "bookmark": "bookmark2",
1142 "date": [
1152 "date": [
1143 0.0,
1153 0.0,
1144 0
1154 0
1145 ],
1155 ],
1146 "node": "ceed296fe500c3fac9541e31dad860cb49c89e45"
1156 "node": "ceed296fe500c3fac9541e31dad860cb49c89e45"
1147 },
1157 },
1148 {
1158 {
1149 "bookmark": "bookmark1",
1159 "bookmark": "bookmark1",
1150 "date": [
1160 "date": [
1151 0.0,
1161 0.0,
1152 0
1162 0
1153 ],
1163 ],
1154 "node": "8d7c456572acf3557e8ed8a07286b10c408bcec5"
1164 "node": "8d7c456572acf3557e8ed8a07286b10c408bcec5"
1155 }
1165 }
1156 ],
1166 ],
1157 "branches": [
1167 "branches": [
1158 {
1168 {
1159 "branch": "default",
1169 "branch": "default",
1160 "date": [
1170 "date": [
1161 0.0,
1171 0.0,
1162 0
1172 0
1163 ],
1173 ],
1164 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
1174 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
1165 "status": "open"
1175 "status": "open"
1166 },
1176 },
1167 {
1177 {
1168 "branch": "test-branch",
1178 "branch": "test-branch",
1169 "date": [
1179 "date": [
1170 0.0,
1180 0.0,
1171 0
1181 0
1172 ],
1182 ],
1173 "node": "ed66c30e87eb65337c05a4229efaa5f1d5285a90",
1183 "node": "ed66c30e87eb65337c05a4229efaa5f1d5285a90",
1174 "status": "inactive"
1184 "status": "inactive"
1175 }
1185 }
1176 ],
1186 ],
1177 "labels": [],
1187 "labels": [],
1178 "lastchange": [
1188 "lastchange": [
1179 0.0,
1189 0.0,
1180 0
1190 0
1181 ],
1191 ],
1182 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
1192 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
1183 "shortlog": [
1193 "shortlog": [
1184 {
1194 {
1185 "bookmarks": [],
1195 "bookmarks": [],
1186 "branch": "default",
1196 "branch": "default",
1187 "date": [
1197 "date": [
1188 0.0,
1198 0.0,
1189 0
1199 0
1190 ],
1200 ],
1191 "desc": "merge test-branch into default",
1201 "desc": "merge test-branch into default",
1192 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
1202 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
1193 "parents": [
1203 "parents": [
1194 "ceed296fe500c3fac9541e31dad860cb49c89e45",
1204 "ceed296fe500c3fac9541e31dad860cb49c89e45",
1195 "ed66c30e87eb65337c05a4229efaa5f1d5285a90"
1205 "ed66c30e87eb65337c05a4229efaa5f1d5285a90"
1196 ],
1206 ],
1197 "phase": "draft",
1207 "phase": "draft",
1198 "tags": [
1208 "tags": [
1199 "tip"
1209 "tip"
1200 ],
1210 ],
1201 "user": "test"
1211 "user": "test"
1202 },
1212 },
1203 {
1213 {
1204 "bookmarks": [],
1214 "bookmarks": [],
1205 "branch": "test-branch",
1215 "branch": "test-branch",
1206 "date": [
1216 "date": [
1207 0.0,
1217 0.0,
1208 0
1218 0
1209 ],
1219 ],
1210 "desc": "another commit in test-branch",
1220 "desc": "another commit in test-branch",
1211 "node": "ed66c30e87eb65337c05a4229efaa5f1d5285a90",
1221 "node": "ed66c30e87eb65337c05a4229efaa5f1d5285a90",
1212 "parents": [
1222 "parents": [
1213 "6ab967a8ab3489227a83f80e920faa039a71819f"
1223 "6ab967a8ab3489227a83f80e920faa039a71819f"
1214 ],
1224 ],
1215 "phase": "draft",
1225 "phase": "draft",
1216 "tags": [],
1226 "tags": [],
1217 "user": "test"
1227 "user": "test"
1218 },
1228 },
1219 {
1229 {
1220 "bookmarks": [],
1230 "bookmarks": [],
1221 "branch": "test-branch",
1231 "branch": "test-branch",
1222 "date": [
1232 "date": [
1223 0.0,
1233 0.0,
1224 0
1234 0
1225 ],
1235 ],
1226 "desc": "create test branch",
1236 "desc": "create test branch",
1227 "node": "6ab967a8ab3489227a83f80e920faa039a71819f",
1237 "node": "6ab967a8ab3489227a83f80e920faa039a71819f",
1228 "parents": [
1238 "parents": [
1229 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
1239 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
1230 ],
1240 ],
1231 "phase": "draft",
1241 "phase": "draft",
1232 "tags": [],
1242 "tags": [],
1233 "user": "test"
1243 "user": "test"
1234 },
1244 },
1235 {
1245 {
1236 "bookmarks": [
1246 "bookmarks": [
1237 "bookmark2"
1247 "bookmark2"
1238 ],
1248 ],
1239 "branch": "default",
1249 "branch": "default",
1240 "date": [
1250 "date": [
1241 0.0,
1251 0.0,
1242 0
1252 0
1243 ],
1253 ],
1244 "desc": "create tag2",
1254 "desc": "create tag2",
1245 "node": "ceed296fe500c3fac9541e31dad860cb49c89e45",
1255 "node": "ceed296fe500c3fac9541e31dad860cb49c89e45",
1246 "parents": [
1256 "parents": [
1247 "f2890a05fea49bfaf9fb27ed5490894eba32da78"
1257 "f2890a05fea49bfaf9fb27ed5490894eba32da78"
1248 ],
1258 ],
1249 "phase": "draft",
1259 "phase": "draft",
1250 "tags": [],
1260 "tags": [],
1251 "user": "test"
1261 "user": "test"
1252 },
1262 },
1253 {
1263 {
1254 "bookmarks": [],
1264 "bookmarks": [],
1255 "branch": "default",
1265 "branch": "default",
1256 "date": [
1266 "date": [
1257 0.0,
1267 0.0,
1258 0
1268 0
1259 ],
1269 ],
1260 "desc": "another commit to da/foo",
1270 "desc": "another commit to da/foo",
1261 "node": "f2890a05fea49bfaf9fb27ed5490894eba32da78",
1271 "node": "f2890a05fea49bfaf9fb27ed5490894eba32da78",
1262 "parents": [
1272 "parents": [
1263 "93a8ce14f89156426b7fa981af8042da53f03aa0"
1273 "93a8ce14f89156426b7fa981af8042da53f03aa0"
1264 ],
1274 ],
1265 "phase": "draft",
1275 "phase": "draft",
1266 "tags": [
1276 "tags": [
1267 "tag2"
1277 "tag2"
1268 ],
1278 ],
1269 "user": "test"
1279 "user": "test"
1270 },
1280 },
1271 {
1281 {
1272 "bookmarks": [],
1282 "bookmarks": [],
1273 "branch": "default",
1283 "branch": "default",
1274 "date": [
1284 "date": [
1275 0.0,
1285 0.0,
1276 0
1286 0
1277 ],
1287 ],
1278 "desc": "create tag",
1288 "desc": "create tag",
1279 "node": "93a8ce14f89156426b7fa981af8042da53f03aa0",
1289 "node": "93a8ce14f89156426b7fa981af8042da53f03aa0",
1280 "parents": [
1290 "parents": [
1281 "78896eb0e102174ce9278438a95e12543e4367a7"
1291 "78896eb0e102174ce9278438a95e12543e4367a7"
1282 ],
1292 ],
1283 "phase": "public",
1293 "phase": "public",
1284 "tags": [],
1294 "tags": [],
1285 "user": "test"
1295 "user": "test"
1286 },
1296 },
1287 {
1297 {
1288 "bookmarks": [],
1298 "bookmarks": [],
1289 "branch": "default",
1299 "branch": "default",
1290 "date": [
1300 "date": [
1291 0.0,
1301 0.0,
1292 0
1302 0
1293 ],
1303 ],
1294 "desc": "move foo",
1304 "desc": "move foo",
1295 "node": "78896eb0e102174ce9278438a95e12543e4367a7",
1305 "node": "78896eb0e102174ce9278438a95e12543e4367a7",
1296 "parents": [
1306 "parents": [
1297 "8d7c456572acf3557e8ed8a07286b10c408bcec5"
1307 "8d7c456572acf3557e8ed8a07286b10c408bcec5"
1298 ],
1308 ],
1299 "phase": "public",
1309 "phase": "public",
1300 "tags": [
1310 "tags": [
1301 "tag1"
1311 "tag1"
1302 ],
1312 ],
1303 "user": "test"
1313 "user": "test"
1304 },
1314 },
1305 {
1315 {
1306 "bookmarks": [
1316 "bookmarks": [
1307 "bookmark1"
1317 "bookmark1"
1308 ],
1318 ],
1309 "branch": "default",
1319 "branch": "default",
1310 "date": [
1320 "date": [
1311 0.0,
1321 0.0,
1312 0
1322 0
1313 ],
1323 ],
1314 "desc": "modify da/foo",
1324 "desc": "modify da/foo",
1315 "node": "8d7c456572acf3557e8ed8a07286b10c408bcec5",
1325 "node": "8d7c456572acf3557e8ed8a07286b10c408bcec5",
1316 "parents": [
1326 "parents": [
1317 "f8bbb9024b10f93cdbb8d940337398291d40dea8"
1327 "f8bbb9024b10f93cdbb8d940337398291d40dea8"
1318 ],
1328 ],
1319 "phase": "public",
1329 "phase": "public",
1320 "tags": [],
1330 "tags": [],
1321 "user": "test"
1331 "user": "test"
1322 },
1332 },
1323 {
1333 {
1324 "bookmarks": [],
1334 "bookmarks": [],
1325 "branch": "default",
1335 "branch": "default",
1326 "date": [
1336 "date": [
1327 0.0,
1337 0.0,
1328 0
1338 0
1329 ],
1339 ],
1330 "desc": "modify foo",
1340 "desc": "modify foo",
1331 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
1341 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
1332 "parents": [
1342 "parents": [
1333 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
1343 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
1334 ],
1344 ],
1335 "phase": "public",
1345 "phase": "public",
1336 "tags": [],
1346 "tags": [],
1337 "user": "test"
1347 "user": "test"
1338 },
1348 },
1339 {
1349 {
1340 "bookmarks": [],
1350 "bookmarks": [],
1341 "branch": "default",
1351 "branch": "default",
1342 "date": [
1352 "date": [
1343 0.0,
1353 0.0,
1344 0
1354 0
1345 ],
1355 ],
1346 "desc": "initial",
1356 "desc": "initial",
1347 "node": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
1357 "node": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
1348 "parents": [],
1358 "parents": [],
1349 "phase": "public",
1359 "phase": "public",
1350 "tags": [],
1360 "tags": [],
1351 "user": "test"
1361 "user": "test"
1352 }
1362 }
1353 ],
1363 ],
1354 "tags": [
1364 "tags": [
1355 {
1365 {
1356 "date": [
1366 "date": [
1357 0.0,
1367 0.0,
1358 0
1368 0
1359 ],
1369 ],
1360 "node": "f2890a05fea49bfaf9fb27ed5490894eba32da78",
1370 "node": "f2890a05fea49bfaf9fb27ed5490894eba32da78",
1361 "tag": "tag2"
1371 "tag": "tag2"
1362 },
1372 },
1363 {
1373 {
1364 "date": [
1374 "date": [
1365 0.0,
1375 0.0,
1366 0
1376 0
1367 ],
1377 ],
1368 "node": "78896eb0e102174ce9278438a95e12543e4367a7",
1378 "node": "78896eb0e102174ce9278438a95e12543e4367a7",
1369 "tag": "tag1"
1379 "tag": "tag1"
1370 }
1380 }
1371 ]
1381 ]
1372 }
1382 }
1373
1383
1374 $ request json-changelog?rev=create
1384 $ request json-changelog?rev=create
1375 200 Script output follows
1385 200 Script output follows
1376
1386
1377 {
1387 {
1378 "entries": [
1388 "entries": [
1379 {
1389 {
1380 "bookmarks": [],
1390 "bookmarks": [],
1381 "branch": "test-branch",
1391 "branch": "test-branch",
1382 "date": [
1392 "date": [
1383 0.0,
1393 0.0,
1384 0
1394 0
1385 ],
1395 ],
1386 "desc": "create test branch",
1396 "desc": "create test branch",
1387 "node": "6ab967a8ab3489227a83f80e920faa039a71819f",
1397 "node": "6ab967a8ab3489227a83f80e920faa039a71819f",
1388 "parents": [
1398 "parents": [
1389 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
1399 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
1390 ],
1400 ],
1391 "phase": "draft",
1401 "phase": "draft",
1392 "tags": [],
1402 "tags": [],
1393 "user": "test"
1403 "user": "test"
1394 },
1404 },
1395 {
1405 {
1396 "bookmarks": [
1406 "bookmarks": [
1397 "bookmark2"
1407 "bookmark2"
1398 ],
1408 ],
1399 "branch": "default",
1409 "branch": "default",
1400 "date": [
1410 "date": [
1401 0.0,
1411 0.0,
1402 0
1412 0
1403 ],
1413 ],
1404 "desc": "create tag2",
1414 "desc": "create tag2",
1405 "node": "ceed296fe500c3fac9541e31dad860cb49c89e45",
1415 "node": "ceed296fe500c3fac9541e31dad860cb49c89e45",
1406 "parents": [
1416 "parents": [
1407 "f2890a05fea49bfaf9fb27ed5490894eba32da78"
1417 "f2890a05fea49bfaf9fb27ed5490894eba32da78"
1408 ],
1418 ],
1409 "phase": "draft",
1419 "phase": "draft",
1410 "tags": [],
1420 "tags": [],
1411 "user": "test"
1421 "user": "test"
1412 },
1422 },
1413 {
1423 {
1414 "bookmarks": [],
1424 "bookmarks": [],
1415 "branch": "default",
1425 "branch": "default",
1416 "date": [
1426 "date": [
1417 0.0,
1427 0.0,
1418 0
1428 0
1419 ],
1429 ],
1420 "desc": "create tag",
1430 "desc": "create tag",
1421 "node": "93a8ce14f89156426b7fa981af8042da53f03aa0",
1431 "node": "93a8ce14f89156426b7fa981af8042da53f03aa0",
1422 "parents": [
1432 "parents": [
1423 "78896eb0e102174ce9278438a95e12543e4367a7"
1433 "78896eb0e102174ce9278438a95e12543e4367a7"
1424 ],
1434 ],
1425 "phase": "public",
1435 "phase": "public",
1426 "tags": [],
1436 "tags": [],
1427 "user": "test"
1437 "user": "test"
1428 }
1438 }
1429 ],
1439 ],
1430 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
1440 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
1431 "query": "create"
1441 "query": "create"
1432 }
1442 }
1433
1443
1434 filediff/{revision}/{path} shows changes to a file in a revision
1444 filediff/{revision}/{path} shows changes to a file in a revision
1435
1445
1436 $ request json-diff/f8bbb9024b10/foo
1446 $ request json-diff/f8bbb9024b10/foo
1437 200 Script output follows
1447 200 Script output follows
1438
1448
1439 {
1449 {
1440 "author": "test",
1450 "author": "test",
1441 "children": [],
1451 "children": [],
1442 "date": [
1452 "date": [
1443 0.0,
1453 0.0,
1444 0
1454 0
1445 ],
1455 ],
1446 "desc": "modify foo",
1456 "desc": "modify foo",
1447 "diff": [
1457 "diff": [
1448 {
1458 {
1449 "blockno": 1,
1459 "blockno": 1,
1450 "lines": [
1460 "lines": [
1451 {
1461 {
1452 "l": "--- a/foo\tThu Jan 01 00:00:00 1970 +0000\n",
1462 "l": "--- a/foo\tThu Jan 01 00:00:00 1970 +0000\n",
1453 "n": 1,
1463 "n": 1,
1454 "t": "-"
1464 "t": "-"
1455 },
1465 },
1456 {
1466 {
1457 "l": "+++ b/foo\tThu Jan 01 00:00:00 1970 +0000\n",
1467 "l": "+++ b/foo\tThu Jan 01 00:00:00 1970 +0000\n",
1458 "n": 2,
1468 "n": 2,
1459 "t": "+"
1469 "t": "+"
1460 },
1470 },
1461 {
1471 {
1462 "l": "@@ -1,1 +1,1 @@\n",
1472 "l": "@@ -1,1 +1,1 @@\n",
1463 "n": 3,
1473 "n": 3,
1464 "t": "@"
1474 "t": "@"
1465 },
1475 },
1466 {
1476 {
1467 "l": "-foo\n",
1477 "l": "-foo\n",
1468 "n": 4,
1478 "n": 4,
1469 "t": "-"
1479 "t": "-"
1470 },
1480 },
1471 {
1481 {
1472 "l": "+bar\n",
1482 "l": "+bar\n",
1473 "n": 5,
1483 "n": 5,
1474 "t": "+"
1484 "t": "+"
1475 }
1485 }
1476 ]
1486 ]
1477 }
1487 }
1478 ],
1488 ],
1479 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
1489 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
1480 "parents": [
1490 "parents": [
1481 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
1491 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
1482 ],
1492 ],
1483 "path": "foo"
1493 "path": "foo"
1484 }
1494 }
1485
1495
1486 comparison/{revision}/{path} shows information about before and after for a file
1496 comparison/{revision}/{path} shows information about before and after for a file
1487
1497
1488 $ request json-comparison/f8bbb9024b10/foo
1498 $ request json-comparison/f8bbb9024b10/foo
1489 200 Script output follows
1499 200 Script output follows
1490
1500
1491 {
1501 {
1492 "author": "test",
1502 "author": "test",
1493 "children": [],
1503 "children": [],
1494 "comparison": [
1504 "comparison": [
1495 {
1505 {
1496 "lines": [
1506 "lines": [
1497 {
1507 {
1498 "ll": "foo",
1508 "ll": "foo",
1499 "ln": 1,
1509 "ln": 1,
1500 "rl": "bar",
1510 "rl": "bar",
1501 "rn": 1,
1511 "rn": 1,
1502 "t": "replace"
1512 "t": "replace"
1503 }
1513 }
1504 ]
1514 ]
1505 }
1515 }
1506 ],
1516 ],
1507 "date": [
1517 "date": [
1508 0.0,
1518 0.0,
1509 0
1519 0
1510 ],
1520 ],
1511 "desc": "modify foo",
1521 "desc": "modify foo",
1512 "leftnode": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
1522 "leftnode": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
1513 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
1523 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
1514 "parents": [
1524 "parents": [
1515 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
1525 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
1516 ],
1526 ],
1517 "path": "foo",
1527 "path": "foo",
1518 "rightnode": "f8bbb9024b10f93cdbb8d940337398291d40dea8"
1528 "rightnode": "f8bbb9024b10f93cdbb8d940337398291d40dea8"
1519 }
1529 }
1520
1530
1521 annotate/{revision}/{path} shows annotations for each line
1531 annotate/{revision}/{path} shows annotations for each line
1522
1532
1523 $ request json-annotate/f8bbb9024b10/foo
1533 $ request json-annotate/f8bbb9024b10/foo
1524 200 Script output follows
1534 200 Script output follows
1525
1535
1526 {
1536 {
1527 "abspath": "foo",
1537 "abspath": "foo",
1528 "annotate": [
1538 "annotate": [
1529 {
1539 {
1530 "abspath": "foo",
1540 "abspath": "foo",
1531 "author": "test",
1541 "author": "test",
1532 "desc": "modify foo",
1542 "desc": "modify foo",
1533 "line": "bar\n",
1543 "line": "bar\n",
1534 "lineno": 1,
1544 "lineno": 1,
1535 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
1545 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
1536 "revdate": [
1546 "revdate": [
1537 0.0,
1547 0.0,
1538 0
1548 0
1539 ],
1549 ],
1540 "targetline": 1
1550 "targetline": 1
1541 }
1551 }
1542 ],
1552 ],
1543 "author": "test",
1553 "author": "test",
1544 "children": [],
1554 "children": [],
1545 "date": [
1555 "date": [
1546 0.0,
1556 0.0,
1547 0
1557 0
1548 ],
1558 ],
1549 "desc": "modify foo",
1559 "desc": "modify foo",
1550 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
1560 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
1551 "parents": [
1561 "parents": [
1552 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
1562 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
1553 ],
1563 ],
1554 "permissions": ""
1564 "permissions": ""
1555 }
1565 }
1556
1566
1557 filelog/{revision}/{path} shows history of a single file
1567 filelog/{revision}/{path} shows history of a single file
1558
1568
1559 $ request json-filelog/f8bbb9024b10/foo
1569 $ request json-filelog/f8bbb9024b10/foo
1560 200 Script output follows
1570 200 Script output follows
1561
1571
1562 {
1572 {
1563 "entries": [
1573 "entries": [
1564 {
1574 {
1565 "bookmarks": [],
1575 "bookmarks": [],
1566 "branch": "default",
1576 "branch": "default",
1567 "date": [
1577 "date": [
1568 0.0,
1578 0.0,
1569 0
1579 0
1570 ],
1580 ],
1571 "desc": "modify foo",
1581 "desc": "modify foo",
1572 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
1582 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
1573 "parents": [
1583 "parents": [
1574 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
1584 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
1575 ],
1585 ],
1576 "phase": "public",
1586 "phase": "public",
1577 "tags": [],
1587 "tags": [],
1578 "user": "test"
1588 "user": "test"
1579 },
1589 },
1580 {
1590 {
1581 "bookmarks": [],
1591 "bookmarks": [],
1582 "branch": "default",
1592 "branch": "default",
1583 "date": [
1593 "date": [
1584 0.0,
1594 0.0,
1585 0
1595 0
1586 ],
1596 ],
1587 "desc": "initial",
1597 "desc": "initial",
1588 "node": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
1598 "node": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
1589 "parents": [],
1599 "parents": [],
1590 "phase": "public",
1600 "phase": "public",
1591 "tags": [],
1601 "tags": [],
1592 "user": "test"
1602 "user": "test"
1593 }
1603 }
1594 ]
1604 ]
1595 }
1605 }
1596
1606
1597 $ request json-filelog/cc725e08502a/da/foo
1607 $ request json-filelog/cc725e08502a/da/foo
1598 200 Script output follows
1608 200 Script output follows
1599
1609
1600 {
1610 {
1601 "entries": [
1611 "entries": [
1602 {
1612 {
1603 "bookmarks": [],
1613 "bookmarks": [],
1604 "branch": "default",
1614 "branch": "default",
1605 "date": [
1615 "date": [
1606 0.0,
1616 0.0,
1607 0
1617 0
1608 ],
1618 ],
1609 "desc": "another commit to da/foo",
1619 "desc": "another commit to da/foo",
1610 "node": "f2890a05fea49bfaf9fb27ed5490894eba32da78",
1620 "node": "f2890a05fea49bfaf9fb27ed5490894eba32da78",
1611 "parents": [
1621 "parents": [
1612 "8d7c456572acf3557e8ed8a07286b10c408bcec5"
1622 "8d7c456572acf3557e8ed8a07286b10c408bcec5"
1613 ],
1623 ],
1614 "phase": "draft",
1624 "phase": "draft",
1615 "tags": [
1625 "tags": [
1616 "tag2"
1626 "tag2"
1617 ],
1627 ],
1618 "user": "test"
1628 "user": "test"
1619 },
1629 },
1620 {
1630 {
1621 "bookmarks": [
1631 "bookmarks": [
1622 "bookmark1"
1632 "bookmark1"
1623 ],
1633 ],
1624 "branch": "default",
1634 "branch": "default",
1625 "date": [
1635 "date": [
1626 0.0,
1636 0.0,
1627 0
1637 0
1628 ],
1638 ],
1629 "desc": "modify da/foo",
1639 "desc": "modify da/foo",
1630 "node": "8d7c456572acf3557e8ed8a07286b10c408bcec5",
1640 "node": "8d7c456572acf3557e8ed8a07286b10c408bcec5",
1631 "parents": [
1641 "parents": [
1632 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
1642 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
1633 ],
1643 ],
1634 "phase": "public",
1644 "phase": "public",
1635 "tags": [],
1645 "tags": [],
1636 "user": "test"
1646 "user": "test"
1637 },
1647 },
1638 {
1648 {
1639 "bookmarks": [],
1649 "bookmarks": [],
1640 "branch": "default",
1650 "branch": "default",
1641 "date": [
1651 "date": [
1642 0.0,
1652 0.0,
1643 0
1653 0
1644 ],
1654 ],
1645 "desc": "initial",
1655 "desc": "initial",
1646 "node": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
1656 "node": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
1647 "parents": [],
1657 "parents": [],
1648 "phase": "public",
1658 "phase": "public",
1649 "tags": [],
1659 "tags": [],
1650 "user": "test"
1660 "user": "test"
1651 }
1661 }
1652 ]
1662 ]
1653 }
1663 }
1654
1664
1655 (archive/ doesn't use templating, so ignore it)
1665 (archive/ doesn't use templating, so ignore it)
1656
1666
1657 (static/ doesn't use templating, so ignore it)
1667 (static/ doesn't use templating, so ignore it)
1658
1668
1659 graph/ shows information that can be used to render a graph of the DAG
1669 graph/ shows information that can be used to render a graph of the DAG
1660
1670
1661 $ request json-graph
1671 $ request json-graph
1662 200 Script output follows
1672 200 Script output follows
1663
1673
1664 {
1674 {
1665 "changeset_count": 10,
1675 "changeset_count": 10,
1666 "changesets": [
1676 "changesets": [
1667 {
1677 {
1668 "bookmarks": [],
1678 "bookmarks": [],
1669 "branch": "default",
1679 "branch": "default",
1670 "col": 0,
1680 "col": 0,
1671 "color": 1,
1681 "color": 1,
1672 "date": [
1682 "date": [
1673 0.0,
1683 0.0,
1674 0
1684 0
1675 ],
1685 ],
1676 "desc": "merge test-branch into default",
1686 "desc": "merge test-branch into default",
1677 "edges": [
1687 "edges": [
1678 {
1688 {
1679 "bcolor": "",
1689 "bcolor": "",
1680 "col": 0,
1690 "col": 0,
1681 "color": 1,
1691 "color": 1,
1682 "nextcol": 0,
1692 "nextcol": 0,
1683 "width": -1
1693 "width": -1
1684 },
1694 },
1685 {
1695 {
1686 "bcolor": "",
1696 "bcolor": "",
1687 "col": 0,
1697 "col": 0,
1688 "color": 1,
1698 "color": 1,
1689 "nextcol": 1,
1699 "nextcol": 1,
1690 "width": -1
1700 "width": -1
1691 }
1701 }
1692 ],
1702 ],
1693 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
1703 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
1694 "parents": [
1704 "parents": [
1695 "ceed296fe500c3fac9541e31dad860cb49c89e45",
1705 "ceed296fe500c3fac9541e31dad860cb49c89e45",
1696 "ed66c30e87eb65337c05a4229efaa5f1d5285a90"
1706 "ed66c30e87eb65337c05a4229efaa5f1d5285a90"
1697 ],
1707 ],
1698 "phase": "draft",
1708 "phase": "draft",
1699 "row": 0,
1709 "row": 0,
1700 "tags": [
1710 "tags": [
1701 "tip"
1711 "tip"
1702 ],
1712 ],
1703 "user": "test"
1713 "user": "test"
1704 },
1714 },
1705 {
1715 {
1706 "bookmarks": [],
1716 "bookmarks": [],
1707 "branch": "test-branch",
1717 "branch": "test-branch",
1708 "col": 1,
1718 "col": 1,
1709 "color": 2,
1719 "color": 2,
1710 "date": [
1720 "date": [
1711 0.0,
1721 0.0,
1712 0
1722 0
1713 ],
1723 ],
1714 "desc": "another commit in test-branch",
1724 "desc": "another commit in test-branch",
1715 "edges": [
1725 "edges": [
1716 {
1726 {
1717 "bcolor": "",
1727 "bcolor": "",
1718 "col": 0,
1728 "col": 0,
1719 "color": 1,
1729 "color": 1,
1720 "nextcol": 0,
1730 "nextcol": 0,
1721 "width": -1
1731 "width": -1
1722 },
1732 },
1723 {
1733 {
1724 "bcolor": "",
1734 "bcolor": "",
1725 "col": 1,
1735 "col": 1,
1726 "color": 2,
1736 "color": 2,
1727 "nextcol": 1,
1737 "nextcol": 1,
1728 "width": -1
1738 "width": -1
1729 }
1739 }
1730 ],
1740 ],
1731 "node": "ed66c30e87eb65337c05a4229efaa5f1d5285a90",
1741 "node": "ed66c30e87eb65337c05a4229efaa5f1d5285a90",
1732 "parents": [
1742 "parents": [
1733 "6ab967a8ab3489227a83f80e920faa039a71819f"
1743 "6ab967a8ab3489227a83f80e920faa039a71819f"
1734 ],
1744 ],
1735 "phase": "draft",
1745 "phase": "draft",
1736 "row": 1,
1746 "row": 1,
1737 "tags": [],
1747 "tags": [],
1738 "user": "test"
1748 "user": "test"
1739 },
1749 },
1740 {
1750 {
1741 "bookmarks": [],
1751 "bookmarks": [],
1742 "branch": "test-branch",
1752 "branch": "test-branch",
1743 "col": 1,
1753 "col": 1,
1744 "color": 2,
1754 "color": 2,
1745 "date": [
1755 "date": [
1746 0.0,
1756 0.0,
1747 0
1757 0
1748 ],
1758 ],
1749 "desc": "create test branch",
1759 "desc": "create test branch",
1750 "edges": [
1760 "edges": [
1751 {
1761 {
1752 "bcolor": "",
1762 "bcolor": "",
1753 "col": 0,
1763 "col": 0,
1754 "color": 1,
1764 "color": 1,
1755 "nextcol": 0,
1765 "nextcol": 0,
1756 "width": -1
1766 "width": -1
1757 },
1767 },
1758 {
1768 {
1759 "bcolor": "",
1769 "bcolor": "",
1760 "col": 1,
1770 "col": 1,
1761 "color": 2,
1771 "color": 2,
1762 "nextcol": 1,
1772 "nextcol": 1,
1763 "width": -1
1773 "width": -1
1764 }
1774 }
1765 ],
1775 ],
1766 "node": "6ab967a8ab3489227a83f80e920faa039a71819f",
1776 "node": "6ab967a8ab3489227a83f80e920faa039a71819f",
1767 "parents": [
1777 "parents": [
1768 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
1778 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
1769 ],
1779 ],
1770 "phase": "draft",
1780 "phase": "draft",
1771 "row": 2,
1781 "row": 2,
1772 "tags": [],
1782 "tags": [],
1773 "user": "test"
1783 "user": "test"
1774 },
1784 },
1775 {
1785 {
1776 "bookmarks": [
1786 "bookmarks": [
1777 "bookmark2"
1787 "bookmark2"
1778 ],
1788 ],
1779 "branch": "default",
1789 "branch": "default",
1780 "col": 0,
1790 "col": 0,
1781 "color": 1,
1791 "color": 1,
1782 "date": [
1792 "date": [
1783 0.0,
1793 0.0,
1784 0
1794 0
1785 ],
1795 ],
1786 "desc": "create tag2",
1796 "desc": "create tag2",
1787 "edges": [
1797 "edges": [
1788 {
1798 {
1789 "bcolor": "",
1799 "bcolor": "",
1790 "col": 0,
1800 "col": 0,
1791 "color": 1,
1801 "color": 1,
1792 "nextcol": 0,
1802 "nextcol": 0,
1793 "width": -1
1803 "width": -1
1794 },
1804 },
1795 {
1805 {
1796 "bcolor": "",
1806 "bcolor": "",
1797 "col": 1,
1807 "col": 1,
1798 "color": 2,
1808 "color": 2,
1799 "nextcol": 1,
1809 "nextcol": 1,
1800 "width": -1
1810 "width": -1
1801 }
1811 }
1802 ],
1812 ],
1803 "node": "ceed296fe500c3fac9541e31dad860cb49c89e45",
1813 "node": "ceed296fe500c3fac9541e31dad860cb49c89e45",
1804 "parents": [
1814 "parents": [
1805 "f2890a05fea49bfaf9fb27ed5490894eba32da78"
1815 "f2890a05fea49bfaf9fb27ed5490894eba32da78"
1806 ],
1816 ],
1807 "phase": "draft",
1817 "phase": "draft",
1808 "row": 3,
1818 "row": 3,
1809 "tags": [],
1819 "tags": [],
1810 "user": "test"
1820 "user": "test"
1811 },
1821 },
1812 {
1822 {
1813 "bookmarks": [],
1823 "bookmarks": [],
1814 "branch": "default",
1824 "branch": "default",
1815 "col": 0,
1825 "col": 0,
1816 "color": 1,
1826 "color": 1,
1817 "date": [
1827 "date": [
1818 0.0,
1828 0.0,
1819 0
1829 0
1820 ],
1830 ],
1821 "desc": "another commit to da/foo",
1831 "desc": "another commit to da/foo",
1822 "edges": [
1832 "edges": [
1823 {
1833 {
1824 "bcolor": "",
1834 "bcolor": "",
1825 "col": 0,
1835 "col": 0,
1826 "color": 1,
1836 "color": 1,
1827 "nextcol": 0,
1837 "nextcol": 0,
1828 "width": -1
1838 "width": -1
1829 },
1839 },
1830 {
1840 {
1831 "bcolor": "",
1841 "bcolor": "",
1832 "col": 1,
1842 "col": 1,
1833 "color": 2,
1843 "color": 2,
1834 "nextcol": 1,
1844 "nextcol": 1,
1835 "width": -1
1845 "width": -1
1836 }
1846 }
1837 ],
1847 ],
1838 "node": "f2890a05fea49bfaf9fb27ed5490894eba32da78",
1848 "node": "f2890a05fea49bfaf9fb27ed5490894eba32da78",
1839 "parents": [
1849 "parents": [
1840 "93a8ce14f89156426b7fa981af8042da53f03aa0"
1850 "93a8ce14f89156426b7fa981af8042da53f03aa0"
1841 ],
1851 ],
1842 "phase": "draft",
1852 "phase": "draft",
1843 "row": 4,
1853 "row": 4,
1844 "tags": [
1854 "tags": [
1845 "tag2"
1855 "tag2"
1846 ],
1856 ],
1847 "user": "test"
1857 "user": "test"
1848 },
1858 },
1849 {
1859 {
1850 "bookmarks": [],
1860 "bookmarks": [],
1851 "branch": "default",
1861 "branch": "default",
1852 "col": 0,
1862 "col": 0,
1853 "color": 1,
1863 "color": 1,
1854 "date": [
1864 "date": [
1855 0.0,
1865 0.0,
1856 0
1866 0
1857 ],
1867 ],
1858 "desc": "create tag",
1868 "desc": "create tag",
1859 "edges": [
1869 "edges": [
1860 {
1870 {
1861 "bcolor": "",
1871 "bcolor": "",
1862 "col": 0,
1872 "col": 0,
1863 "color": 1,
1873 "color": 1,
1864 "nextcol": 0,
1874 "nextcol": 0,
1865 "width": -1
1875 "width": -1
1866 },
1876 },
1867 {
1877 {
1868 "bcolor": "",
1878 "bcolor": "",
1869 "col": 1,
1879 "col": 1,
1870 "color": 2,
1880 "color": 2,
1871 "nextcol": 1,
1881 "nextcol": 1,
1872 "width": -1
1882 "width": -1
1873 }
1883 }
1874 ],
1884 ],
1875 "node": "93a8ce14f89156426b7fa981af8042da53f03aa0",
1885 "node": "93a8ce14f89156426b7fa981af8042da53f03aa0",
1876 "parents": [
1886 "parents": [
1877 "78896eb0e102174ce9278438a95e12543e4367a7"
1887 "78896eb0e102174ce9278438a95e12543e4367a7"
1878 ],
1888 ],
1879 "phase": "public",
1889 "phase": "public",
1880 "row": 5,
1890 "row": 5,
1881 "tags": [],
1891 "tags": [],
1882 "user": "test"
1892 "user": "test"
1883 },
1893 },
1884 {
1894 {
1885 "bookmarks": [],
1895 "bookmarks": [],
1886 "branch": "default",
1896 "branch": "default",
1887 "col": 0,
1897 "col": 0,
1888 "color": 1,
1898 "color": 1,
1889 "date": [
1899 "date": [
1890 0.0,
1900 0.0,
1891 0
1901 0
1892 ],
1902 ],
1893 "desc": "move foo",
1903 "desc": "move foo",
1894 "edges": [
1904 "edges": [
1895 {
1905 {
1896 "bcolor": "",
1906 "bcolor": "",
1897 "col": 0,
1907 "col": 0,
1898 "color": 1,
1908 "color": 1,
1899 "nextcol": 0,
1909 "nextcol": 0,
1900 "width": -1
1910 "width": -1
1901 },
1911 },
1902 {
1912 {
1903 "bcolor": "",
1913 "bcolor": "",
1904 "col": 1,
1914 "col": 1,
1905 "color": 2,
1915 "color": 2,
1906 "nextcol": 1,
1916 "nextcol": 1,
1907 "width": -1
1917 "width": -1
1908 }
1918 }
1909 ],
1919 ],
1910 "node": "78896eb0e102174ce9278438a95e12543e4367a7",
1920 "node": "78896eb0e102174ce9278438a95e12543e4367a7",
1911 "parents": [
1921 "parents": [
1912 "8d7c456572acf3557e8ed8a07286b10c408bcec5"
1922 "8d7c456572acf3557e8ed8a07286b10c408bcec5"
1913 ],
1923 ],
1914 "phase": "public",
1924 "phase": "public",
1915 "row": 6,
1925 "row": 6,
1916 "tags": [
1926 "tags": [
1917 "tag1"
1927 "tag1"
1918 ],
1928 ],
1919 "user": "test"
1929 "user": "test"
1920 },
1930 },
1921 {
1931 {
1922 "bookmarks": [
1932 "bookmarks": [
1923 "bookmark1"
1933 "bookmark1"
1924 ],
1934 ],
1925 "branch": "default",
1935 "branch": "default",
1926 "col": 0,
1936 "col": 0,
1927 "color": 1,
1937 "color": 1,
1928 "date": [
1938 "date": [
1929 0.0,
1939 0.0,
1930 0
1940 0
1931 ],
1941 ],
1932 "desc": "modify da/foo",
1942 "desc": "modify da/foo",
1933 "edges": [
1943 "edges": [
1934 {
1944 {
1935 "bcolor": "",
1945 "bcolor": "",
1936 "col": 0,
1946 "col": 0,
1937 "color": 1,
1947 "color": 1,
1938 "nextcol": 0,
1948 "nextcol": 0,
1939 "width": -1
1949 "width": -1
1940 },
1950 },
1941 {
1951 {
1942 "bcolor": "",
1952 "bcolor": "",
1943 "col": 1,
1953 "col": 1,
1944 "color": 2,
1954 "color": 2,
1945 "nextcol": 1,
1955 "nextcol": 1,
1946 "width": -1
1956 "width": -1
1947 }
1957 }
1948 ],
1958 ],
1949 "node": "8d7c456572acf3557e8ed8a07286b10c408bcec5",
1959 "node": "8d7c456572acf3557e8ed8a07286b10c408bcec5",
1950 "parents": [
1960 "parents": [
1951 "f8bbb9024b10f93cdbb8d940337398291d40dea8"
1961 "f8bbb9024b10f93cdbb8d940337398291d40dea8"
1952 ],
1962 ],
1953 "phase": "public",
1963 "phase": "public",
1954 "row": 7,
1964 "row": 7,
1955 "tags": [],
1965 "tags": [],
1956 "user": "test"
1966 "user": "test"
1957 },
1967 },
1958 {
1968 {
1959 "bookmarks": [],
1969 "bookmarks": [],
1960 "branch": "default",
1970 "branch": "default",
1961 "col": 0,
1971 "col": 0,
1962 "color": 1,
1972 "color": 1,
1963 "date": [
1973 "date": [
1964 0.0,
1974 0.0,
1965 0
1975 0
1966 ],
1976 ],
1967 "desc": "modify foo",
1977 "desc": "modify foo",
1968 "edges": [
1978 "edges": [
1969 {
1979 {
1970 "bcolor": "",
1980 "bcolor": "",
1971 "col": 0,
1981 "col": 0,
1972 "color": 1,
1982 "color": 1,
1973 "nextcol": 0,
1983 "nextcol": 0,
1974 "width": -1
1984 "width": -1
1975 },
1985 },
1976 {
1986 {
1977 "bcolor": "",
1987 "bcolor": "",
1978 "col": 1,
1988 "col": 1,
1979 "color": 2,
1989 "color": 2,
1980 "nextcol": 0,
1990 "nextcol": 0,
1981 "width": -1
1991 "width": -1
1982 }
1992 }
1983 ],
1993 ],
1984 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
1994 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
1985 "parents": [
1995 "parents": [
1986 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
1996 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
1987 ],
1997 ],
1988 "phase": "public",
1998 "phase": "public",
1989 "row": 8,
1999 "row": 8,
1990 "tags": [],
2000 "tags": [],
1991 "user": "test"
2001 "user": "test"
1992 },
2002 },
1993 {
2003 {
1994 "bookmarks": [],
2004 "bookmarks": [],
1995 "branch": "default",
2005 "branch": "default",
1996 "col": 0,
2006 "col": 0,
1997 "color": 2,
2007 "color": 2,
1998 "date": [
2008 "date": [
1999 0.0,
2009 0.0,
2000 0
2010 0
2001 ],
2011 ],
2002 "desc": "initial",
2012 "desc": "initial",
2003 "edges": [],
2013 "edges": [],
2004 "node": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
2014 "node": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
2005 "parents": [],
2015 "parents": [],
2006 "phase": "public",
2016 "phase": "public",
2007 "row": 9,
2017 "row": 9,
2008 "tags": [],
2018 "tags": [],
2009 "user": "test"
2019 "user": "test"
2010 }
2020 }
2011 ],
2021 ],
2012 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7"
2022 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7"
2013 }
2023 }
2014
2024
2015 help/ shows help topics
2025 help/ shows help topics
2016
2026
2017 $ request json-help
2027 $ request json-help
2018 200 Script output follows
2028 200 Script output follows
2019
2029
2020 {
2030 {
2021 "earlycommands": [
2031 "earlycommands": [
2022 {
2032 {
2023 "summary": "abort an unfinished operation (EXPERIMENTAL)",
2033 "summary": "abort an unfinished operation (EXPERIMENTAL)",
2024 "topic": "abort"
2034 "topic": "abort"
2025 },
2035 },
2026 {
2036 {
2027 "summary": "add the specified files on the next commit",
2037 "summary": "add the specified files on the next commit",
2028 "topic": "add"
2038 "topic": "add"
2029 },
2039 },
2030 {
2040 {
2031 "summary": "show changeset information by line for each file",
2041 "summary": "show changeset information by line for each file",
2032 "topic": "annotate"
2042 "topic": "annotate"
2033 },
2043 },
2034 {
2044 {
2035 "summary": "make a copy of an existing repository",
2045 "summary": "make a copy of an existing repository",
2036 "topic": "clone"
2046 "topic": "clone"
2037 },
2047 },
2038 {
2048 {
2039 "summary": "commit the specified files or all outstanding changes",
2049 "summary": "commit the specified files or all outstanding changes",
2040 "topic": "commit"
2050 "topic": "commit"
2041 },
2051 },
2042 {
2052 {
2043 "summary": "resumes an interrupted operation (EXPERIMENTAL)",
2053 "summary": "resumes an interrupted operation (EXPERIMENTAL)",
2044 "topic": "continue"
2054 "topic": "continue"
2045 },
2055 },
2046 {
2056 {
2047 "summary": "diff repository (or selected files)",
2057 "summary": "diff repository (or selected files)",
2048 "topic": "diff"
2058 "topic": "diff"
2049 },
2059 },
2050 {
2060 {
2051 "summary": "dump the header and diffs for one or more changesets",
2061 "summary": "dump the header and diffs for one or more changesets",
2052 "topic": "export"
2062 "topic": "export"
2053 },
2063 },
2054 {
2064 {
2055 "summary": "forget the specified files on the next commit",
2065 "summary": "forget the specified files on the next commit",
2056 "topic": "forget"
2066 "topic": "forget"
2057 },
2067 },
2058 {
2068 {
2059 "summary": "create a new repository in the given directory",
2069 "summary": "create a new repository in the given directory",
2060 "topic": "init"
2070 "topic": "init"
2061 },
2071 },
2062 {
2072 {
2063 "summary": "show revision history of entire repository or files",
2073 "summary": "show revision history of entire repository or files",
2064 "topic": "log"
2074 "topic": "log"
2065 },
2075 },
2066 {
2076 {
2067 "summary": "merge another revision into working directory",
2077 "summary": "merge another revision into working directory",
2068 "topic": "merge"
2078 "topic": "merge"
2069 },
2079 },
2070 {
2080 {
2071 "summary": "pull changes from the specified source",
2081 "summary": "pull changes from the specified source",
2072 "topic": "pull"
2082 "topic": "pull"
2073 },
2083 },
2074 {
2084 {
2075 "summary": "push changes to the specified destination",
2085 "summary": "push changes to the specified destination",
2076 "topic": "push"
2086 "topic": "push"
2077 },
2087 },
2078 {
2088 {
2079 "summary": "remove the specified files on the next commit",
2089 "summary": "remove the specified files on the next commit",
2080 "topic": "remove"
2090 "topic": "remove"
2081 },
2091 },
2082 {
2092 {
2083 "summary": "start stand-alone webserver",
2093 "summary": "start stand-alone webserver",
2084 "topic": "serve"
2094 "topic": "serve"
2085 },
2095 },
2086 {
2096 {
2087 "summary": "show changed files in the working directory",
2097 "summary": "show changed files in the working directory",
2088 "topic": "status"
2098 "topic": "status"
2089 },
2099 },
2090 {
2100 {
2091 "summary": "summarize working directory state",
2101 "summary": "summarize working directory state",
2092 "topic": "summary"
2102 "topic": "summary"
2093 },
2103 },
2094 {
2104 {
2095 "summary": "update working directory (or switch revisions)",
2105 "summary": "update working directory (or switch revisions)",
2096 "topic": "update"
2106 "topic": "update"
2097 }
2107 }
2098 ],
2108 ],
2099 "othercommands": [
2109 "othercommands": [
2100 {
2110 {
2101 "summary": "add all new files, delete all missing files",
2111 "summary": "add all new files, delete all missing files",
2102 "topic": "addremove"
2112 "topic": "addremove"
2103 },
2113 },
2104 {
2114 {
2105 "summary": "create an unversioned archive of a repository revision",
2115 "summary": "create an unversioned archive of a repository revision",
2106 "topic": "archive"
2116 "topic": "archive"
2107 },
2117 },
2108 {
2118 {
2109 "summary": "reverse effect of earlier changeset",
2119 "summary": "reverse effect of earlier changeset",
2110 "topic": "backout"
2120 "topic": "backout"
2111 },
2121 },
2112 {
2122 {
2113 "summary": "subdivision search of changesets",
2123 "summary": "subdivision search of changesets",
2114 "topic": "bisect"
2124 "topic": "bisect"
2115 },
2125 },
2116 {
2126 {
2117 "summary": "create a new bookmark or list existing bookmarks",
2127 "summary": "create a new bookmark or list existing bookmarks",
2118 "topic": "bookmarks"
2128 "topic": "bookmarks"
2119 },
2129 },
2120 {
2130 {
2121 "summary": "set or show the current branch name",
2131 "summary": "set or show the current branch name",
2122 "topic": "branch"
2132 "topic": "branch"
2123 },
2133 },
2124 {
2134 {
2125 "summary": "list repository named branches",
2135 "summary": "list repository named branches",
2126 "topic": "branches"
2136 "topic": "branches"
2127 },
2137 },
2128 {
2138 {
2129 "summary": "create a bundle file",
2139 "summary": "create a bundle file",
2130 "topic": "bundle"
2140 "topic": "bundle"
2131 },
2141 },
2132 {
2142 {
2133 "summary": "output the current or given revision of files",
2143 "summary": "output the current or given revision of files",
2134 "topic": "cat"
2144 "topic": "cat"
2135 },
2145 },
2136 {
2146 {
2137 "summary": "show combined config settings from all hgrc files",
2147 "summary": "show combined config settings from all hgrc files",
2138 "topic": "config"
2148 "topic": "config"
2139 },
2149 },
2140 {
2150 {
2141 "summary": "mark files as copied for the next commit",
2151 "summary": "mark files as copied for the next commit",
2142 "topic": "copy"
2152 "topic": "copy"
2143 },
2153 },
2144 {
2154 {
2145 "summary": "list tracked files",
2155 "summary": "list tracked files",
2146 "topic": "files"
2156 "topic": "files"
2147 },
2157 },
2148 {
2158 {
2149 "summary": "copy changes from other branches onto the current branch",
2159 "summary": "copy changes from other branches onto the current branch",
2150 "topic": "graft"
2160 "topic": "graft"
2151 },
2161 },
2152 {
2162 {
2153 "summary": "search for a pattern in specified files",
2163 "summary": "search for a pattern in specified files",
2154 "topic": "grep"
2164 "topic": "grep"
2155 },
2165 },
2156 {
2166 {
2157 "summary": "show branch heads",
2167 "summary": "show branch heads",
2158 "topic": "heads"
2168 "topic": "heads"
2159 },
2169 },
2160 {
2170 {
2161 "summary": "show help for a given topic or a help overview",
2171 "summary": "show help for a given topic or a help overview",
2162 "topic": "help"
2172 "topic": "help"
2163 },
2173 },
2164 {
2174 {
2165 "summary": "identify the working directory or specified revision",
2175 "summary": "identify the working directory or specified revision",
2166 "topic": "identify"
2176 "topic": "identify"
2167 },
2177 },
2168 {
2178 {
2169 "summary": "import an ordered set of patches",
2179 "summary": "import an ordered set of patches",
2170 "topic": "import"
2180 "topic": "import"
2171 },
2181 },
2172 {
2182 {
2173 "summary": "show new changesets found in source",
2183 "summary": "show new changesets found in source",
2174 "topic": "incoming"
2184 "topic": "incoming"
2175 },
2185 },
2176 {
2186 {
2177 "summary": "output the current or given revision of the project manifest",
2187 "summary": "output the current or given revision of the project manifest",
2178 "topic": "manifest"
2188 "topic": "manifest"
2179 },
2189 },
2180 {
2190 {
2181 "summary": "show changesets not found in the destination",
2191 "summary": "show changesets not found in the destination",
2182 "topic": "outgoing"
2192 "topic": "outgoing"
2183 },
2193 },
2184 {
2194 {
2185 "summary": "show aliases for remote repositories",
2195 "summary": "show aliases for remote repositories",
2186 "topic": "paths"
2196 "topic": "paths"
2187 },
2197 },
2188 {
2198 {
2189 "summary": "set or show the current phase name",
2199 "summary": "set or show the current phase name",
2190 "topic": "phase"
2200 "topic": "phase"
2191 },
2201 },
2192 {
2202 {
2193 "summary": "removes files not tracked by Mercurial",
2203 "summary": "removes files not tracked by Mercurial",
2194 "topic": "purge"
2204 "topic": "purge"
2195 },
2205 },
2196 {
2206 {
2197 "summary": "roll back an interrupted transaction",
2207 "summary": "roll back an interrupted transaction",
2198 "topic": "recover"
2208 "topic": "recover"
2199 },
2209 },
2200 {
2210 {
2201 "summary": "rename files; equivalent of copy + remove",
2211 "summary": "rename files; equivalent of copy + remove",
2202 "topic": "rename"
2212 "topic": "rename"
2203 },
2213 },
2204 {
2214 {
2205 "summary": "redo merges or set/view the merge status of files",
2215 "summary": "redo merges or set/view the merge status of files",
2206 "topic": "resolve"
2216 "topic": "resolve"
2207 },
2217 },
2208 {
2218 {
2209 "summary": "restore files to their checkout state",
2219 "summary": "restore files to their checkout state",
2210 "topic": "revert"
2220 "topic": "revert"
2211 },
2221 },
2212 {
2222 {
2213 "summary": "print the root (top) of the current working directory",
2223 "summary": "print the root (top) of the current working directory",
2214 "topic": "root"
2224 "topic": "root"
2215 },
2225 },
2216 {
2226 {
2217 "summary": "save and set aside changes from the working directory",
2227 "summary": "save and set aside changes from the working directory",
2218 "topic": "shelve"
2228 "topic": "shelve"
2219 },
2229 },
2220 {
2230 {
2221 "summary": "add one or more tags for the current or given revision",
2231 "summary": "add one or more tags for the current or given revision",
2222 "topic": "tag"
2232 "topic": "tag"
2223 },
2233 },
2224 {
2234 {
2225 "summary": "list repository tags",
2235 "summary": "list repository tags",
2226 "topic": "tags"
2236 "topic": "tags"
2227 },
2237 },
2228 {
2238 {
2229 "summary": "apply one or more bundle files",
2239 "summary": "apply one or more bundle files",
2230 "topic": "unbundle"
2240 "topic": "unbundle"
2231 },
2241 },
2232 {
2242 {
2233 "summary": "restore a shelved change to the working directory",
2243 "summary": "restore a shelved change to the working directory",
2234 "topic": "unshelve"
2244 "topic": "unshelve"
2235 },
2245 },
2236 {
2246 {
2237 "summary": "verify the integrity of the repository",
2247 "summary": "verify the integrity of the repository",
2238 "topic": "verify"
2248 "topic": "verify"
2239 },
2249 },
2240 {
2250 {
2241 "summary": "output version and copyright information",
2251 "summary": "output version and copyright information",
2242 "topic": "version"
2252 "topic": "version"
2243 }
2253 }
2244 ],
2254 ],
2245 "topics": [
2255 "topics": [
2246 {
2256 {
2247 "summary": "Bundle File Formats",
2257 "summary": "Bundle File Formats",
2248 "topic": "bundlespec"
2258 "topic": "bundlespec"
2249 },
2259 },
2250 {
2260 {
2251 "summary": "Colorizing Outputs",
2261 "summary": "Colorizing Outputs",
2252 "topic": "color"
2262 "topic": "color"
2253 },
2263 },
2254 {
2264 {
2255 "summary": "Configuration Files",
2265 "summary": "Configuration Files",
2256 "topic": "config"
2266 "topic": "config"
2257 },
2267 },
2258 {
2268 {
2259 "summary": "Date Formats",
2269 "summary": "Date Formats",
2260 "topic": "dates"
2270 "topic": "dates"
2261 },
2271 },
2262 {
2272 {
2263 "summary": "Deprecated Features",
2273 "summary": "Deprecated Features",
2264 "topic": "deprecated"
2274 "topic": "deprecated"
2265 },
2275 },
2266 {
2276 {
2267 "summary": "Diff Formats",
2277 "summary": "Diff Formats",
2268 "topic": "diffs"
2278 "topic": "diffs"
2269 },
2279 },
2270 {
2280 {
2271 "summary": "Environment Variables",
2281 "summary": "Environment Variables",
2272 "topic": "environment"
2282 "topic": "environment"
2273 },
2283 },
2274 {
2284 {
2275 "summary": "Safely rewriting history (EXPERIMENTAL)",
2285 "summary": "Safely rewriting history (EXPERIMENTAL)",
2276 "topic": "evolution"
2286 "topic": "evolution"
2277 },
2287 },
2278 {
2288 {
2279 "summary": "Using Additional Features",
2289 "summary": "Using Additional Features",
2280 "topic": "extensions"
2290 "topic": "extensions"
2281 },
2291 },
2282 {
2292 {
2283 "summary": "Specifying File Sets",
2293 "summary": "Specifying File Sets",
2284 "topic": "filesets"
2294 "topic": "filesets"
2285 },
2295 },
2286 {
2296 {
2287 "summary": "Command-line flags",
2297 "summary": "Command-line flags",
2288 "topic": "flags"
2298 "topic": "flags"
2289 },
2299 },
2290 {
2300 {
2291 "summary": "Glossary",
2301 "summary": "Glossary",
2292 "topic": "glossary"
2302 "topic": "glossary"
2293 },
2303 },
2294 {
2304 {
2295 "summary": "Syntax for Mercurial Ignore Files",
2305 "summary": "Syntax for Mercurial Ignore Files",
2296 "topic": "hgignore"
2306 "topic": "hgignore"
2297 },
2307 },
2298 {
2308 {
2299 "summary": "Configuring hgweb",
2309 "summary": "Configuring hgweb",
2300 "topic": "hgweb"
2310 "topic": "hgweb"
2301 },
2311 },
2302 {
2312 {
2303 "summary": "Technical implementation topics",
2313 "summary": "Technical implementation topics",
2304 "topic": "internals"
2314 "topic": "internals"
2305 },
2315 },
2306 {
2316 {
2307 "summary": "Merge Tools",
2317 "summary": "Merge Tools",
2308 "topic": "merge-tools"
2318 "topic": "merge-tools"
2309 },
2319 },
2310 {
2320 {
2311 "summary": "Pager Support",
2321 "summary": "Pager Support",
2312 "topic": "pager"
2322 "topic": "pager"
2313 },
2323 },
2314 {
2324 {
2315 "summary": "File Name Patterns",
2325 "summary": "File Name Patterns",
2316 "topic": "patterns"
2326 "topic": "patterns"
2317 },
2327 },
2318 {
2328 {
2319 "summary": "Working with Phases",
2329 "summary": "Working with Phases",
2320 "topic": "phases"
2330 "topic": "phases"
2321 },
2331 },
2322 {
2332 {
2323 "summary": "Specifying Revisions",
2333 "summary": "Specifying Revisions",
2324 "topic": "revisions"
2334 "topic": "revisions"
2325 },
2335 },
2326 {
2336 {
2327 "summary": "Rust in Mercurial",
2337 "summary": "Rust in Mercurial",
2328 "topic": "rust"
2338 "topic": "rust"
2329 },
2339 },
2330 {
2340 {
2331 "summary": "Using Mercurial from scripts and automation",
2341 "summary": "Using Mercurial from scripts and automation",
2332 "topic": "scripting"
2342 "topic": "scripting"
2333 },
2343 },
2334 {
2344 {
2335 "summary": "Subrepositories",
2345 "summary": "Subrepositories",
2336 "topic": "subrepos"
2346 "topic": "subrepos"
2337 },
2347 },
2338 {
2348 {
2339 "summary": "Template Usage",
2349 "summary": "Template Usage",
2340 "topic": "templating"
2350 "topic": "templating"
2341 },
2351 },
2342 {
2352 {
2343 "summary": "URL Paths",
2353 "summary": "URL Paths",
2344 "topic": "urls"
2354 "topic": "urls"
2345 }
2355 }
2346 ]
2356 ]
2347 }
2357 }
2348
2358
2349 help/{topic} shows an individual help topic
2359 help/{topic} shows an individual help topic
2350
2360
2351 $ request json-help/phases
2361 $ request json-help/phases
2352 200 Script output follows
2362 200 Script output follows
2353
2363
2354 {
2364 {
2355 "rawdoc": "Working with Phases\n*", (glob)
2365 "rawdoc": "Working with Phases\n*", (glob)
2356 "topic": "phases"
2366 "topic": "phases"
2357 }
2367 }
2358
2368
2359 Error page shouldn't crash
2369 Error page shouldn't crash
2360
2370
2361 $ request json-changeset/deadbeef
2371 $ request json-changeset/deadbeef
2362 404 Not Found
2372 404 Not Found
2363
2373
2364 {
2374 {
2365 "error": "unknown revision 'deadbeef'"
2375 "error": "unknown revision 'deadbeef'"
2366 }
2376 }
2367 [1]
2377 [1]
2368
2378
2369 Commit message with Japanese Kanji 'Noh', which ends with '\x5c'
2379 Commit message with Japanese Kanji 'Noh', which ends with '\x5c'
2370
2380
2371 $ echo foo >> da/foo
2381 $ echo foo >> da/foo
2372 >>> open('msg', 'wb').write(b'\x94\x5c\x0a') and None
2382 >>> open('msg', 'wb').write(b'\x94\x5c\x0a') and None
2373 $ HGENCODING=cp932 hg ci -l msg
2383 $ HGENCODING=cp932 hg ci -l msg
2374
2384
2375 Commit message with null character
2385 Commit message with null character
2376
2386
2377 $ echo foo >> da/foo
2387 $ echo foo >> da/foo
2378 >>> open('msg', 'wb').write(b'commit with null character: \0\n') and None
2388 >>> open('msg', 'wb').write(b'commit with null character: \0\n') and None
2379 $ hg ci -l msg
2389 $ hg ci -l msg
2380 $ rm msg
2390 $ rm msg
2381
2391
2382 Stop and restart with HGENCODING=cp932
2392 Stop and restart with HGENCODING=cp932
2383
2393
2384 $ killdaemons.py
2394 $ killdaemons.py
2385 $ HGENCODING=cp932 hg serve -p $HGPORT -d --pid-file=hg.pid \
2395 $ HGENCODING=cp932 hg serve -p $HGPORT -d --pid-file=hg.pid \
2386 > -A access.log -E error.log
2396 > -A access.log -E error.log
2387 $ cat hg.pid >> $DAEMON_PIDS
2397 $ cat hg.pid >> $DAEMON_PIDS
2388
2398
2389 Test json escape of multibyte characters
2399 Test json escape of multibyte characters
2390
2400
2391 $ request json-filelog/tip/da/foo?revcount=2 | grep '"desc":'
2401 $ request json-filelog/tip/da/foo?revcount=2 | grep '"desc":'
2392 "desc": "commit with null character: \u0000",
2402 "desc": "commit with null character: \u0000",
2393 "desc": "\u80fd",
2403 "desc": "\u80fd",
General Comments 0
You need to be logged in to leave comments. Login now