##// END OF EJS Templates
templates: add support for search webcommand in json style
Laura Médioni -
r29383:f3dca85b default
parent child Browse files
Show More
@@ -1,218 +1,223 b''
1 mimetype = 'application/json'
1 mimetype = 'application/json'
2 filerevision = '\{
2 filerevision = '\{
3 "node": {node|json},
3 "node": {node|json},
4 "path": {file|json},
4 "path": {file|json},
5 "date": {date|json},
5 "date": {date|json},
6 "desc": {desc|utf8|json},
6 "desc": {desc|utf8|json},
7 "branch": {if(branch, branch%changesetbranch, "default"|json)},
7 "branch": {if(branch, branch%changesetbranch, "default"|json)},
8 "bookmarks": [{join(bookmarks%changelistentryname, ", ")}],
8 "bookmarks": [{join(bookmarks%changelistentryname, ", ")}],
9 "tags": [{join(tags%changelistentryname, ", ")}],
9 "tags": [{join(tags%changelistentryname, ", ")}],
10 "user": {author|utf8|json},
10 "user": {author|utf8|json},
11 "parents": [{join(parent%changesetparent, ", ")}],
11 "parents": [{join(parent%changesetparent, ", ")}],
12 "phase": {phase|json},
12 "phase": {phase|json},
13 "lines": [{join(text%lineentry, ", ")}]
13 "lines": [{join(text%lineentry, ", ")}]
14 }'
14 }'
15 lineentry = '\{
15 lineentry = '\{
16 "line": {line|json}
16 "line": {line|json}
17 }'
17 }'
18 search = '"not yet implemented"'
18 search = '\{
19 "node": {node|json},
20 "query": {query|json},
21 "entries": [{join(entries%searchentry, ", ")}]
22 }'
23 searchentry = '{changelistentry}'
19 # changelog and shortlog are the same web API but with different
24 # changelog and shortlog are the same web API but with different
20 # number of entries.
25 # number of entries.
21 changelog = changelist.tmpl
26 changelog = changelist.tmpl
22 shortlog = changelist.tmpl
27 shortlog = changelist.tmpl
23 changelistentry = '\{
28 changelistentry = '\{
24 "node": {node|json},
29 "node": {node|json},
25 "date": {date|json},
30 "date": {date|json},
26 "desc": {desc|utf8|json},
31 "desc": {desc|utf8|json},
27 "branch": {if(branch, branch%changesetbranch, "default"|json)},
32 "branch": {if(branch, branch%changesetbranch, "default"|json)},
28 "bookmarks": [{join(bookmarks%changelistentryname, ", ")}],
33 "bookmarks": [{join(bookmarks%changelistentryname, ", ")}],
29 "tags": [{join(tags%changelistentryname, ", ")}],
34 "tags": [{join(tags%changelistentryname, ", ")}],
30 "user": {author|utf8|json},
35 "user": {author|utf8|json},
31 "phase": {phase|json},
36 "phase": {phase|json},
32 "parents": [{if(allparents, join(allparents%changesetparent, ", "),
37 "parents": [{if(allparents, join(allparents%changesetparent, ", "),
33 join(parent%changesetparent, ", "))}]
38 join(parent%changesetparent, ", "))}]
34 }'
39 }'
35 changelistentryname = '{name|utf8|json}'
40 changelistentryname = '{name|utf8|json}'
36 changeset = '\{
41 changeset = '\{
37 "node": {node|json},
42 "node": {node|json},
38 "date": {date|json},
43 "date": {date|json},
39 "desc": {desc|utf8|json},
44 "desc": {desc|utf8|json},
40 "branch": {if(branch, branch%changesetbranch, "default"|json)},
45 "branch": {if(branch, branch%changesetbranch, "default"|json)},
41 "bookmarks": [{join(changesetbookmark, ", ")}],
46 "bookmarks": [{join(changesetbookmark, ", ")}],
42 "tags": [{join(changesettag, ", ")}],
47 "tags": [{join(changesettag, ", ")}],
43 "user": {author|utf8|json},
48 "user": {author|utf8|json},
44 "parents": [{join(parent%changesetparent, ", ")}],
49 "parents": [{join(parent%changesetparent, ", ")}],
45 "phase": {phase|json}
50 "phase": {phase|json}
46 }'
51 }'
47 changesetbranch = '{name|utf8|json}'
52 changesetbranch = '{name|utf8|json}'
48 changesetbookmark = '{bookmark|utf8|json}'
53 changesetbookmark = '{bookmark|utf8|json}'
49 changesettag = '{tag|utf8|json}'
54 changesettag = '{tag|utf8|json}'
50 changesetparent = '{node|json}'
55 changesetparent = '{node|json}'
51 manifest = '\{
56 manifest = '\{
52 "node": {node|json},
57 "node": {node|json},
53 "abspath": {path|json},
58 "abspath": {path|json},
54 "directories": [{join(dentries%direntry, ", ")}],
59 "directories": [{join(dentries%direntry, ", ")}],
55 "files": [{join(fentries%fileentry, ", ")}],
60 "files": [{join(fentries%fileentry, ", ")}],
56 "bookmarks": [{join(bookmarks%name, ", ")}],
61 "bookmarks": [{join(bookmarks%name, ", ")}],
57 "tags": [{join(tags%name, ", ")}]
62 "tags": [{join(tags%name, ", ")}]
58 }'
63 }'
59 name = '{name|utf8|json}'
64 name = '{name|utf8|json}'
60 direntry = '\{
65 direntry = '\{
61 "abspath": {path|json},
66 "abspath": {path|json},
62 "basename": {basename|json},
67 "basename": {basename|json},
63 "emptydirs": {emptydirs|json}
68 "emptydirs": {emptydirs|json}
64 }'
69 }'
65 fileentry = '\{
70 fileentry = '\{
66 "abspath": {file|json},
71 "abspath": {file|json},
67 "basename": {basename|json},
72 "basename": {basename|json},
68 "date": {date|json},
73 "date": {date|json},
69 "size": {size|json},
74 "size": {size|json},
70 "flags": {permissions|json}
75 "flags": {permissions|json}
71 }'
76 }'
72 tags = '\{
77 tags = '\{
73 "node": {node|json},
78 "node": {node|json},
74 "tags": [{join(entriesnotip%tagentry, ", ")}]
79 "tags": [{join(entriesnotip%tagentry, ", ")}]
75 }'
80 }'
76 tagentry = '\{
81 tagentry = '\{
77 "tag": {tag|utf8|json},
82 "tag": {tag|utf8|json},
78 "node": {node|json},
83 "node": {node|json},
79 "date": {date|json}
84 "date": {date|json}
80 }'
85 }'
81 bookmarks = '\{
86 bookmarks = '\{
82 "node": {node|json},
87 "node": {node|json},
83 "bookmarks": [{join(entries%bookmarkentry, ", ")}]
88 "bookmarks": [{join(entries%bookmarkentry, ", ")}]
84 }'
89 }'
85 bookmarkentry = '\{
90 bookmarkentry = '\{
86 "bookmark": {bookmark|utf8|json},
91 "bookmark": {bookmark|utf8|json},
87 "node": {node|json},
92 "node": {node|json},
88 "date": {date|json}
93 "date": {date|json}
89 }'
94 }'
90 branches = '\{
95 branches = '\{
91 "branches": [{join(entries%branchentry, ", ")}]
96 "branches": [{join(entries%branchentry, ", ")}]
92 }'
97 }'
93 branchentry = '\{
98 branchentry = '\{
94 "branch": {branch|utf8|json},
99 "branch": {branch|utf8|json},
95 "node": {node|json},
100 "node": {node|json},
96 "date": {date|json},
101 "date": {date|json},
97 "status": {status|json}
102 "status": {status|json}
98 }'
103 }'
99 shortlogentry = '{changelistentry}'
104 shortlogentry = '{changelistentry}'
100 summary = '\{
105 summary = '\{
101 "node": {node|json},
106 "node": {node|json},
102 "lastchange": {lastchange|json},
107 "lastchange": {lastchange|json},
103 "bookmarks": [{join(bookmarks%bookmarkentry, ", ")}],
108 "bookmarks": [{join(bookmarks%bookmarkentry, ", ")}],
104 "branches": [{join(branches%branchentry, ", ")}],
109 "branches": [{join(branches%branchentry, ", ")}],
105 "shortlog": [{join(shortlog%shortlogentry, ", ")}],
110 "shortlog": [{join(shortlog%shortlogentry, ", ")}],
106 "tags": [{join(tags%tagentry, ", ")}],
111 "tags": [{join(tags%tagentry, ", ")}],
107 "archives": [{join(archives%archiveentry, ", ")}]
112 "archives": [{join(archives%archiveentry, ", ")}]
108 }'
113 }'
109 archiveentry = '\{
114 archiveentry = '\{
110 "node": {node|json},
115 "node": {node|json},
111 "extension": {extension|json},
116 "extension": {extension|json},
112 "type": {type|json}
117 "type": {type|json}
113 }'
118 }'
114 filediff = '\{
119 filediff = '\{
115 "path": {file|json},
120 "path": {file|json},
116 "node": {node|json},
121 "node": {node|json},
117 "date": {date|json},
122 "date": {date|json},
118 "desc": {desc|utf8|json},
123 "desc": {desc|utf8|json},
119 "author": {author|utf8|json},
124 "author": {author|utf8|json},
120 "parents": [{join(parent%changesetparent, ", ")}],
125 "parents": [{join(parent%changesetparent, ", ")}],
121 "children": [{join(child%changesetparent, ", ")}],
126 "children": [{join(child%changesetparent, ", ")}],
122 "diff": [{join(diff%diffblock, ", ")}]
127 "diff": [{join(diff%diffblock, ", ")}]
123 }'
128 }'
124 diffblock = '\{
129 diffblock = '\{
125 "blockno": {blockno|json},
130 "blockno": {blockno|json},
126 "lines": [{join(lines, ", ")}]
131 "lines": [{join(lines, ", ")}]
127 }'
132 }'
128 difflineplus = '\{
133 difflineplus = '\{
129 "t": "+",
134 "t": "+",
130 "n": {lineno|json},
135 "n": {lineno|json},
131 "l": {line|json}
136 "l": {line|json}
132 }'
137 }'
133 difflineminus = '\{
138 difflineminus = '\{
134 "t": "-",
139 "t": "-",
135 "n": {lineno|json},
140 "n": {lineno|json},
136 "l": {line|json}
141 "l": {line|json}
137 }'
142 }'
138 difflineat = '\{
143 difflineat = '\{
139 "t": "@",
144 "t": "@",
140 "n": {lineno|json},
145 "n": {lineno|json},
141 "l": {line|json}
146 "l": {line|json}
142 }'
147 }'
143 diffline = '\{
148 diffline = '\{
144 "t": "",
149 "t": "",
145 "n": {lineno|json},
150 "n": {lineno|json},
146 "l": {line|json}
151 "l": {line|json}
147 }'
152 }'
148 filecomparison = '\{
153 filecomparison = '\{
149 "path": {file|json},
154 "path": {file|json},
150 "node": {node|json},
155 "node": {node|json},
151 "date": {date|json},
156 "date": {date|json},
152 "desc": {desc|utf8|json},
157 "desc": {desc|utf8|json},
153 "author": {author|utf8|json},
158 "author": {author|utf8|json},
154 "parents": [{join(parent%changesetparent, ", ")}],
159 "parents": [{join(parent%changesetparent, ", ")}],
155 "children": [{join(child%changesetparent, ", ")}],
160 "children": [{join(child%changesetparent, ", ")}],
156 "leftnode": {leftnode|json},
161 "leftnode": {leftnode|json},
157 "rightnode": {rightnode|json},
162 "rightnode": {rightnode|json},
158 "comparison": [{join(comparison, ", ")}]
163 "comparison": [{join(comparison, ", ")}]
159 }'
164 }'
160 comparisonblock = '\{
165 comparisonblock = '\{
161 "lines": [{join(lines, ", ")}]
166 "lines": [{join(lines, ", ")}]
162 }'
167 }'
163 comparisonline = '\{
168 comparisonline = '\{
164 "t": {type|json},
169 "t": {type|json},
165 "ln": {leftlineno|json},
170 "ln": {leftlineno|json},
166 "ll": {leftline|json},
171 "ll": {leftline|json},
167 "rn": {rightlineno|json},
172 "rn": {rightlineno|json},
168 "rl": {rightline|json}
173 "rl": {rightline|json}
169 }'
174 }'
170 fileannotate = '\{
175 fileannotate = '\{
171 "abspath": {file|json},
176 "abspath": {file|json},
172 "node": {node|json},
177 "node": {node|json},
173 "author": {author|utf8|json},
178 "author": {author|utf8|json},
174 "date": {date|json},
179 "date": {date|json},
175 "desc": {desc|utf8|json},
180 "desc": {desc|utf8|json},
176 "parents": [{join(parent%changesetparent, ", ")}],
181 "parents": [{join(parent%changesetparent, ", ")}],
177 "children": [{join(child%changesetparent, ", ")}],
182 "children": [{join(child%changesetparent, ", ")}],
178 "permissions": {permissions|json},
183 "permissions": {permissions|json},
179 "annotate": [{join(annotate%fileannotation, ", ")}]
184 "annotate": [{join(annotate%fileannotation, ", ")}]
180 }'
185 }'
181 fileannotation = '\{
186 fileannotation = '\{
182 "node": {node|json},
187 "node": {node|json},
183 "author": {author|utf8|json},
188 "author": {author|utf8|json},
184 "desc": {desc|utf8|json},
189 "desc": {desc|utf8|json},
185 "abspath": {file|json},
190 "abspath": {file|json},
186 "targetline": {targetline|json},
191 "targetline": {targetline|json},
187 "line": {line|json},
192 "line": {line|json},
188 "lineno": {lineno|json},
193 "lineno": {lineno|json},
189 "revdate": {revdate|json}
194 "revdate": {revdate|json}
190 }'
195 }'
191 filelog = '\{
196 filelog = '\{
192 "entries": [{join(entries%changelistentry, ", ")}]
197 "entries": [{join(entries%changelistentry, ", ")}]
193 }'
198 }'
194 graph = '"not yet implemented"'
199 graph = '"not yet implemented"'
195 helptopics = '\{
200 helptopics = '\{
196 "topics": [{join(topics%helptopicentry, ", ")}],
201 "topics": [{join(topics%helptopicentry, ", ")}],
197 "earlycommands": [{join(earlycommands%helptopicentry, ", ")}],
202 "earlycommands": [{join(earlycommands%helptopicentry, ", ")}],
198 "othercommands": [{join(othercommands%helptopicentry, ", ")}]
203 "othercommands": [{join(othercommands%helptopicentry, ", ")}]
199 }'
204 }'
200 helptopicentry = '\{
205 helptopicentry = '\{
201 "topic": {topic|utf8|json},
206 "topic": {topic|utf8|json},
202 "summary": {summary|utf8|json}
207 "summary": {summary|utf8|json}
203 }'
208 }'
204 help = '\{
209 help = '\{
205 "topic": {topic|utf8|json},
210 "topic": {topic|utf8|json},
206 "rawdoc": {doc|utf8|json}
211 "rawdoc": {doc|utf8|json}
207 }'
212 }'
208 filenodelink = ''
213 filenodelink = ''
209 filenolink = ''
214 filenolink = ''
210 index = '\{
215 index = '\{
211 "entries": [{join(entries%indexentry, ", ")}]
216 "entries": [{join(entries%indexentry, ", ")}]
212 }'
217 }'
213 indexentry = '\{
218 indexentry = '\{
214 "name": {name|utf8|json},
219 "name": {name|utf8|json},
215 "description": {description|utf8|json},
220 "description": {description|utf8|json},
216 "contact": {contact|utf8|json},
221 "contact": {contact|utf8|json},
217 "lastchange": {lastchange|json}
222 "lastchange": {lastchange|json}
218 }'
223 }'
@@ -1,1572 +1,1632 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 $ hg serve -p $HGPORT -d --pid-file=hg.pid -A access.log -E error.log
103 $ hg serve -p $HGPORT -d --pid-file=hg.pid -A access.log -E error.log
104 $ cat hg.pid >> $DAEMON_PIDS
104 $ cat hg.pid >> $DAEMON_PIDS
105
105
106 (Try to keep these in roughly the order they are defined in webcommands.py)
106 (Try to keep these in roughly the order they are defined in webcommands.py)
107
107
108 (log is handled by filelog/ and changelog/ - ignore it)
108 (log is handled by filelog/ and changelog/ - ignore it)
109
109
110 (rawfile/ doesn't use templating - nothing to test)
110 (rawfile/ doesn't use templating - nothing to test)
111
111
112 file/{revision}/{path} shows file revision
112 file/{revision}/{path} shows file revision
113
113
114 $ request json-file/78896eb0e102/foo-new
114 $ request json-file/78896eb0e102/foo-new
115 200 Script output follows
115 200 Script output follows
116
116
117 {
117 {
118 "bookmarks": [],
118 "bookmarks": [],
119 "branch": "default",
119 "branch": "default",
120 "date": [
120 "date": [
121 0.0,
121 0.0,
122 0
122 0
123 ],
123 ],
124 "desc": "move foo",
124 "desc": "move foo",
125 "lines": [
125 "lines": [
126 {
126 {
127 "line": "bar\n"
127 "line": "bar\n"
128 }
128 }
129 ],
129 ],
130 "node": "78896eb0e102174ce9278438a95e12543e4367a7",
130 "node": "78896eb0e102174ce9278438a95e12543e4367a7",
131 "parents": [
131 "parents": [
132 "f8bbb9024b10f93cdbb8d940337398291d40dea8"
132 "f8bbb9024b10f93cdbb8d940337398291d40dea8"
133 ],
133 ],
134 "path": "foo-new",
134 "path": "foo-new",
135 "phase": "public",
135 "phase": "public",
136 "tags": [
136 "tags": [
137 "tag1"
137 "tag1"
138 ],
138 ],
139 "user": "test"
139 "user": "test"
140 }
140 }
141
141
142 file/{revision} shows root directory info
142 file/{revision} shows root directory info
143
143
144 $ request json-file/cc725e08502a
144 $ request json-file/cc725e08502a
145 200 Script output follows
145 200 Script output follows
146
146
147 {
147 {
148 "abspath": "/",
148 "abspath": "/",
149 "bookmarks": [],
149 "bookmarks": [],
150 "directories": [
150 "directories": [
151 {
151 {
152 "abspath": "/da",
152 "abspath": "/da",
153 "basename": "da",
153 "basename": "da",
154 "emptydirs": ""
154 "emptydirs": ""
155 }
155 }
156 ],
156 ],
157 "files": [
157 "files": [
158 {
158 {
159 "abspath": ".hgtags",
159 "abspath": ".hgtags",
160 "basename": ".hgtags",
160 "basename": ".hgtags",
161 "date": [
161 "date": [
162 0.0,
162 0.0,
163 0
163 0
164 ],
164 ],
165 "flags": "",
165 "flags": "",
166 "size": 92
166 "size": 92
167 },
167 },
168 {
168 {
169 "abspath": "foo-new",
169 "abspath": "foo-new",
170 "basename": "foo-new",
170 "basename": "foo-new",
171 "date": [
171 "date": [
172 0.0,
172 0.0,
173 0
173 0
174 ],
174 ],
175 "flags": "",
175 "flags": "",
176 "size": 4
176 "size": 4
177 }
177 }
178 ],
178 ],
179 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
179 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
180 "tags": [
180 "tags": [
181 "tip"
181 "tip"
182 ]
182 ]
183 }
183 }
184
184
185 changelog/ shows information about several changesets
185 changelog/ shows information about several changesets
186
186
187 $ request json-changelog
187 $ request json-changelog
188 200 Script output follows
188 200 Script output follows
189
189
190 {
190 {
191 "changeset_count": 10,
191 "changeset_count": 10,
192 "changesets": [
192 "changesets": [
193 {
193 {
194 "bookmarks": [],
194 "bookmarks": [],
195 "branch": "default",
195 "branch": "default",
196 "date": [
196 "date": [
197 0.0,
197 0.0,
198 0
198 0
199 ],
199 ],
200 "desc": "merge test-branch into default",
200 "desc": "merge test-branch into default",
201 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
201 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
202 "parents": [
202 "parents": [
203 "ceed296fe500c3fac9541e31dad860cb49c89e45",
203 "ceed296fe500c3fac9541e31dad860cb49c89e45",
204 "ed66c30e87eb65337c05a4229efaa5f1d5285a90"
204 "ed66c30e87eb65337c05a4229efaa5f1d5285a90"
205 ],
205 ],
206 "phase": "draft",
206 "phase": "draft",
207 "tags": [
207 "tags": [
208 "tip"
208 "tip"
209 ],
209 ],
210 "user": "test"
210 "user": "test"
211 },
211 },
212 {
212 {
213 "bookmarks": [],
213 "bookmarks": [],
214 "branch": "test-branch",
214 "branch": "test-branch",
215 "date": [
215 "date": [
216 0.0,
216 0.0,
217 0
217 0
218 ],
218 ],
219 "desc": "another commit in test-branch",
219 "desc": "another commit in test-branch",
220 "node": "ed66c30e87eb65337c05a4229efaa5f1d5285a90",
220 "node": "ed66c30e87eb65337c05a4229efaa5f1d5285a90",
221 "parents": [
221 "parents": [
222 "6ab967a8ab3489227a83f80e920faa039a71819f"
222 "6ab967a8ab3489227a83f80e920faa039a71819f"
223 ],
223 ],
224 "phase": "draft",
224 "phase": "draft",
225 "tags": [],
225 "tags": [],
226 "user": "test"
226 "user": "test"
227 },
227 },
228 {
228 {
229 "bookmarks": [],
229 "bookmarks": [],
230 "branch": "test-branch",
230 "branch": "test-branch",
231 "date": [
231 "date": [
232 0.0,
232 0.0,
233 0
233 0
234 ],
234 ],
235 "desc": "create test branch",
235 "desc": "create test branch",
236 "node": "6ab967a8ab3489227a83f80e920faa039a71819f",
236 "node": "6ab967a8ab3489227a83f80e920faa039a71819f",
237 "parents": [
237 "parents": [
238 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
238 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
239 ],
239 ],
240 "phase": "draft",
240 "phase": "draft",
241 "tags": [],
241 "tags": [],
242 "user": "test"
242 "user": "test"
243 },
243 },
244 {
244 {
245 "bookmarks": [
245 "bookmarks": [
246 "bookmark2"
246 "bookmark2"
247 ],
247 ],
248 "branch": "default",
248 "branch": "default",
249 "date": [
249 "date": [
250 0.0,
250 0.0,
251 0
251 0
252 ],
252 ],
253 "desc": "create tag2",
253 "desc": "create tag2",
254 "node": "ceed296fe500c3fac9541e31dad860cb49c89e45",
254 "node": "ceed296fe500c3fac9541e31dad860cb49c89e45",
255 "parents": [
255 "parents": [
256 "f2890a05fea49bfaf9fb27ed5490894eba32da78"
256 "f2890a05fea49bfaf9fb27ed5490894eba32da78"
257 ],
257 ],
258 "phase": "draft",
258 "phase": "draft",
259 "tags": [],
259 "tags": [],
260 "user": "test"
260 "user": "test"
261 },
261 },
262 {
262 {
263 "bookmarks": [],
263 "bookmarks": [],
264 "branch": "default",
264 "branch": "default",
265 "date": [
265 "date": [
266 0.0,
266 0.0,
267 0
267 0
268 ],
268 ],
269 "desc": "another commit to da/foo",
269 "desc": "another commit to da/foo",
270 "node": "f2890a05fea49bfaf9fb27ed5490894eba32da78",
270 "node": "f2890a05fea49bfaf9fb27ed5490894eba32da78",
271 "parents": [
271 "parents": [
272 "93a8ce14f89156426b7fa981af8042da53f03aa0"
272 "93a8ce14f89156426b7fa981af8042da53f03aa0"
273 ],
273 ],
274 "phase": "draft",
274 "phase": "draft",
275 "tags": [
275 "tags": [
276 "tag2"
276 "tag2"
277 ],
277 ],
278 "user": "test"
278 "user": "test"
279 },
279 },
280 {
280 {
281 "bookmarks": [],
281 "bookmarks": [],
282 "branch": "default",
282 "branch": "default",
283 "date": [
283 "date": [
284 0.0,
284 0.0,
285 0
285 0
286 ],
286 ],
287 "desc": "create tag",
287 "desc": "create tag",
288 "node": "93a8ce14f89156426b7fa981af8042da53f03aa0",
288 "node": "93a8ce14f89156426b7fa981af8042da53f03aa0",
289 "parents": [
289 "parents": [
290 "78896eb0e102174ce9278438a95e12543e4367a7"
290 "78896eb0e102174ce9278438a95e12543e4367a7"
291 ],
291 ],
292 "phase": "public",
292 "phase": "public",
293 "tags": [],
293 "tags": [],
294 "user": "test"
294 "user": "test"
295 },
295 },
296 {
296 {
297 "bookmarks": [],
297 "bookmarks": [],
298 "branch": "default",
298 "branch": "default",
299 "date": [
299 "date": [
300 0.0,
300 0.0,
301 0
301 0
302 ],
302 ],
303 "desc": "move foo",
303 "desc": "move foo",
304 "node": "78896eb0e102174ce9278438a95e12543e4367a7",
304 "node": "78896eb0e102174ce9278438a95e12543e4367a7",
305 "parents": [
305 "parents": [
306 "8d7c456572acf3557e8ed8a07286b10c408bcec5"
306 "8d7c456572acf3557e8ed8a07286b10c408bcec5"
307 ],
307 ],
308 "phase": "public",
308 "phase": "public",
309 "tags": [
309 "tags": [
310 "tag1"
310 "tag1"
311 ],
311 ],
312 "user": "test"
312 "user": "test"
313 },
313 },
314 {
314 {
315 "bookmarks": [
315 "bookmarks": [
316 "bookmark1"
316 "bookmark1"
317 ],
317 ],
318 "branch": "default",
318 "branch": "default",
319 "date": [
319 "date": [
320 0.0,
320 0.0,
321 0
321 0
322 ],
322 ],
323 "desc": "modify da/foo",
323 "desc": "modify da/foo",
324 "node": "8d7c456572acf3557e8ed8a07286b10c408bcec5",
324 "node": "8d7c456572acf3557e8ed8a07286b10c408bcec5",
325 "parents": [
325 "parents": [
326 "f8bbb9024b10f93cdbb8d940337398291d40dea8"
326 "f8bbb9024b10f93cdbb8d940337398291d40dea8"
327 ],
327 ],
328 "phase": "public",
328 "phase": "public",
329 "tags": [],
329 "tags": [],
330 "user": "test"
330 "user": "test"
331 },
331 },
332 {
332 {
333 "bookmarks": [],
333 "bookmarks": [],
334 "branch": "default",
334 "branch": "default",
335 "date": [
335 "date": [
336 0.0,
336 0.0,
337 0
337 0
338 ],
338 ],
339 "desc": "modify foo",
339 "desc": "modify foo",
340 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
340 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
341 "parents": [
341 "parents": [
342 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
342 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
343 ],
343 ],
344 "phase": "public",
344 "phase": "public",
345 "tags": [],
345 "tags": [],
346 "user": "test"
346 "user": "test"
347 },
347 },
348 {
348 {
349 "bookmarks": [],
349 "bookmarks": [],
350 "branch": "default",
350 "branch": "default",
351 "date": [
351 "date": [
352 0.0,
352 0.0,
353 0
353 0
354 ],
354 ],
355 "desc": "initial",
355 "desc": "initial",
356 "node": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
356 "node": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
357 "parents": [],
357 "parents": [],
358 "phase": "public",
358 "phase": "public",
359 "tags": [],
359 "tags": [],
360 "user": "test"
360 "user": "test"
361 }
361 }
362 ],
362 ],
363 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7"
363 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7"
364 }
364 }
365
365
366 changelog/{revision} shows information starting at a specific changeset
366 changelog/{revision} shows information starting at a specific changeset
367
367
368 $ request json-changelog/f8bbb9024b10
368 $ request json-changelog/f8bbb9024b10
369 200 Script output follows
369 200 Script output follows
370
370
371 {
371 {
372 "changeset_count": 10,
372 "changeset_count": 10,
373 "changesets": [
373 "changesets": [
374 {
374 {
375 "bookmarks": [],
375 "bookmarks": [],
376 "branch": "default",
376 "branch": "default",
377 "date": [
377 "date": [
378 0.0,
378 0.0,
379 0
379 0
380 ],
380 ],
381 "desc": "modify foo",
381 "desc": "modify foo",
382 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
382 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
383 "parents": [
383 "parents": [
384 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
384 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
385 ],
385 ],
386 "phase": "public",
386 "phase": "public",
387 "tags": [],
387 "tags": [],
388 "user": "test"
388 "user": "test"
389 },
389 },
390 {
390 {
391 "bookmarks": [],
391 "bookmarks": [],
392 "branch": "default",
392 "branch": "default",
393 "date": [
393 "date": [
394 0.0,
394 0.0,
395 0
395 0
396 ],
396 ],
397 "desc": "initial",
397 "desc": "initial",
398 "node": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
398 "node": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
399 "parents": [],
399 "parents": [],
400 "phase": "public",
400 "phase": "public",
401 "tags": [],
401 "tags": [],
402 "user": "test"
402 "user": "test"
403 }
403 }
404 ],
404 ],
405 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8"
405 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8"
406 }
406 }
407
407
408 shortlog/ shows information about a set of changesets
408 shortlog/ shows information about a set of changesets
409
409
410 $ request json-shortlog
410 $ request json-shortlog
411 200 Script output follows
411 200 Script output follows
412
412
413 {
413 {
414 "changeset_count": 10,
414 "changeset_count": 10,
415 "changesets": [
415 "changesets": [
416 {
416 {
417 "bookmarks": [],
417 "bookmarks": [],
418 "branch": "default",
418 "branch": "default",
419 "date": [
419 "date": [
420 0.0,
420 0.0,
421 0
421 0
422 ],
422 ],
423 "desc": "merge test-branch into default",
423 "desc": "merge test-branch into default",
424 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
424 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
425 "parents": [
425 "parents": [
426 "ceed296fe500c3fac9541e31dad860cb49c89e45",
426 "ceed296fe500c3fac9541e31dad860cb49c89e45",
427 "ed66c30e87eb65337c05a4229efaa5f1d5285a90"
427 "ed66c30e87eb65337c05a4229efaa5f1d5285a90"
428 ],
428 ],
429 "phase": "draft",
429 "phase": "draft",
430 "tags": [
430 "tags": [
431 "tip"
431 "tip"
432 ],
432 ],
433 "user": "test"
433 "user": "test"
434 },
434 },
435 {
435 {
436 "bookmarks": [],
436 "bookmarks": [],
437 "branch": "test-branch",
437 "branch": "test-branch",
438 "date": [
438 "date": [
439 0.0,
439 0.0,
440 0
440 0
441 ],
441 ],
442 "desc": "another commit in test-branch",
442 "desc": "another commit in test-branch",
443 "node": "ed66c30e87eb65337c05a4229efaa5f1d5285a90",
443 "node": "ed66c30e87eb65337c05a4229efaa5f1d5285a90",
444 "parents": [
444 "parents": [
445 "6ab967a8ab3489227a83f80e920faa039a71819f"
445 "6ab967a8ab3489227a83f80e920faa039a71819f"
446 ],
446 ],
447 "phase": "draft",
447 "phase": "draft",
448 "tags": [],
448 "tags": [],
449 "user": "test"
449 "user": "test"
450 },
450 },
451 {
451 {
452 "bookmarks": [],
452 "bookmarks": [],
453 "branch": "test-branch",
453 "branch": "test-branch",
454 "date": [
454 "date": [
455 0.0,
455 0.0,
456 0
456 0
457 ],
457 ],
458 "desc": "create test branch",
458 "desc": "create test branch",
459 "node": "6ab967a8ab3489227a83f80e920faa039a71819f",
459 "node": "6ab967a8ab3489227a83f80e920faa039a71819f",
460 "parents": [
460 "parents": [
461 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
461 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
462 ],
462 ],
463 "phase": "draft",
463 "phase": "draft",
464 "tags": [],
464 "tags": [],
465 "user": "test"
465 "user": "test"
466 },
466 },
467 {
467 {
468 "bookmarks": [
468 "bookmarks": [
469 "bookmark2"
469 "bookmark2"
470 ],
470 ],
471 "branch": "default",
471 "branch": "default",
472 "date": [
472 "date": [
473 0.0,
473 0.0,
474 0
474 0
475 ],
475 ],
476 "desc": "create tag2",
476 "desc": "create tag2",
477 "node": "ceed296fe500c3fac9541e31dad860cb49c89e45",
477 "node": "ceed296fe500c3fac9541e31dad860cb49c89e45",
478 "parents": [
478 "parents": [
479 "f2890a05fea49bfaf9fb27ed5490894eba32da78"
479 "f2890a05fea49bfaf9fb27ed5490894eba32da78"
480 ],
480 ],
481 "phase": "draft",
481 "phase": "draft",
482 "tags": [],
482 "tags": [],
483 "user": "test"
483 "user": "test"
484 },
484 },
485 {
485 {
486 "bookmarks": [],
486 "bookmarks": [],
487 "branch": "default",
487 "branch": "default",
488 "date": [
488 "date": [
489 0.0,
489 0.0,
490 0
490 0
491 ],
491 ],
492 "desc": "another commit to da/foo",
492 "desc": "another commit to da/foo",
493 "node": "f2890a05fea49bfaf9fb27ed5490894eba32da78",
493 "node": "f2890a05fea49bfaf9fb27ed5490894eba32da78",
494 "parents": [
494 "parents": [
495 "93a8ce14f89156426b7fa981af8042da53f03aa0"
495 "93a8ce14f89156426b7fa981af8042da53f03aa0"
496 ],
496 ],
497 "phase": "draft",
497 "phase": "draft",
498 "tags": [
498 "tags": [
499 "tag2"
499 "tag2"
500 ],
500 ],
501 "user": "test"
501 "user": "test"
502 },
502 },
503 {
503 {
504 "bookmarks": [],
504 "bookmarks": [],
505 "branch": "default",
505 "branch": "default",
506 "date": [
506 "date": [
507 0.0,
507 0.0,
508 0
508 0
509 ],
509 ],
510 "desc": "create tag",
510 "desc": "create tag",
511 "node": "93a8ce14f89156426b7fa981af8042da53f03aa0",
511 "node": "93a8ce14f89156426b7fa981af8042da53f03aa0",
512 "parents": [
512 "parents": [
513 "78896eb0e102174ce9278438a95e12543e4367a7"
513 "78896eb0e102174ce9278438a95e12543e4367a7"
514 ],
514 ],
515 "phase": "public",
515 "phase": "public",
516 "tags": [],
516 "tags": [],
517 "user": "test"
517 "user": "test"
518 },
518 },
519 {
519 {
520 "bookmarks": [],
520 "bookmarks": [],
521 "branch": "default",
521 "branch": "default",
522 "date": [
522 "date": [
523 0.0,
523 0.0,
524 0
524 0
525 ],
525 ],
526 "desc": "move foo",
526 "desc": "move foo",
527 "node": "78896eb0e102174ce9278438a95e12543e4367a7",
527 "node": "78896eb0e102174ce9278438a95e12543e4367a7",
528 "parents": [
528 "parents": [
529 "8d7c456572acf3557e8ed8a07286b10c408bcec5"
529 "8d7c456572acf3557e8ed8a07286b10c408bcec5"
530 ],
530 ],
531 "phase": "public",
531 "phase": "public",
532 "tags": [
532 "tags": [
533 "tag1"
533 "tag1"
534 ],
534 ],
535 "user": "test"
535 "user": "test"
536 },
536 },
537 {
537 {
538 "bookmarks": [
538 "bookmarks": [
539 "bookmark1"
539 "bookmark1"
540 ],
540 ],
541 "branch": "default",
541 "branch": "default",
542 "date": [
542 "date": [
543 0.0,
543 0.0,
544 0
544 0
545 ],
545 ],
546 "desc": "modify da/foo",
546 "desc": "modify da/foo",
547 "node": "8d7c456572acf3557e8ed8a07286b10c408bcec5",
547 "node": "8d7c456572acf3557e8ed8a07286b10c408bcec5",
548 "parents": [
548 "parents": [
549 "f8bbb9024b10f93cdbb8d940337398291d40dea8"
549 "f8bbb9024b10f93cdbb8d940337398291d40dea8"
550 ],
550 ],
551 "phase": "public",
551 "phase": "public",
552 "tags": [],
552 "tags": [],
553 "user": "test"
553 "user": "test"
554 },
554 },
555 {
555 {
556 "bookmarks": [],
556 "bookmarks": [],
557 "branch": "default",
557 "branch": "default",
558 "date": [
558 "date": [
559 0.0,
559 0.0,
560 0
560 0
561 ],
561 ],
562 "desc": "modify foo",
562 "desc": "modify foo",
563 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
563 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
564 "parents": [
564 "parents": [
565 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
565 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
566 ],
566 ],
567 "phase": "public",
567 "phase": "public",
568 "tags": [],
568 "tags": [],
569 "user": "test"
569 "user": "test"
570 },
570 },
571 {
571 {
572 "bookmarks": [],
572 "bookmarks": [],
573 "branch": "default",
573 "branch": "default",
574 "date": [
574 "date": [
575 0.0,
575 0.0,
576 0
576 0
577 ],
577 ],
578 "desc": "initial",
578 "desc": "initial",
579 "node": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
579 "node": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
580 "parents": [],
580 "parents": [],
581 "phase": "public",
581 "phase": "public",
582 "tags": [],
582 "tags": [],
583 "user": "test"
583 "user": "test"
584 }
584 }
585 ],
585 ],
586 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7"
586 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7"
587 }
587 }
588
588
589 changeset/ renders the tip changeset
589 changeset/ renders the tip changeset
590
590
591 $ request json-rev
591 $ request json-rev
592 200 Script output follows
592 200 Script output follows
593
593
594 {
594 {
595 "bookmarks": [],
595 "bookmarks": [],
596 "branch": "default",
596 "branch": "default",
597 "date": [
597 "date": [
598 0.0,
598 0.0,
599 0
599 0
600 ],
600 ],
601 "desc": "merge test-branch into default",
601 "desc": "merge test-branch into default",
602 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
602 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
603 "parents": [
603 "parents": [
604 "ceed296fe500c3fac9541e31dad860cb49c89e45",
604 "ceed296fe500c3fac9541e31dad860cb49c89e45",
605 "ed66c30e87eb65337c05a4229efaa5f1d5285a90"
605 "ed66c30e87eb65337c05a4229efaa5f1d5285a90"
606 ],
606 ],
607 "phase": "draft",
607 "phase": "draft",
608 "tags": [
608 "tags": [
609 "tip"
609 "tip"
610 ],
610 ],
611 "user": "test"
611 "user": "test"
612 }
612 }
613
613
614 changeset/{revision} shows tags
614 changeset/{revision} shows tags
615
615
616 $ request json-rev/78896eb0e102
616 $ request json-rev/78896eb0e102
617 200 Script output follows
617 200 Script output follows
618
618
619 {
619 {
620 "bookmarks": [],
620 "bookmarks": [],
621 "branch": "default",
621 "branch": "default",
622 "date": [
622 "date": [
623 0.0,
623 0.0,
624 0
624 0
625 ],
625 ],
626 "desc": "move foo",
626 "desc": "move foo",
627 "node": "78896eb0e102174ce9278438a95e12543e4367a7",
627 "node": "78896eb0e102174ce9278438a95e12543e4367a7",
628 "parents": [
628 "parents": [
629 "8d7c456572acf3557e8ed8a07286b10c408bcec5"
629 "8d7c456572acf3557e8ed8a07286b10c408bcec5"
630 ],
630 ],
631 "phase": "public",
631 "phase": "public",
632 "tags": [
632 "tags": [
633 "tag1"
633 "tag1"
634 ],
634 ],
635 "user": "test"
635 "user": "test"
636 }
636 }
637
637
638 changeset/{revision} shows bookmarks
638 changeset/{revision} shows bookmarks
639
639
640 $ request json-rev/8d7c456572ac
640 $ request json-rev/8d7c456572ac
641 200 Script output follows
641 200 Script output follows
642
642
643 {
643 {
644 "bookmarks": [
644 "bookmarks": [
645 "bookmark1"
645 "bookmark1"
646 ],
646 ],
647 "branch": "default",
647 "branch": "default",
648 "date": [
648 "date": [
649 0.0,
649 0.0,
650 0
650 0
651 ],
651 ],
652 "desc": "modify da/foo",
652 "desc": "modify da/foo",
653 "node": "8d7c456572acf3557e8ed8a07286b10c408bcec5",
653 "node": "8d7c456572acf3557e8ed8a07286b10c408bcec5",
654 "parents": [
654 "parents": [
655 "f8bbb9024b10f93cdbb8d940337398291d40dea8"
655 "f8bbb9024b10f93cdbb8d940337398291d40dea8"
656 ],
656 ],
657 "phase": "public",
657 "phase": "public",
658 "tags": [],
658 "tags": [],
659 "user": "test"
659 "user": "test"
660 }
660 }
661
661
662 changeset/{revision} shows branches
662 changeset/{revision} shows branches
663
663
664 $ request json-rev/6ab967a8ab34
664 $ request json-rev/6ab967a8ab34
665 200 Script output follows
665 200 Script output follows
666
666
667 {
667 {
668 "bookmarks": [],
668 "bookmarks": [],
669 "branch": "test-branch",
669 "branch": "test-branch",
670 "date": [
670 "date": [
671 0.0,
671 0.0,
672 0
672 0
673 ],
673 ],
674 "desc": "create test branch",
674 "desc": "create test branch",
675 "node": "6ab967a8ab3489227a83f80e920faa039a71819f",
675 "node": "6ab967a8ab3489227a83f80e920faa039a71819f",
676 "parents": [
676 "parents": [
677 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
677 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
678 ],
678 ],
679 "phase": "draft",
679 "phase": "draft",
680 "tags": [],
680 "tags": [],
681 "user": "test"
681 "user": "test"
682 }
682 }
683
683
684 manifest/{revision}/{path} shows info about a directory at a revision
684 manifest/{revision}/{path} shows info about a directory at a revision
685
685
686 $ request json-manifest/06e557f3edf6/
686 $ request json-manifest/06e557f3edf6/
687 200 Script output follows
687 200 Script output follows
688
688
689 {
689 {
690 "abspath": "/",
690 "abspath": "/",
691 "bookmarks": [],
691 "bookmarks": [],
692 "directories": [
692 "directories": [
693 {
693 {
694 "abspath": "/da",
694 "abspath": "/da",
695 "basename": "da",
695 "basename": "da",
696 "emptydirs": ""
696 "emptydirs": ""
697 }
697 }
698 ],
698 ],
699 "files": [
699 "files": [
700 {
700 {
701 "abspath": "foo",
701 "abspath": "foo",
702 "basename": "foo",
702 "basename": "foo",
703 "date": [
703 "date": [
704 0.0,
704 0.0,
705 0
705 0
706 ],
706 ],
707 "flags": "",
707 "flags": "",
708 "size": 4
708 "size": 4
709 }
709 }
710 ],
710 ],
711 "node": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
711 "node": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
712 "tags": []
712 "tags": []
713 }
713 }
714
714
715 tags/ shows tags info
715 tags/ shows tags info
716
716
717 $ request json-tags
717 $ request json-tags
718 200 Script output follows
718 200 Script output follows
719
719
720 {
720 {
721 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
721 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
722 "tags": [
722 "tags": [
723 {
723 {
724 "date": [
724 "date": [
725 0.0,
725 0.0,
726 0
726 0
727 ],
727 ],
728 "node": "f2890a05fea49bfaf9fb27ed5490894eba32da78",
728 "node": "f2890a05fea49bfaf9fb27ed5490894eba32da78",
729 "tag": "tag2"
729 "tag": "tag2"
730 },
730 },
731 {
731 {
732 "date": [
732 "date": [
733 0.0,
733 0.0,
734 0
734 0
735 ],
735 ],
736 "node": "78896eb0e102174ce9278438a95e12543e4367a7",
736 "node": "78896eb0e102174ce9278438a95e12543e4367a7",
737 "tag": "tag1"
737 "tag": "tag1"
738 }
738 }
739 ]
739 ]
740 }
740 }
741
741
742 bookmarks/ shows bookmarks info
742 bookmarks/ shows bookmarks info
743
743
744 $ request json-bookmarks
744 $ request json-bookmarks
745 200 Script output follows
745 200 Script output follows
746
746
747 {
747 {
748 "bookmarks": [
748 "bookmarks": [
749 {
749 {
750 "bookmark": "bookmark2",
750 "bookmark": "bookmark2",
751 "date": [
751 "date": [
752 0.0,
752 0.0,
753 0
753 0
754 ],
754 ],
755 "node": "ceed296fe500c3fac9541e31dad860cb49c89e45"
755 "node": "ceed296fe500c3fac9541e31dad860cb49c89e45"
756 },
756 },
757 {
757 {
758 "bookmark": "bookmark1",
758 "bookmark": "bookmark1",
759 "date": [
759 "date": [
760 0.0,
760 0.0,
761 0
761 0
762 ],
762 ],
763 "node": "8d7c456572acf3557e8ed8a07286b10c408bcec5"
763 "node": "8d7c456572acf3557e8ed8a07286b10c408bcec5"
764 }
764 }
765 ],
765 ],
766 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7"
766 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7"
767 }
767 }
768
768
769 branches/ shows branches info
769 branches/ shows branches info
770
770
771 $ request json-branches
771 $ request json-branches
772 200 Script output follows
772 200 Script output follows
773
773
774 {
774 {
775 "branches": [
775 "branches": [
776 {
776 {
777 "branch": "default",
777 "branch": "default",
778 "date": [
778 "date": [
779 0.0,
779 0.0,
780 0
780 0
781 ],
781 ],
782 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
782 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
783 "status": "open"
783 "status": "open"
784 },
784 },
785 {
785 {
786 "branch": "test-branch",
786 "branch": "test-branch",
787 "date": [
787 "date": [
788 0.0,
788 0.0,
789 0
789 0
790 ],
790 ],
791 "node": "ed66c30e87eb65337c05a4229efaa5f1d5285a90",
791 "node": "ed66c30e87eb65337c05a4229efaa5f1d5285a90",
792 "status": "inactive"
792 "status": "inactive"
793 }
793 }
794 ]
794 ]
795 }
795 }
796
796
797 summary/ shows a summary of repository state
797 summary/ shows a summary of repository state
798
798
799 $ request json-summary
799 $ request json-summary
800 200 Script output follows
800 200 Script output follows
801
801
802 {
802 {
803 "archives": [],
803 "archives": [],
804 "bookmarks": [
804 "bookmarks": [
805 {
805 {
806 "bookmark": "bookmark2",
806 "bookmark": "bookmark2",
807 "date": [
807 "date": [
808 0.0,
808 0.0,
809 0
809 0
810 ],
810 ],
811 "node": "ceed296fe500c3fac9541e31dad860cb49c89e45"
811 "node": "ceed296fe500c3fac9541e31dad860cb49c89e45"
812 },
812 },
813 {
813 {
814 "bookmark": "bookmark1",
814 "bookmark": "bookmark1",
815 "date": [
815 "date": [
816 0.0,
816 0.0,
817 0
817 0
818 ],
818 ],
819 "node": "8d7c456572acf3557e8ed8a07286b10c408bcec5"
819 "node": "8d7c456572acf3557e8ed8a07286b10c408bcec5"
820 }
820 }
821 ],
821 ],
822 "branches": [
822 "branches": [
823 {
823 {
824 "branch": "default",
824 "branch": "default",
825 "date": [
825 "date": [
826 0.0,
826 0.0,
827 0
827 0
828 ],
828 ],
829 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
829 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
830 "status": "open"
830 "status": "open"
831 },
831 },
832 {
832 {
833 "branch": "test-branch",
833 "branch": "test-branch",
834 "date": [
834 "date": [
835 0.0,
835 0.0,
836 0
836 0
837 ],
837 ],
838 "node": "ed66c30e87eb65337c05a4229efaa5f1d5285a90",
838 "node": "ed66c30e87eb65337c05a4229efaa5f1d5285a90",
839 "status": "inactive"
839 "status": "inactive"
840 }
840 }
841 ],
841 ],
842 "lastchange": [
842 "lastchange": [
843 0.0,
843 0.0,
844 0
844 0
845 ],
845 ],
846 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
846 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
847 "shortlog": [
847 "shortlog": [
848 {
848 {
849 "bookmarks": [],
849 "bookmarks": [],
850 "branch": "default",
850 "branch": "default",
851 "date": [
851 "date": [
852 0.0,
852 0.0,
853 0
853 0
854 ],
854 ],
855 "desc": "merge test-branch into default",
855 "desc": "merge test-branch into default",
856 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
856 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
857 "parents": [
857 "parents": [
858 "ceed296fe500c3fac9541e31dad860cb49c89e45",
858 "ceed296fe500c3fac9541e31dad860cb49c89e45",
859 "ed66c30e87eb65337c05a4229efaa5f1d5285a90"
859 "ed66c30e87eb65337c05a4229efaa5f1d5285a90"
860 ],
860 ],
861 "phase": "draft",
861 "phase": "draft",
862 "tags": [
862 "tags": [
863 "tip"
863 "tip"
864 ],
864 ],
865 "user": "test"
865 "user": "test"
866 },
866 },
867 {
867 {
868 "bookmarks": [],
868 "bookmarks": [],
869 "branch": "test-branch",
869 "branch": "test-branch",
870 "date": [
870 "date": [
871 0.0,
871 0.0,
872 0
872 0
873 ],
873 ],
874 "desc": "another commit in test-branch",
874 "desc": "another commit in test-branch",
875 "node": "ed66c30e87eb65337c05a4229efaa5f1d5285a90",
875 "node": "ed66c30e87eb65337c05a4229efaa5f1d5285a90",
876 "parents": [
876 "parents": [
877 "6ab967a8ab3489227a83f80e920faa039a71819f"
877 "6ab967a8ab3489227a83f80e920faa039a71819f"
878 ],
878 ],
879 "phase": "draft",
879 "phase": "draft",
880 "tags": [],
880 "tags": [],
881 "user": "test"
881 "user": "test"
882 },
882 },
883 {
883 {
884 "bookmarks": [],
884 "bookmarks": [],
885 "branch": "test-branch",
885 "branch": "test-branch",
886 "date": [
886 "date": [
887 0.0,
887 0.0,
888 0
888 0
889 ],
889 ],
890 "desc": "create test branch",
890 "desc": "create test branch",
891 "node": "6ab967a8ab3489227a83f80e920faa039a71819f",
891 "node": "6ab967a8ab3489227a83f80e920faa039a71819f",
892 "parents": [
892 "parents": [
893 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
893 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
894 ],
894 ],
895 "phase": "draft",
895 "phase": "draft",
896 "tags": [],
896 "tags": [],
897 "user": "test"
897 "user": "test"
898 },
898 },
899 {
899 {
900 "bookmarks": [
900 "bookmarks": [
901 "bookmark2"
901 "bookmark2"
902 ],
902 ],
903 "branch": "default",
903 "branch": "default",
904 "date": [
904 "date": [
905 0.0,
905 0.0,
906 0
906 0
907 ],
907 ],
908 "desc": "create tag2",
908 "desc": "create tag2",
909 "node": "ceed296fe500c3fac9541e31dad860cb49c89e45",
909 "node": "ceed296fe500c3fac9541e31dad860cb49c89e45",
910 "parents": [
910 "parents": [
911 "f2890a05fea49bfaf9fb27ed5490894eba32da78"
911 "f2890a05fea49bfaf9fb27ed5490894eba32da78"
912 ],
912 ],
913 "phase": "draft",
913 "phase": "draft",
914 "tags": [],
914 "tags": [],
915 "user": "test"
915 "user": "test"
916 },
916 },
917 {
917 {
918 "bookmarks": [],
918 "bookmarks": [],
919 "branch": "default",
919 "branch": "default",
920 "date": [
920 "date": [
921 0.0,
921 0.0,
922 0
922 0
923 ],
923 ],
924 "desc": "another commit to da/foo",
924 "desc": "another commit to da/foo",
925 "node": "f2890a05fea49bfaf9fb27ed5490894eba32da78",
925 "node": "f2890a05fea49bfaf9fb27ed5490894eba32da78",
926 "parents": [
926 "parents": [
927 "93a8ce14f89156426b7fa981af8042da53f03aa0"
927 "93a8ce14f89156426b7fa981af8042da53f03aa0"
928 ],
928 ],
929 "phase": "draft",
929 "phase": "draft",
930 "tags": [
930 "tags": [
931 "tag2"
931 "tag2"
932 ],
932 ],
933 "user": "test"
933 "user": "test"
934 },
934 },
935 {
935 {
936 "bookmarks": [],
936 "bookmarks": [],
937 "branch": "default",
937 "branch": "default",
938 "date": [
938 "date": [
939 0.0,
939 0.0,
940 0
940 0
941 ],
941 ],
942 "desc": "create tag",
942 "desc": "create tag",
943 "node": "93a8ce14f89156426b7fa981af8042da53f03aa0",
943 "node": "93a8ce14f89156426b7fa981af8042da53f03aa0",
944 "parents": [
944 "parents": [
945 "78896eb0e102174ce9278438a95e12543e4367a7"
945 "78896eb0e102174ce9278438a95e12543e4367a7"
946 ],
946 ],
947 "phase": "public",
947 "phase": "public",
948 "tags": [],
948 "tags": [],
949 "user": "test"
949 "user": "test"
950 },
950 },
951 {
951 {
952 "bookmarks": [],
952 "bookmarks": [],
953 "branch": "default",
953 "branch": "default",
954 "date": [
954 "date": [
955 0.0,
955 0.0,
956 0
956 0
957 ],
957 ],
958 "desc": "move foo",
958 "desc": "move foo",
959 "node": "78896eb0e102174ce9278438a95e12543e4367a7",
959 "node": "78896eb0e102174ce9278438a95e12543e4367a7",
960 "parents": [
960 "parents": [
961 "8d7c456572acf3557e8ed8a07286b10c408bcec5"
961 "8d7c456572acf3557e8ed8a07286b10c408bcec5"
962 ],
962 ],
963 "phase": "public",
963 "phase": "public",
964 "tags": [
964 "tags": [
965 "tag1"
965 "tag1"
966 ],
966 ],
967 "user": "test"
967 "user": "test"
968 },
968 },
969 {
969 {
970 "bookmarks": [
970 "bookmarks": [
971 "bookmark1"
971 "bookmark1"
972 ],
972 ],
973 "branch": "default",
973 "branch": "default",
974 "date": [
974 "date": [
975 0.0,
975 0.0,
976 0
976 0
977 ],
977 ],
978 "desc": "modify da/foo",
978 "desc": "modify da/foo",
979 "node": "8d7c456572acf3557e8ed8a07286b10c408bcec5",
979 "node": "8d7c456572acf3557e8ed8a07286b10c408bcec5",
980 "parents": [
980 "parents": [
981 "f8bbb9024b10f93cdbb8d940337398291d40dea8"
981 "f8bbb9024b10f93cdbb8d940337398291d40dea8"
982 ],
982 ],
983 "phase": "public",
983 "phase": "public",
984 "tags": [],
984 "tags": [],
985 "user": "test"
985 "user": "test"
986 },
986 },
987 {
987 {
988 "bookmarks": [],
988 "bookmarks": [],
989 "branch": "default",
989 "branch": "default",
990 "date": [
990 "date": [
991 0.0,
991 0.0,
992 0
992 0
993 ],
993 ],
994 "desc": "modify foo",
994 "desc": "modify foo",
995 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
995 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
996 "parents": [
996 "parents": [
997 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
997 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
998 ],
998 ],
999 "phase": "public",
999 "phase": "public",
1000 "tags": [],
1000 "tags": [],
1001 "user": "test"
1001 "user": "test"
1002 },
1002 },
1003 {
1003 {
1004 "bookmarks": [],
1004 "bookmarks": [],
1005 "branch": "default",
1005 "branch": "default",
1006 "date": [
1006 "date": [
1007 0.0,
1007 0.0,
1008 0
1008 0
1009 ],
1009 ],
1010 "desc": "initial",
1010 "desc": "initial",
1011 "node": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
1011 "node": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
1012 "parents": [],
1012 "parents": [],
1013 "phase": "public",
1013 "phase": "public",
1014 "tags": [],
1014 "tags": [],
1015 "user": "test"
1015 "user": "test"
1016 }
1016 }
1017 ],
1017 ],
1018 "tags": [
1018 "tags": [
1019 {
1019 {
1020 "date": [
1020 "date": [
1021 0.0,
1021 0.0,
1022 0
1022 0
1023 ],
1023 ],
1024 "node": "f2890a05fea49bfaf9fb27ed5490894eba32da78",
1024 "node": "f2890a05fea49bfaf9fb27ed5490894eba32da78",
1025 "tag": "tag2"
1025 "tag": "tag2"
1026 },
1026 },
1027 {
1027 {
1028 "date": [
1028 "date": [
1029 0.0,
1029 0.0,
1030 0
1030 0
1031 ],
1031 ],
1032 "node": "78896eb0e102174ce9278438a95e12543e4367a7",
1032 "node": "78896eb0e102174ce9278438a95e12543e4367a7",
1033 "tag": "tag1"
1033 "tag": "tag1"
1034 }
1034 }
1035 ]
1035 ]
1036 }
1036 }
1037
1037
1038 $ request json-changelog?rev=create
1039 200 Script output follows
1040
1041 {
1042 "entries": [
1043 {
1044 "bookmarks": [],
1045 "branch": "test-branch",
1046 "date": [
1047 0.0,
1048 0
1049 ],
1050 "desc": "create test branch",
1051 "node": "6ab967a8ab3489227a83f80e920faa039a71819f",
1052 "parents": [
1053 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
1054 ],
1055 "phase": "draft",
1056 "tags": [],
1057 "user": "test"
1058 },
1059 {
1060 "bookmarks": [
1061 "bookmark2"
1062 ],
1063 "branch": "default",
1064 "date": [
1065 0.0,
1066 0
1067 ],
1068 "desc": "create tag2",
1069 "node": "ceed296fe500c3fac9541e31dad860cb49c89e45",
1070 "parents": [
1071 "f2890a05fea49bfaf9fb27ed5490894eba32da78"
1072 ],
1073 "phase": "draft",
1074 "tags": [],
1075 "user": "test"
1076 },
1077 {
1078 "bookmarks": [],
1079 "branch": "default",
1080 "date": [
1081 0.0,
1082 0
1083 ],
1084 "desc": "create tag",
1085 "node": "93a8ce14f89156426b7fa981af8042da53f03aa0",
1086 "parents": [
1087 "78896eb0e102174ce9278438a95e12543e4367a7"
1088 ],
1089 "phase": "public",
1090 "tags": [],
1091 "user": "test"
1092 }
1093 ],
1094 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7",
1095 "query": "create"
1096 }
1097
1038 filediff/{revision}/{path} shows changes to a file in a revision
1098 filediff/{revision}/{path} shows changes to a file in a revision
1039
1099
1040 $ request json-diff/f8bbb9024b10/foo
1100 $ request json-diff/f8bbb9024b10/foo
1041 200 Script output follows
1101 200 Script output follows
1042
1102
1043 {
1103 {
1044 "author": "test",
1104 "author": "test",
1045 "children": [],
1105 "children": [],
1046 "date": [
1106 "date": [
1047 0.0,
1107 0.0,
1048 0
1108 0
1049 ],
1109 ],
1050 "desc": "modify foo",
1110 "desc": "modify foo",
1051 "diff": [
1111 "diff": [
1052 {
1112 {
1053 "blockno": 1,
1113 "blockno": 1,
1054 "lines": [
1114 "lines": [
1055 {
1115 {
1056 "l": "--- a/foo\tThu Jan 01 00:00:00 1970 +0000\n",
1116 "l": "--- a/foo\tThu Jan 01 00:00:00 1970 +0000\n",
1057 "n": 1,
1117 "n": 1,
1058 "t": "-"
1118 "t": "-"
1059 },
1119 },
1060 {
1120 {
1061 "l": "+++ b/foo\tThu Jan 01 00:00:00 1970 +0000\n",
1121 "l": "+++ b/foo\tThu Jan 01 00:00:00 1970 +0000\n",
1062 "n": 2,
1122 "n": 2,
1063 "t": "+"
1123 "t": "+"
1064 },
1124 },
1065 {
1125 {
1066 "l": "@@ -1,1 +1,1 @@\n",
1126 "l": "@@ -1,1 +1,1 @@\n",
1067 "n": 3,
1127 "n": 3,
1068 "t": "@"
1128 "t": "@"
1069 },
1129 },
1070 {
1130 {
1071 "l": "-foo\n",
1131 "l": "-foo\n",
1072 "n": 4,
1132 "n": 4,
1073 "t": "-"
1133 "t": "-"
1074 },
1134 },
1075 {
1135 {
1076 "l": "+bar\n",
1136 "l": "+bar\n",
1077 "n": 5,
1137 "n": 5,
1078 "t": "+"
1138 "t": "+"
1079 }
1139 }
1080 ]
1140 ]
1081 }
1141 }
1082 ],
1142 ],
1083 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
1143 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
1084 "parents": [
1144 "parents": [
1085 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
1145 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
1086 ],
1146 ],
1087 "path": "foo"
1147 "path": "foo"
1088 }
1148 }
1089
1149
1090 comparison/{revision}/{path} shows information about before and after for a file
1150 comparison/{revision}/{path} shows information about before and after for a file
1091
1151
1092 $ request json-comparison/f8bbb9024b10/foo
1152 $ request json-comparison/f8bbb9024b10/foo
1093 200 Script output follows
1153 200 Script output follows
1094
1154
1095 {
1155 {
1096 "author": "test",
1156 "author": "test",
1097 "children": [],
1157 "children": [],
1098 "comparison": [
1158 "comparison": [
1099 {
1159 {
1100 "lines": [
1160 "lines": [
1101 {
1161 {
1102 "ll": "foo",
1162 "ll": "foo",
1103 "ln": 1,
1163 "ln": 1,
1104 "rl": "bar",
1164 "rl": "bar",
1105 "rn": 1,
1165 "rn": 1,
1106 "t": "replace"
1166 "t": "replace"
1107 }
1167 }
1108 ]
1168 ]
1109 }
1169 }
1110 ],
1170 ],
1111 "date": [
1171 "date": [
1112 0.0,
1172 0.0,
1113 0
1173 0
1114 ],
1174 ],
1115 "desc": "modify foo",
1175 "desc": "modify foo",
1116 "leftnode": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
1176 "leftnode": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
1117 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
1177 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
1118 "parents": [
1178 "parents": [
1119 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
1179 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
1120 ],
1180 ],
1121 "path": "foo",
1181 "path": "foo",
1122 "rightnode": "f8bbb9024b10f93cdbb8d940337398291d40dea8"
1182 "rightnode": "f8bbb9024b10f93cdbb8d940337398291d40dea8"
1123 }
1183 }
1124
1184
1125 annotate/{revision}/{path} shows annotations for each line
1185 annotate/{revision}/{path} shows annotations for each line
1126
1186
1127 $ request json-annotate/f8bbb9024b10/foo
1187 $ request json-annotate/f8bbb9024b10/foo
1128 200 Script output follows
1188 200 Script output follows
1129
1189
1130 {
1190 {
1131 "abspath": "foo",
1191 "abspath": "foo",
1132 "annotate": [
1192 "annotate": [
1133 {
1193 {
1134 "abspath": "foo",
1194 "abspath": "foo",
1135 "author": "test",
1195 "author": "test",
1136 "desc": "modify foo",
1196 "desc": "modify foo",
1137 "line": "bar\n",
1197 "line": "bar\n",
1138 "lineno": 1,
1198 "lineno": 1,
1139 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
1199 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
1140 "revdate": [
1200 "revdate": [
1141 0.0,
1201 0.0,
1142 0
1202 0
1143 ],
1203 ],
1144 "targetline": 1
1204 "targetline": 1
1145 }
1205 }
1146 ],
1206 ],
1147 "author": "test",
1207 "author": "test",
1148 "children": [],
1208 "children": [],
1149 "date": [
1209 "date": [
1150 0.0,
1210 0.0,
1151 0
1211 0
1152 ],
1212 ],
1153 "desc": "modify foo",
1213 "desc": "modify foo",
1154 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
1214 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
1155 "parents": [
1215 "parents": [
1156 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
1216 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
1157 ],
1217 ],
1158 "permissions": ""
1218 "permissions": ""
1159 }
1219 }
1160
1220
1161 filelog/{revision}/{path} shows history of a single file
1221 filelog/{revision}/{path} shows history of a single file
1162
1222
1163 $ request json-filelog/f8bbb9024b10/foo
1223 $ request json-filelog/f8bbb9024b10/foo
1164 200 Script output follows
1224 200 Script output follows
1165
1225
1166 {
1226 {
1167 "entries": [
1227 "entries": [
1168 {
1228 {
1169 "bookmarks": [],
1229 "bookmarks": [],
1170 "branch": "default",
1230 "branch": "default",
1171 "date": [
1231 "date": [
1172 0.0,
1232 0.0,
1173 0
1233 0
1174 ],
1234 ],
1175 "desc": "modify foo",
1235 "desc": "modify foo",
1176 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
1236 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
1177 "parents": [
1237 "parents": [
1178 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
1238 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
1179 ],
1239 ],
1180 "phase": "public",
1240 "phase": "public",
1181 "tags": [],
1241 "tags": [],
1182 "user": "test"
1242 "user": "test"
1183 },
1243 },
1184 {
1244 {
1185 "bookmarks": [],
1245 "bookmarks": [],
1186 "branch": "default",
1246 "branch": "default",
1187 "date": [
1247 "date": [
1188 0.0,
1248 0.0,
1189 0
1249 0
1190 ],
1250 ],
1191 "desc": "initial",
1251 "desc": "initial",
1192 "node": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
1252 "node": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
1193 "parents": [],
1253 "parents": [],
1194 "phase": "public",
1254 "phase": "public",
1195 "tags": [],
1255 "tags": [],
1196 "user": "test"
1256 "user": "test"
1197 }
1257 }
1198 ]
1258 ]
1199 }
1259 }
1200
1260
1201 $ request json-filelog/cc725e08502a/da/foo
1261 $ request json-filelog/cc725e08502a/da/foo
1202 200 Script output follows
1262 200 Script output follows
1203
1263
1204 {
1264 {
1205 "entries": [
1265 "entries": [
1206 {
1266 {
1207 "bookmarks": [],
1267 "bookmarks": [],
1208 "branch": "default",
1268 "branch": "default",
1209 "date": [
1269 "date": [
1210 0.0,
1270 0.0,
1211 0
1271 0
1212 ],
1272 ],
1213 "desc": "another commit to da/foo",
1273 "desc": "another commit to da/foo",
1214 "node": "f2890a05fea49bfaf9fb27ed5490894eba32da78",
1274 "node": "f2890a05fea49bfaf9fb27ed5490894eba32da78",
1215 "parents": [
1275 "parents": [
1216 "8d7c456572acf3557e8ed8a07286b10c408bcec5"
1276 "8d7c456572acf3557e8ed8a07286b10c408bcec5"
1217 ],
1277 ],
1218 "phase": "draft",
1278 "phase": "draft",
1219 "tags": [
1279 "tags": [
1220 "tag2"
1280 "tag2"
1221 ],
1281 ],
1222 "user": "test"
1282 "user": "test"
1223 },
1283 },
1224 {
1284 {
1225 "bookmarks": [
1285 "bookmarks": [
1226 "bookmark1"
1286 "bookmark1"
1227 ],
1287 ],
1228 "branch": "default",
1288 "branch": "default",
1229 "date": [
1289 "date": [
1230 0.0,
1290 0.0,
1231 0
1291 0
1232 ],
1292 ],
1233 "desc": "modify da/foo",
1293 "desc": "modify da/foo",
1234 "node": "8d7c456572acf3557e8ed8a07286b10c408bcec5",
1294 "node": "8d7c456572acf3557e8ed8a07286b10c408bcec5",
1235 "parents": [
1295 "parents": [
1236 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
1296 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
1237 ],
1297 ],
1238 "phase": "public",
1298 "phase": "public",
1239 "tags": [],
1299 "tags": [],
1240 "user": "test"
1300 "user": "test"
1241 },
1301 },
1242 {
1302 {
1243 "bookmarks": [],
1303 "bookmarks": [],
1244 "branch": "default",
1304 "branch": "default",
1245 "date": [
1305 "date": [
1246 0.0,
1306 0.0,
1247 0
1307 0
1248 ],
1308 ],
1249 "desc": "initial",
1309 "desc": "initial",
1250 "node": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
1310 "node": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
1251 "parents": [],
1311 "parents": [],
1252 "phase": "public",
1312 "phase": "public",
1253 "tags": [],
1313 "tags": [],
1254 "user": "test"
1314 "user": "test"
1255 }
1315 }
1256 ]
1316 ]
1257 }
1317 }
1258
1318
1259 (archive/ doesn't use templating, so ignore it)
1319 (archive/ doesn't use templating, so ignore it)
1260
1320
1261 (static/ doesn't use templating, so ignore it)
1321 (static/ doesn't use templating, so ignore it)
1262
1322
1263 graph/ shows information that can be used to render a graph of the DAG
1323 graph/ shows information that can be used to render a graph of the DAG
1264
1324
1265 $ request json-graph
1325 $ request json-graph
1266 200 Script output follows
1326 200 Script output follows
1267
1327
1268 "not yet implemented"
1328 "not yet implemented"
1269
1329
1270 help/ shows help topics
1330 help/ shows help topics
1271
1331
1272 $ request json-help
1332 $ request json-help
1273 200 Script output follows
1333 200 Script output follows
1274
1334
1275 {
1335 {
1276 "earlycommands": [
1336 "earlycommands": [
1277 {
1337 {
1278 "summary": "add the specified files on the next commit",
1338 "summary": "add the specified files on the next commit",
1279 "topic": "add"
1339 "topic": "add"
1280 },
1340 },
1281 {
1341 {
1282 "summary": "show changeset information by line for each file",
1342 "summary": "show changeset information by line for each file",
1283 "topic": "annotate"
1343 "topic": "annotate"
1284 },
1344 },
1285 {
1345 {
1286 "summary": "make a copy of an existing repository",
1346 "summary": "make a copy of an existing repository",
1287 "topic": "clone"
1347 "topic": "clone"
1288 },
1348 },
1289 {
1349 {
1290 "summary": "commit the specified files or all outstanding changes",
1350 "summary": "commit the specified files or all outstanding changes",
1291 "topic": "commit"
1351 "topic": "commit"
1292 },
1352 },
1293 {
1353 {
1294 "summary": "diff repository (or selected files)",
1354 "summary": "diff repository (or selected files)",
1295 "topic": "diff"
1355 "topic": "diff"
1296 },
1356 },
1297 {
1357 {
1298 "summary": "dump the header and diffs for one or more changesets",
1358 "summary": "dump the header and diffs for one or more changesets",
1299 "topic": "export"
1359 "topic": "export"
1300 },
1360 },
1301 {
1361 {
1302 "summary": "forget the specified files on the next commit",
1362 "summary": "forget the specified files on the next commit",
1303 "topic": "forget"
1363 "topic": "forget"
1304 },
1364 },
1305 {
1365 {
1306 "summary": "create a new repository in the given directory",
1366 "summary": "create a new repository in the given directory",
1307 "topic": "init"
1367 "topic": "init"
1308 },
1368 },
1309 {
1369 {
1310 "summary": "show revision history of entire repository or files",
1370 "summary": "show revision history of entire repository or files",
1311 "topic": "log"
1371 "topic": "log"
1312 },
1372 },
1313 {
1373 {
1314 "summary": "merge another revision into working directory",
1374 "summary": "merge another revision into working directory",
1315 "topic": "merge"
1375 "topic": "merge"
1316 },
1376 },
1317 {
1377 {
1318 "summary": "pull changes from the specified source",
1378 "summary": "pull changes from the specified source",
1319 "topic": "pull"
1379 "topic": "pull"
1320 },
1380 },
1321 {
1381 {
1322 "summary": "push changes to the specified destination",
1382 "summary": "push changes to the specified destination",
1323 "topic": "push"
1383 "topic": "push"
1324 },
1384 },
1325 {
1385 {
1326 "summary": "remove the specified files on the next commit",
1386 "summary": "remove the specified files on the next commit",
1327 "topic": "remove"
1387 "topic": "remove"
1328 },
1388 },
1329 {
1389 {
1330 "summary": "start stand-alone webserver",
1390 "summary": "start stand-alone webserver",
1331 "topic": "serve"
1391 "topic": "serve"
1332 },
1392 },
1333 {
1393 {
1334 "summary": "show changed files in the working directory",
1394 "summary": "show changed files in the working directory",
1335 "topic": "status"
1395 "topic": "status"
1336 },
1396 },
1337 {
1397 {
1338 "summary": "summarize working directory state",
1398 "summary": "summarize working directory state",
1339 "topic": "summary"
1399 "topic": "summary"
1340 },
1400 },
1341 {
1401 {
1342 "summary": "update working directory (or switch revisions)",
1402 "summary": "update working directory (or switch revisions)",
1343 "topic": "update"
1403 "topic": "update"
1344 }
1404 }
1345 ],
1405 ],
1346 "othercommands": [
1406 "othercommands": [
1347 {
1407 {
1348 "summary": "add all new files, delete all missing files",
1408 "summary": "add all new files, delete all missing files",
1349 "topic": "addremove"
1409 "topic": "addremove"
1350 },
1410 },
1351 {
1411 {
1352 "summary": "create an unversioned archive of a repository revision",
1412 "summary": "create an unversioned archive of a repository revision",
1353 "topic": "archive"
1413 "topic": "archive"
1354 },
1414 },
1355 {
1415 {
1356 "summary": "reverse effect of earlier changeset",
1416 "summary": "reverse effect of earlier changeset",
1357 "topic": "backout"
1417 "topic": "backout"
1358 },
1418 },
1359 {
1419 {
1360 "summary": "subdivision search of changesets",
1420 "summary": "subdivision search of changesets",
1361 "topic": "bisect"
1421 "topic": "bisect"
1362 },
1422 },
1363 {
1423 {
1364 "summary": "create a new bookmark or list existing bookmarks",
1424 "summary": "create a new bookmark or list existing bookmarks",
1365 "topic": "bookmarks"
1425 "topic": "bookmarks"
1366 },
1426 },
1367 {
1427 {
1368 "summary": "set or show the current branch name",
1428 "summary": "set or show the current branch name",
1369 "topic": "branch"
1429 "topic": "branch"
1370 },
1430 },
1371 {
1431 {
1372 "summary": "list repository named branches",
1432 "summary": "list repository named branches",
1373 "topic": "branches"
1433 "topic": "branches"
1374 },
1434 },
1375 {
1435 {
1376 "summary": "create a changegroup file",
1436 "summary": "create a changegroup file",
1377 "topic": "bundle"
1437 "topic": "bundle"
1378 },
1438 },
1379 {
1439 {
1380 "summary": "output the current or given revision of files",
1440 "summary": "output the current or given revision of files",
1381 "topic": "cat"
1441 "topic": "cat"
1382 },
1442 },
1383 {
1443 {
1384 "summary": "show combined config settings from all hgrc files",
1444 "summary": "show combined config settings from all hgrc files",
1385 "topic": "config"
1445 "topic": "config"
1386 },
1446 },
1387 {
1447 {
1388 "summary": "mark files as copied for the next commit",
1448 "summary": "mark files as copied for the next commit",
1389 "topic": "copy"
1449 "topic": "copy"
1390 },
1450 },
1391 {
1451 {
1392 "summary": "list tracked files",
1452 "summary": "list tracked files",
1393 "topic": "files"
1453 "topic": "files"
1394 },
1454 },
1395 {
1455 {
1396 "summary": "copy changes from other branches onto the current branch",
1456 "summary": "copy changes from other branches onto the current branch",
1397 "topic": "graft"
1457 "topic": "graft"
1398 },
1458 },
1399 {
1459 {
1400 "summary": "search for a pattern in specified files and revisions",
1460 "summary": "search for a pattern in specified files and revisions",
1401 "topic": "grep"
1461 "topic": "grep"
1402 },
1462 },
1403 {
1463 {
1404 "summary": "show branch heads",
1464 "summary": "show branch heads",
1405 "topic": "heads"
1465 "topic": "heads"
1406 },
1466 },
1407 {
1467 {
1408 "summary": "show help for a given topic or a help overview",
1468 "summary": "show help for a given topic or a help overview",
1409 "topic": "help"
1469 "topic": "help"
1410 },
1470 },
1411 {
1471 {
1412 "summary": "identify the working directory or specified revision",
1472 "summary": "identify the working directory or specified revision",
1413 "topic": "identify"
1473 "topic": "identify"
1414 },
1474 },
1415 {
1475 {
1416 "summary": "import an ordered set of patches",
1476 "summary": "import an ordered set of patches",
1417 "topic": "import"
1477 "topic": "import"
1418 },
1478 },
1419 {
1479 {
1420 "summary": "show new changesets found in source",
1480 "summary": "show new changesets found in source",
1421 "topic": "incoming"
1481 "topic": "incoming"
1422 },
1482 },
1423 {
1483 {
1424 "summary": "output the current or given revision of the project manifest",
1484 "summary": "output the current or given revision of the project manifest",
1425 "topic": "manifest"
1485 "topic": "manifest"
1426 },
1486 },
1427 {
1487 {
1428 "summary": "show changesets not found in the destination",
1488 "summary": "show changesets not found in the destination",
1429 "topic": "outgoing"
1489 "topic": "outgoing"
1430 },
1490 },
1431 {
1491 {
1432 "summary": "show aliases for remote repositories",
1492 "summary": "show aliases for remote repositories",
1433 "topic": "paths"
1493 "topic": "paths"
1434 },
1494 },
1435 {
1495 {
1436 "summary": "set or show the current phase name",
1496 "summary": "set or show the current phase name",
1437 "topic": "phase"
1497 "topic": "phase"
1438 },
1498 },
1439 {
1499 {
1440 "summary": "roll back an interrupted transaction",
1500 "summary": "roll back an interrupted transaction",
1441 "topic": "recover"
1501 "topic": "recover"
1442 },
1502 },
1443 {
1503 {
1444 "summary": "rename files; equivalent of copy + remove",
1504 "summary": "rename files; equivalent of copy + remove",
1445 "topic": "rename"
1505 "topic": "rename"
1446 },
1506 },
1447 {
1507 {
1448 "summary": "redo merges or set/view the merge status of files",
1508 "summary": "redo merges or set/view the merge status of files",
1449 "topic": "resolve"
1509 "topic": "resolve"
1450 },
1510 },
1451 {
1511 {
1452 "summary": "restore files to their checkout state",
1512 "summary": "restore files to their checkout state",
1453 "topic": "revert"
1513 "topic": "revert"
1454 },
1514 },
1455 {
1515 {
1456 "summary": "print the root (top) of the current working directory",
1516 "summary": "print the root (top) of the current working directory",
1457 "topic": "root"
1517 "topic": "root"
1458 },
1518 },
1459 {
1519 {
1460 "summary": "add one or more tags for the current or given revision",
1520 "summary": "add one or more tags for the current or given revision",
1461 "topic": "tag"
1521 "topic": "tag"
1462 },
1522 },
1463 {
1523 {
1464 "summary": "list repository tags",
1524 "summary": "list repository tags",
1465 "topic": "tags"
1525 "topic": "tags"
1466 },
1526 },
1467 {
1527 {
1468 "summary": "apply one or more changegroup files",
1528 "summary": "apply one or more changegroup files",
1469 "topic": "unbundle"
1529 "topic": "unbundle"
1470 },
1530 },
1471 {
1531 {
1472 "summary": "verify the integrity of the repository",
1532 "summary": "verify the integrity of the repository",
1473 "topic": "verify"
1533 "topic": "verify"
1474 },
1534 },
1475 {
1535 {
1476 "summary": "output version and copyright information",
1536 "summary": "output version and copyright information",
1477 "topic": "version"
1537 "topic": "version"
1478 }
1538 }
1479 ],
1539 ],
1480 "topics": [
1540 "topics": [
1481 {
1541 {
1482 "summary": "Configuration Files",
1542 "summary": "Configuration Files",
1483 "topic": "config"
1543 "topic": "config"
1484 },
1544 },
1485 {
1545 {
1486 "summary": "Date Formats",
1546 "summary": "Date Formats",
1487 "topic": "dates"
1547 "topic": "dates"
1488 },
1548 },
1489 {
1549 {
1490 "summary": "Diff Formats",
1550 "summary": "Diff Formats",
1491 "topic": "diffs"
1551 "topic": "diffs"
1492 },
1552 },
1493 {
1553 {
1494 "summary": "Environment Variables",
1554 "summary": "Environment Variables",
1495 "topic": "environment"
1555 "topic": "environment"
1496 },
1556 },
1497 {
1557 {
1498 "summary": "Using Additional Features",
1558 "summary": "Using Additional Features",
1499 "topic": "extensions"
1559 "topic": "extensions"
1500 },
1560 },
1501 {
1561 {
1502 "summary": "Specifying File Sets",
1562 "summary": "Specifying File Sets",
1503 "topic": "filesets"
1563 "topic": "filesets"
1504 },
1564 },
1505 {
1565 {
1506 "summary": "Glossary",
1566 "summary": "Glossary",
1507 "topic": "glossary"
1567 "topic": "glossary"
1508 },
1568 },
1509 {
1569 {
1510 "summary": "Syntax for Mercurial Ignore Files",
1570 "summary": "Syntax for Mercurial Ignore Files",
1511 "topic": "hgignore"
1571 "topic": "hgignore"
1512 },
1572 },
1513 {
1573 {
1514 "summary": "Configuring hgweb",
1574 "summary": "Configuring hgweb",
1515 "topic": "hgweb"
1575 "topic": "hgweb"
1516 },
1576 },
1517 {
1577 {
1518 "summary": "Technical implementation topics",
1578 "summary": "Technical implementation topics",
1519 "topic": "internals"
1579 "topic": "internals"
1520 },
1580 },
1521 {
1581 {
1522 "summary": "Merge Tools",
1582 "summary": "Merge Tools",
1523 "topic": "merge-tools"
1583 "topic": "merge-tools"
1524 },
1584 },
1525 {
1585 {
1526 "summary": "Specifying Multiple Revisions",
1586 "summary": "Specifying Multiple Revisions",
1527 "topic": "multirevs"
1587 "topic": "multirevs"
1528 },
1588 },
1529 {
1589 {
1530 "summary": "File Name Patterns",
1590 "summary": "File Name Patterns",
1531 "topic": "patterns"
1591 "topic": "patterns"
1532 },
1592 },
1533 {
1593 {
1534 "summary": "Working with Phases",
1594 "summary": "Working with Phases",
1535 "topic": "phases"
1595 "topic": "phases"
1536 },
1596 },
1537 {
1597 {
1538 "summary": "Specifying Single Revisions",
1598 "summary": "Specifying Single Revisions",
1539 "topic": "revisions"
1599 "topic": "revisions"
1540 },
1600 },
1541 {
1601 {
1542 "summary": "Specifying Revision Sets",
1602 "summary": "Specifying Revision Sets",
1543 "topic": "revsets"
1603 "topic": "revsets"
1544 },
1604 },
1545 {
1605 {
1546 "summary": "Using Mercurial from scripts and automation",
1606 "summary": "Using Mercurial from scripts and automation",
1547 "topic": "scripting"
1607 "topic": "scripting"
1548 },
1608 },
1549 {
1609 {
1550 "summary": "Subrepositories",
1610 "summary": "Subrepositories",
1551 "topic": "subrepos"
1611 "topic": "subrepos"
1552 },
1612 },
1553 {
1613 {
1554 "summary": "Template Usage",
1614 "summary": "Template Usage",
1555 "topic": "templating"
1615 "topic": "templating"
1556 },
1616 },
1557 {
1617 {
1558 "summary": "URL Paths",
1618 "summary": "URL Paths",
1559 "topic": "urls"
1619 "topic": "urls"
1560 }
1620 }
1561 ]
1621 ]
1562 }
1622 }
1563
1623
1564 help/{topic} shows an individual help topic
1624 help/{topic} shows an individual help topic
1565
1625
1566 $ request json-help/phases
1626 $ request json-help/phases
1567 200 Script output follows
1627 200 Script output follows
1568
1628
1569 {
1629 {
1570 "rawdoc": "Working with Phases\n*", (glob)
1630 "rawdoc": "Working with Phases\n*", (glob)
1571 "topic": "phases"
1631 "topic": "phases"
1572 }
1632 }
General Comments 0
You need to be logged in to leave comments. Login now