Show More
@@ -0,0 +1,486 b'' | |||
|
1 | $ . $TESTDIR/wireprotohelpers.sh | |
|
2 | ||
|
3 | $ hg init server | |
|
4 | $ enablehttpv2 server | |
|
5 | $ cd server | |
|
6 | $ echo a0 > a | |
|
7 | $ echo b0 > b | |
|
8 | ||
|
9 | $ hg -q commit -A -m 'commit 0' | |
|
10 | ||
|
11 | $ echo a1 > a | |
|
12 | $ echo b1 > b | |
|
13 | $ hg commit -m 'commit 1' | |
|
14 | $ echo b2 > b | |
|
15 | $ hg commit -m 'commit 2' | |
|
16 | ||
|
17 | $ hg -q up -r 0 | |
|
18 | $ echo a2 > a | |
|
19 | $ hg commit -m 'commit 3' | |
|
20 | created new head | |
|
21 | ||
|
22 | $ hg log -G -T '{rev}:{node} {desc}\n' | |
|
23 | @ 3:eae5f82c2e622368d27daecb76b7e393d0f24211 commit 3 | |
|
24 | | | |
|
25 | | o 2:0bb8ad894a15b15380b2a2a5b183e20f2a4b28dd commit 2 | |
|
26 | | | | |
|
27 | | o 1:7592917e1c3e82677cb0a4bc715ca25dd12d28c1 commit 1 | |
|
28 | |/ | |
|
29 | o 0:3390ef850073fbc2f0dfff2244342c8e9229013a commit 0 | |
|
30 | ||
|
31 | ||
|
32 | $ hg serve -p $HGPORT -d --pid-file hg.pid -E error.log | |
|
33 | $ cat hg.pid > $DAEMON_PIDS | |
|
34 | ||
|
35 | No arguments is an invalid request | |
|
36 | ||
|
37 | $ sendhttpv2peer << EOF | |
|
38 | > command changesetdata | |
|
39 | > EOF | |
|
40 | creating http peer for wire protocol version 2 | |
|
41 | sending changesetdata command | |
|
42 | s> POST /api/exp-http-v2-0001/ro/changesetdata HTTP/1.1\r\n | |
|
43 | s> Accept-Encoding: identity\r\n | |
|
44 | s> accept: application/mercurial-exp-framing-0005\r\n | |
|
45 | s> content-type: application/mercurial-exp-framing-0005\r\n | |
|
46 | s> content-length: 28\r\n | |
|
47 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
|
48 | s> user-agent: Mercurial debugwireproto\r\n | |
|
49 | s> \r\n | |
|
50 | s> \x14\x00\x00\x01\x00\x01\x01\x11\xa1DnameMchangesetdata | |
|
51 | s> makefile('rb', None) | |
|
52 | s> HTTP/1.1 200 OK\r\n | |
|
53 | s> Server: testing stub value\r\n | |
|
54 | s> Date: $HTTP_DATE$\r\n | |
|
55 | s> Content-Type: application/mercurial-exp-framing-0005\r\n | |
|
56 | s> Transfer-Encoding: chunked\r\n | |
|
57 | s> \r\n | |
|
58 | s> 49\r\n | |
|
59 | s> A\x00\x00\x01\x00\x02\x012 | |
|
60 | s> \xa2Eerror\xa1GmessageX"noderange or nodes must be definedFstatusEerror | |
|
61 | s> \r\n | |
|
62 | received frame(size=65; request=1; stream=2; streamflags=stream-begin; type=command-response; flags=eos) | |
|
63 | s> 0\r\n | |
|
64 | s> \r\n | |
|
65 | abort: noderange or nodes must be defined! | |
|
66 | [255] | |
|
67 | ||
|
68 | Empty noderange heads results in an error | |
|
69 | ||
|
70 | $ sendhttpv2peer << EOF | |
|
71 | > command changesetdata | |
|
72 | > noderange eval:[[],[]] | |
|
73 | > EOF | |
|
74 | creating http peer for wire protocol version 2 | |
|
75 | sending changesetdata command | |
|
76 | s> POST /api/exp-http-v2-0001/ro/changesetdata HTTP/1.1\r\n | |
|
77 | s> Accept-Encoding: identity\r\n | |
|
78 | s> accept: application/mercurial-exp-framing-0005\r\n | |
|
79 | s> content-type: application/mercurial-exp-framing-0005\r\n | |
|
80 | s> content-length: 47\r\n | |
|
81 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
|
82 | s> user-agent: Mercurial debugwireproto\r\n | |
|
83 | s> \r\n | |
|
84 | s> \'\x00\x00\x01\x00\x01\x01\x11\xa2Dargs\xa1Inoderange\x82\x80\x80DnameMchangesetdata | |
|
85 | s> makefile('rb', None) | |
|
86 | s> HTTP/1.1 200 OK\r\n | |
|
87 | s> Server: testing stub value\r\n | |
|
88 | s> Date: $HTTP_DATE$\r\n | |
|
89 | s> Content-Type: application/mercurial-exp-framing-0005\r\n | |
|
90 | s> Transfer-Encoding: chunked\r\n | |
|
91 | s> \r\n | |
|
92 | s> 51\r\n | |
|
93 | s> I\x00\x00\x01\x00\x02\x012 | |
|
94 | s> \xa2Eerror\xa1GmessageX*heads in noderange request cannot be emptyFstatusEerror | |
|
95 | s> \r\n | |
|
96 | received frame(size=73; request=1; stream=2; streamflags=stream-begin; type=command-response; flags=eos) | |
|
97 | s> 0\r\n | |
|
98 | s> \r\n | |
|
99 | abort: heads in noderange request cannot be empty! | |
|
100 | [255] | |
|
101 | ||
|
102 | Sending just noderange heads sends all revisions | |
|
103 | ||
|
104 | $ sendhttpv2peer << EOF | |
|
105 | > command changesetdata | |
|
106 | > noderange eval:[[], [b'\x0b\xb8\xad\x89\x4a\x15\xb1\x53\x80\xb2\xa2\xa5\xb1\x83\xe2\x0f\x2a\x4b\x28\xdd', b'\xea\xe5\xf8\x2c\x2e\x62\x23\x68\xd2\x7d\xae\xcb\x76\xb7\xe3\x93\xd0\xf2\x42\x11']] | |
|
107 | > EOF | |
|
108 | creating http peer for wire protocol version 2 | |
|
109 | sending changesetdata command | |
|
110 | s> POST /api/exp-http-v2-0001/ro/changesetdata HTTP/1.1\r\n | |
|
111 | s> Accept-Encoding: identity\r\n | |
|
112 | s> accept: application/mercurial-exp-framing-0005\r\n | |
|
113 | s> content-type: application/mercurial-exp-framing-0005\r\n | |
|
114 | s> content-length: 89\r\n | |
|
115 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
|
116 | s> user-agent: Mercurial debugwireproto\r\n | |
|
117 | s> \r\n | |
|
118 | s> Q\x00\x00\x01\x00\x01\x01\x11\xa2Dargs\xa1Inoderange\x82\x80\x82T\x0b\xb8\xad\x89J\x15\xb1S\x80\xb2\xa2\xa5\xb1\x83\xe2\x0f*K(\xddT\xea\xe5\xf8,.b#h\xd2}\xae\xcbv\xb7\xe3\x93\xd0\xf2B\x11DnameMchangesetdata | |
|
119 | s> makefile('rb', None) | |
|
120 | s> HTTP/1.1 200 OK\r\n | |
|
121 | s> Server: testing stub value\r\n | |
|
122 | s> Date: $HTTP_DATE$\r\n | |
|
123 | s> Content-Type: application/mercurial-exp-framing-0005\r\n | |
|
124 | s> Transfer-Encoding: chunked\r\n | |
|
125 | s> \r\n | |
|
126 | s> 13\r\n | |
|
127 | s> \x0b\x00\x00\x01\x00\x02\x011 | |
|
128 | s> \xa1FstatusBok | |
|
129 | s> \r\n | |
|
130 | received frame(size=11; request=1; stream=2; streamflags=stream-begin; type=command-response; flags=continuation) | |
|
131 | s> 81\r\n | |
|
132 | s> y\x00\x00\x01\x00\x02\x001 | |
|
133 | s> \xa1Jtotalitems\x04\xa1DnodeT3\x90\xef\x85\x00s\xfb\xc2\xf0\xdf\xff"D4,\x8e\x92)\x01:\xa1DnodeTu\x92\x91~\x1c>\x82g|\xb0\xa4\xbcq\\\xa2]\xd1-(\xc1\xa1DnodeT\x0b\xb8\xad\x89J\x15\xb1S\x80\xb2\xa2\xa5\xb1\x83\xe2\x0f*K(\xdd\xa1DnodeT\xea\xe5\xf8,.b#h\xd2}\xae\xcbv\xb7\xe3\x93\xd0\xf2B\x11 | |
|
134 | s> \r\n | |
|
135 | received frame(size=121; request=1; stream=2; streamflags=; type=command-response; flags=continuation) | |
|
136 | s> 8\r\n | |
|
137 | s> \x00\x00\x00\x01\x00\x02\x002 | |
|
138 | s> \r\n | |
|
139 | s> 0\r\n | |
|
140 | s> \r\n | |
|
141 | received frame(size=0; request=1; stream=2; streamflags=; type=command-response; flags=eos) | |
|
142 | response: gen[ | |
|
143 | { | |
|
144 | b'totalitems': 4 | |
|
145 | }, | |
|
146 | { | |
|
147 | b'node': b'3\x90\xef\x85\x00s\xfb\xc2\xf0\xdf\xff"D4,\x8e\x92)\x01:' | |
|
148 | }, | |
|
149 | { | |
|
150 | b'node': b'u\x92\x91~\x1c>\x82g|\xb0\xa4\xbcq\\\xa2]\xd1-(\xc1' | |
|
151 | }, | |
|
152 | { | |
|
153 | b'node': b'\x0b\xb8\xad\x89J\x15\xb1S\x80\xb2\xa2\xa5\xb1\x83\xe2\x0f*K(\xdd' | |
|
154 | }, | |
|
155 | { | |
|
156 | b'node': b'\xea\xe5\xf8,.b#h\xd2}\xae\xcbv\xb7\xe3\x93\xd0\xf2B\x11' | |
|
157 | } | |
|
158 | ] | |
|
159 | ||
|
160 | Sending root nodes limits what data is sent | |
|
161 | ||
|
162 | $ sendhttpv2peer << EOF | |
|
163 | > command changesetdata | |
|
164 | > noderange eval:[[b'\x33\x90\xef\x85\x00\x73\xfb\xc2\xf0\xdf\xff\x22\x44\x34\x2c\x8e\x92\x29\x01\x3a'], [b'\x0b\xb8\xad\x89\x4a\x15\xb1\x53\x80\xb2\xa2\xa5\xb1\x83\xe2\x0f\x2a\x4b\x28\xdd']] | |
|
165 | > EOF | |
|
166 | creating http peer for wire protocol version 2 | |
|
167 | sending changesetdata command | |
|
168 | s> POST /api/exp-http-v2-0001/ro/changesetdata HTTP/1.1\r\n | |
|
169 | s> Accept-Encoding: identity\r\n | |
|
170 | s> accept: application/mercurial-exp-framing-0005\r\n | |
|
171 | s> content-type: application/mercurial-exp-framing-0005\r\n | |
|
172 | s> content-length: 89\r\n | |
|
173 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
|
174 | s> user-agent: Mercurial debugwireproto\r\n | |
|
175 | s> \r\n | |
|
176 | s> Q\x00\x00\x01\x00\x01\x01\x11\xa2Dargs\xa1Inoderange\x82\x81T3\x90\xef\x85\x00s\xfb\xc2\xf0\xdf\xff"D4,\x8e\x92)\x01:\x81T\x0b\xb8\xad\x89J\x15\xb1S\x80\xb2\xa2\xa5\xb1\x83\xe2\x0f*K(\xddDnameMchangesetdata | |
|
177 | s> makefile('rb', None) | |
|
178 | s> HTTP/1.1 200 OK\r\n | |
|
179 | s> Server: testing stub value\r\n | |
|
180 | s> Date: $HTTP_DATE$\r\n | |
|
181 | s> Content-Type: application/mercurial-exp-framing-0005\r\n | |
|
182 | s> Transfer-Encoding: chunked\r\n | |
|
183 | s> \r\n | |
|
184 | s> 13\r\n | |
|
185 | s> \x0b\x00\x00\x01\x00\x02\x011 | |
|
186 | s> \xa1FstatusBok | |
|
187 | s> \r\n | |
|
188 | received frame(size=11; request=1; stream=2; streamflags=stream-begin; type=command-response; flags=continuation) | |
|
189 | s> 4b\r\n | |
|
190 | s> C\x00\x00\x01\x00\x02\x001 | |
|
191 | s> \xa1Jtotalitems\x02\xa1DnodeTu\x92\x91~\x1c>\x82g|\xb0\xa4\xbcq\\\xa2]\xd1-(\xc1\xa1DnodeT\x0b\xb8\xad\x89J\x15\xb1S\x80\xb2\xa2\xa5\xb1\x83\xe2\x0f*K(\xdd | |
|
192 | s> \r\n | |
|
193 | received frame(size=67; request=1; stream=2; streamflags=; type=command-response; flags=continuation) | |
|
194 | s> 8\r\n | |
|
195 | s> \x00\x00\x00\x01\x00\x02\x002 | |
|
196 | s> \r\n | |
|
197 | s> 0\r\n | |
|
198 | s> \r\n | |
|
199 | received frame(size=0; request=1; stream=2; streamflags=; type=command-response; flags=eos) | |
|
200 | response: gen[ | |
|
201 | { | |
|
202 | b'totalitems': 2 | |
|
203 | }, | |
|
204 | { | |
|
205 | b'node': b'u\x92\x91~\x1c>\x82g|\xb0\xa4\xbcq\\\xa2]\xd1-(\xc1' | |
|
206 | }, | |
|
207 | { | |
|
208 | b'node': b'\x0b\xb8\xad\x89J\x15\xb1S\x80\xb2\xa2\xa5\xb1\x83\xe2\x0f*K(\xdd' | |
|
209 | } | |
|
210 | ] | |
|
211 | ||
|
212 | Requesting data on a single node by node works | |
|
213 | ||
|
214 | $ sendhttpv2peer << EOF | |
|
215 | > command changesetdata | |
|
216 | > nodes eval:[b'\x33\x90\xef\x85\x00\x73\xfb\xc2\xf0\xdf\xff\x22\x44\x34\x2c\x8e\x92\x29\x01\x3a'] | |
|
217 | > EOF | |
|
218 | creating http peer for wire protocol version 2 | |
|
219 | sending changesetdata command | |
|
220 | s> POST /api/exp-http-v2-0001/ro/changesetdata HTTP/1.1\r\n | |
|
221 | s> Accept-Encoding: identity\r\n | |
|
222 | s> accept: application/mercurial-exp-framing-0005\r\n | |
|
223 | s> content-type: application/mercurial-exp-framing-0005\r\n | |
|
224 | s> content-length: 62\r\n | |
|
225 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
|
226 | s> user-agent: Mercurial debugwireproto\r\n | |
|
227 | s> \r\n | |
|
228 | s> 6\x00\x00\x01\x00\x01\x01\x11\xa2Dargs\xa1Enodes\x81T3\x90\xef\x85\x00s\xfb\xc2\xf0\xdf\xff"D4,\x8e\x92)\x01:DnameMchangesetdata | |
|
229 | s> makefile('rb', None) | |
|
230 | s> HTTP/1.1 200 OK\r\n | |
|
231 | s> Server: testing stub value\r\n | |
|
232 | s> Date: $HTTP_DATE$\r\n | |
|
233 | s> Content-Type: application/mercurial-exp-framing-0005\r\n | |
|
234 | s> Transfer-Encoding: chunked\r\n | |
|
235 | s> \r\n | |
|
236 | s> 13\r\n | |
|
237 | s> \x0b\x00\x00\x01\x00\x02\x011 | |
|
238 | s> \xa1FstatusBok | |
|
239 | s> \r\n | |
|
240 | received frame(size=11; request=1; stream=2; streamflags=stream-begin; type=command-response; flags=continuation) | |
|
241 | s> 30\r\n | |
|
242 | s> (\x00\x00\x01\x00\x02\x001 | |
|
243 | s> \xa1Jtotalitems\x01\xa1DnodeT3\x90\xef\x85\x00s\xfb\xc2\xf0\xdf\xff"D4,\x8e\x92)\x01: | |
|
244 | s> \r\n | |
|
245 | received frame(size=40; request=1; stream=2; streamflags=; type=command-response; flags=continuation) | |
|
246 | s> 8\r\n | |
|
247 | s> \x00\x00\x00\x01\x00\x02\x002 | |
|
248 | s> \r\n | |
|
249 | s> 0\r\n | |
|
250 | s> \r\n | |
|
251 | received frame(size=0; request=1; stream=2; streamflags=; type=command-response; flags=eos) | |
|
252 | response: gen[ | |
|
253 | { | |
|
254 | b'totalitems': 1 | |
|
255 | }, | |
|
256 | { | |
|
257 | b'node': b'3\x90\xef\x85\x00s\xfb\xc2\xf0\xdf\xff"D4,\x8e\x92)\x01:' | |
|
258 | } | |
|
259 | ] | |
|
260 | ||
|
261 | Specifying a noderange and nodes takes union | |
|
262 | ||
|
263 | $ sendhttpv2peer << EOF | |
|
264 | > command changesetdata | |
|
265 | > noderange eval:[[b'\x75\x92\x91\x7e\x1c\x3e\x82\x67\x7c\xb0\xa4\xbc\x71\x5c\xa2\x5d\xd1\x2d\x28\xc1'], [b'\x0b\xb8\xad\x89\x4a\x15\xb1\x53\x80\xb2\xa2\xa5\xb1\x83\xe2\x0f\x2a\x4b\x28\xdd']] | |
|
266 | > nodes eval:[b'\xea\xe5\xf8\x2c\x2e\x62\x23\x68\xd2\x7d\xae\xcb\x76\xb7\xe3\x93\xd0\xf2\x42\x11'] | |
|
267 | > EOF | |
|
268 | creating http peer for wire protocol version 2 | |
|
269 | sending changesetdata command | |
|
270 | s> POST /api/exp-http-v2-0001/ro/changesetdata HTTP/1.1\r\n | |
|
271 | s> Accept-Encoding: identity\r\n | |
|
272 | s> accept: application/mercurial-exp-framing-0005\r\n | |
|
273 | s> content-type: application/mercurial-exp-framing-0005\r\n | |
|
274 | s> content-length: 117\r\n | |
|
275 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
|
276 | s> user-agent: Mercurial debugwireproto\r\n | |
|
277 | s> \r\n | |
|
278 | s> m\x00\x00\x01\x00\x01\x01\x11\xa2Dargs\xa2Inoderange\x82\x81Tu\x92\x91~\x1c>\x82g|\xb0\xa4\xbcq\\\xa2]\xd1-(\xc1\x81T\x0b\xb8\xad\x89J\x15\xb1S\x80\xb2\xa2\xa5\xb1\x83\xe2\x0f*K(\xddEnodes\x81T\xea\xe5\xf8,.b#h\xd2}\xae\xcbv\xb7\xe3\x93\xd0\xf2B\x11DnameMchangesetdata | |
|
279 | s> makefile('rb', None) | |
|
280 | s> HTTP/1.1 200 OK\r\n | |
|
281 | s> Server: testing stub value\r\n | |
|
282 | s> Date: $HTTP_DATE$\r\n | |
|
283 | s> Content-Type: application/mercurial-exp-framing-0005\r\n | |
|
284 | s> Transfer-Encoding: chunked\r\n | |
|
285 | s> \r\n | |
|
286 | s> 13\r\n | |
|
287 | s> \x0b\x00\x00\x01\x00\x02\x011 | |
|
288 | s> \xa1FstatusBok | |
|
289 | s> \r\n | |
|
290 | received frame(size=11; request=1; stream=2; streamflags=stream-begin; type=command-response; flags=continuation) | |
|
291 | s> 4b\r\n | |
|
292 | s> C\x00\x00\x01\x00\x02\x001 | |
|
293 | s> \xa1Jtotalitems\x02\xa1DnodeT\xea\xe5\xf8,.b#h\xd2}\xae\xcbv\xb7\xe3\x93\xd0\xf2B\x11\xa1DnodeT\x0b\xb8\xad\x89J\x15\xb1S\x80\xb2\xa2\xa5\xb1\x83\xe2\x0f*K(\xdd | |
|
294 | s> \r\n | |
|
295 | received frame(size=67; request=1; stream=2; streamflags=; type=command-response; flags=continuation) | |
|
296 | s> 8\r\n | |
|
297 | s> \x00\x00\x00\x01\x00\x02\x002 | |
|
298 | s> \r\n | |
|
299 | s> 0\r\n | |
|
300 | s> \r\n | |
|
301 | received frame(size=0; request=1; stream=2; streamflags=; type=command-response; flags=eos) | |
|
302 | response: gen[ | |
|
303 | { | |
|
304 | b'totalitems': 2 | |
|
305 | }, | |
|
306 | { | |
|
307 | b'node': b'\xea\xe5\xf8,.b#h\xd2}\xae\xcbv\xb7\xe3\x93\xd0\xf2B\x11' | |
|
308 | }, | |
|
309 | { | |
|
310 | b'node': b'\x0b\xb8\xad\x89J\x15\xb1S\x80\xb2\xa2\xa5\xb1\x83\xe2\x0f*K(\xdd' | |
|
311 | } | |
|
312 | ] | |
|
313 | ||
|
314 | Parents data is transferred upon request | |
|
315 | ||
|
316 | $ sendhttpv2peer << EOF | |
|
317 | > command changesetdata | |
|
318 | > fields eval:[b'parents'] | |
|
319 | > nodes eval:[b'\xea\xe5\xf8\x2c\x2e\x62\x23\x68\xd2\x7d\xae\xcb\x76\xb7\xe3\x93\xd0\xf2\x42\x11'] | |
|
320 | > EOF | |
|
321 | creating http peer for wire protocol version 2 | |
|
322 | sending changesetdata command | |
|
323 | s> POST /api/exp-http-v2-0001/ro/changesetdata HTTP/1.1\r\n | |
|
324 | s> Accept-Encoding: identity\r\n | |
|
325 | s> accept: application/mercurial-exp-framing-0005\r\n | |
|
326 | s> content-type: application/mercurial-exp-framing-0005\r\n | |
|
327 | s> content-length: 78\r\n | |
|
328 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
|
329 | s> user-agent: Mercurial debugwireproto\r\n | |
|
330 | s> \r\n | |
|
331 | s> F\x00\x00\x01\x00\x01\x01\x11\xa2Dargs\xa2Ffields\x81GparentsEnodes\x81T\xea\xe5\xf8,.b#h\xd2}\xae\xcbv\xb7\xe3\x93\xd0\xf2B\x11DnameMchangesetdata | |
|
332 | s> makefile('rb', None) | |
|
333 | s> HTTP/1.1 200 OK\r\n | |
|
334 | s> Server: testing stub value\r\n | |
|
335 | s> Date: $HTTP_DATE$\r\n | |
|
336 | s> Content-Type: application/mercurial-exp-framing-0005\r\n | |
|
337 | s> Transfer-Encoding: chunked\r\n | |
|
338 | s> \r\n | |
|
339 | s> 13\r\n | |
|
340 | s> \x0b\x00\x00\x01\x00\x02\x011 | |
|
341 | s> \xa1FstatusBok | |
|
342 | s> \r\n | |
|
343 | received frame(size=11; request=1; stream=2; streamflags=stream-begin; type=command-response; flags=continuation) | |
|
344 | s> 63\r\n | |
|
345 | s> [\x00\x00\x01\x00\x02\x001 | |
|
346 | s> \xa1Jtotalitems\x01\xa2DnodeT\xea\xe5\xf8,.b#h\xd2}\xae\xcbv\xb7\xe3\x93\xd0\xf2B\x11Gparents\x82T3\x90\xef\x85\x00s\xfb\xc2\xf0\xdf\xff"D4,\x8e\x92)\x01:T\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00 | |
|
347 | s> \r\n | |
|
348 | received frame(size=91; request=1; stream=2; streamflags=; type=command-response; flags=continuation) | |
|
349 | s> 8\r\n | |
|
350 | s> \x00\x00\x00\x01\x00\x02\x002 | |
|
351 | s> \r\n | |
|
352 | s> 0\r\n | |
|
353 | s> \r\n | |
|
354 | received frame(size=0; request=1; stream=2; streamflags=; type=command-response; flags=eos) | |
|
355 | response: gen[ | |
|
356 | { | |
|
357 | b'totalitems': 1 | |
|
358 | }, | |
|
359 | { | |
|
360 | b'node': b'\xea\xe5\xf8,.b#h\xd2}\xae\xcbv\xb7\xe3\x93\xd0\xf2B\x11', | |
|
361 | b'parents': [ | |
|
362 | b'3\x90\xef\x85\x00s\xfb\xc2\xf0\xdf\xff"D4,\x8e\x92)\x01:', | |
|
363 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' | |
|
364 | ] | |
|
365 | } | |
|
366 | ] | |
|
367 | ||
|
368 | Revision data is transferred upon request | |
|
369 | ||
|
370 | $ sendhttpv2peer << EOF | |
|
371 | > command changesetdata | |
|
372 | > fields eval:[b'revision'] | |
|
373 | > nodes eval:[b'\xea\xe5\xf8\x2c\x2e\x62\x23\x68\xd2\x7d\xae\xcb\x76\xb7\xe3\x93\xd0\xf2\x42\x11'] | |
|
374 | > EOF | |
|
375 | creating http peer for wire protocol version 2 | |
|
376 | sending changesetdata command | |
|
377 | s> POST /api/exp-http-v2-0001/ro/changesetdata HTTP/1.1\r\n | |
|
378 | s> Accept-Encoding: identity\r\n | |
|
379 | s> accept: application/mercurial-exp-framing-0005\r\n | |
|
380 | s> content-type: application/mercurial-exp-framing-0005\r\n | |
|
381 | s> content-length: 79\r\n | |
|
382 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
|
383 | s> user-agent: Mercurial debugwireproto\r\n | |
|
384 | s> \r\n | |
|
385 | s> G\x00\x00\x01\x00\x01\x01\x11\xa2Dargs\xa2Ffields\x81HrevisionEnodes\x81T\xea\xe5\xf8,.b#h\xd2}\xae\xcbv\xb7\xe3\x93\xd0\xf2B\x11DnameMchangesetdata | |
|
386 | s> makefile('rb', None) | |
|
387 | s> HTTP/1.1 200 OK\r\n | |
|
388 | s> Server: testing stub value\r\n | |
|
389 | s> Date: $HTTP_DATE$\r\n | |
|
390 | s> Content-Type: application/mercurial-exp-framing-0005\r\n | |
|
391 | s> Transfer-Encoding: chunked\r\n | |
|
392 | s> \r\n | |
|
393 | s> 13\r\n | |
|
394 | s> \x0b\x00\x00\x01\x00\x02\x011 | |
|
395 | s> \xa1FstatusBok | |
|
396 | s> \r\n | |
|
397 | received frame(size=11; request=1; stream=2; streamflags=stream-begin; type=command-response; flags=continuation) | |
|
398 | s> 7e\r\n | |
|
399 | s> v\x00\x00\x01\x00\x02\x001 | |
|
400 | s> \xa1Jtotalitems\x01\xa2DnodeT\xea\xe5\xf8,.b#h\xd2}\xae\xcbv\xb7\xe3\x93\xd0\xf2B\x11Lrevisionsize\x18=X=1b74476799ec8318045db759b1b4bcc9b839d0aa\n | |
|
401 | s> test\n | |
|
402 | s> 0 0\n | |
|
403 | s> a\n | |
|
404 | s> \n | |
|
405 | s> commit 3 | |
|
406 | s> \r\n | |
|
407 | received frame(size=118; request=1; stream=2; streamflags=; type=command-response; flags=continuation) | |
|
408 | s> 8\r\n | |
|
409 | s> \x00\x00\x00\x01\x00\x02\x002 | |
|
410 | s> \r\n | |
|
411 | s> 0\r\n | |
|
412 | s> \r\n | |
|
413 | received frame(size=0; request=1; stream=2; streamflags=; type=command-response; flags=eos) | |
|
414 | response: gen[ | |
|
415 | { | |
|
416 | b'totalitems': 1 | |
|
417 | }, | |
|
418 | { | |
|
419 | b'node': b'\xea\xe5\xf8,.b#h\xd2}\xae\xcbv\xb7\xe3\x93\xd0\xf2B\x11', | |
|
420 | b'revisionsize': 61 | |
|
421 | }, | |
|
422 | b'1b74476799ec8318045db759b1b4bcc9b839d0aa\ntest\n0 0\na\n\ncommit 3' | |
|
423 | ] | |
|
424 | ||
|
425 | Multiple fields can be transferred | |
|
426 | ||
|
427 | $ sendhttpv2peer << EOF | |
|
428 | > command changesetdata | |
|
429 | > fields eval:[b'parents', b'revision'] | |
|
430 | > nodes eval:[b'\xea\xe5\xf8\x2c\x2e\x62\x23\x68\xd2\x7d\xae\xcb\x76\xb7\xe3\x93\xd0\xf2\x42\x11'] | |
|
431 | > EOF | |
|
432 | creating http peer for wire protocol version 2 | |
|
433 | sending changesetdata command | |
|
434 | s> POST /api/exp-http-v2-0001/ro/changesetdata HTTP/1.1\r\n | |
|
435 | s> Accept-Encoding: identity\r\n | |
|
436 | s> accept: application/mercurial-exp-framing-0005\r\n | |
|
437 | s> content-type: application/mercurial-exp-framing-0005\r\n | |
|
438 | s> content-length: 87\r\n | |
|
439 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
|
440 | s> user-agent: Mercurial debugwireproto\r\n | |
|
441 | s> \r\n | |
|
442 | s> O\x00\x00\x01\x00\x01\x01\x11\xa2Dargs\xa2Ffields\x82GparentsHrevisionEnodes\x81T\xea\xe5\xf8,.b#h\xd2}\xae\xcbv\xb7\xe3\x93\xd0\xf2B\x11DnameMchangesetdata | |
|
443 | s> makefile('rb', None) | |
|
444 | s> HTTP/1.1 200 OK\r\n | |
|
445 | s> Server: testing stub value\r\n | |
|
446 | s> Date: $HTTP_DATE$\r\n | |
|
447 | s> Content-Type: application/mercurial-exp-framing-0005\r\n | |
|
448 | s> Transfer-Encoding: chunked\r\n | |
|
449 | s> \r\n | |
|
450 | s> 13\r\n | |
|
451 | s> \x0b\x00\x00\x01\x00\x02\x011 | |
|
452 | s> \xa1FstatusBok | |
|
453 | s> \r\n | |
|
454 | received frame(size=11; request=1; stream=2; streamflags=stream-begin; type=command-response; flags=continuation) | |
|
455 | s> b1\r\n | |
|
456 | s> \xa9\x00\x00\x01\x00\x02\x001 | |
|
457 | s> \xa1Jtotalitems\x01\xa3DnodeT\xea\xe5\xf8,.b#h\xd2}\xae\xcbv\xb7\xe3\x93\xd0\xf2B\x11Gparents\x82T3\x90\xef\x85\x00s\xfb\xc2\xf0\xdf\xff"D4,\x8e\x92)\x01:T\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00Lrevisionsize\x18=X=1b74476799ec8318045db759b1b4bcc9b839d0aa\n | |
|
458 | s> test\n | |
|
459 | s> 0 0\n | |
|
460 | s> a\n | |
|
461 | s> \n | |
|
462 | s> commit 3 | |
|
463 | s> \r\n | |
|
464 | received frame(size=169; request=1; stream=2; streamflags=; type=command-response; flags=continuation) | |
|
465 | s> 8\r\n | |
|
466 | s> \x00\x00\x00\x01\x00\x02\x002 | |
|
467 | s> \r\n | |
|
468 | s> 0\r\n | |
|
469 | s> \r\n | |
|
470 | received frame(size=0; request=1; stream=2; streamflags=; type=command-response; flags=eos) | |
|
471 | response: gen[ | |
|
472 | { | |
|
473 | b'totalitems': 1 | |
|
474 | }, | |
|
475 | { | |
|
476 | b'node': b'\xea\xe5\xf8,.b#h\xd2}\xae\xcbv\xb7\xe3\x93\xd0\xf2B\x11', | |
|
477 | b'parents': [ | |
|
478 | b'3\x90\xef\x85\x00s\xfb\xc2\xf0\xdf\xff"D4,\x8e\x92)\x01:', | |
|
479 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' | |
|
480 | ], | |
|
481 | b'revisionsize': 61 | |
|
482 | }, | |
|
483 | b'1b74476799ec8318045db759b1b4bcc9b839d0aa\ntest\n0 0\na\n\ncommit 3' | |
|
484 | ] | |
|
485 | ||
|
486 | $ cat error.log |
@@ -1508,7 +1508,7 b' def pull(repo, remote, heads=None, force' | |||
|
1508 | 1508 | pullop.trmanager = transactionmanager(repo, 'pull', remote.url()) |
|
1509 | 1509 | with repo.wlock(), repo.lock(), pullop.trmanager: |
|
1510 | 1510 | # Use the modern wire protocol, if available. |
|
1511 |
if remote.capable(' |
|
|
1511 | if remote.capable('command-changesetdata'): | |
|
1512 | 1512 | exchangev2.pull(pullop) |
|
1513 | 1513 | else: |
|
1514 | 1514 | # This should ideally be in _pullbundle2(). However, it needs to run |
@@ -87,6 +87,90 b' rawrepoformats' | |||
|
87 | 87 | requirements can be used to determine whether a client can read a |
|
88 | 88 | *raw* copy of file data available. |
|
89 | 89 | |
|
90 | changesetdata | |
|
91 | ------------- | |
|
92 | ||
|
93 | Obtain various data related to changesets. | |
|
94 | ||
|
95 | The command accepts the following arguments: | |
|
96 | ||
|
97 | noderange | |
|
98 | (array of arrays of bytestrings) An array of 2 elements, each being an | |
|
99 | array of node bytestrings. The first array denotes the changelog revisions | |
|
100 | that are already known to the client. The second array denotes the changelog | |
|
101 | revision DAG heads to fetch. The argument essentially defines a DAG range | |
|
102 | bounded by root and head nodes to fetch. | |
|
103 | ||
|
104 | The roots array may be empty. The heads array must be defined. | |
|
105 | ||
|
106 | nodes | |
|
107 | (array of bytestrings) Changelog revisions to request explicitly. | |
|
108 | ||
|
109 | fields | |
|
110 | (set of bytestring) Which data associated with changelog revisions to | |
|
111 | fetch. The following values are recognized: | |
|
112 | ||
|
113 | parents | |
|
114 | Parent revisions. | |
|
115 | ||
|
116 | revision | |
|
117 | The raw, revision data for the changelog entry. The hash of this data | |
|
118 | will match the revision's node value. | |
|
119 | ||
|
120 | The server resolves the set of revisions relevant to the request by taking | |
|
121 | the union of the ``noderange`` and ``nodes`` arguments. At least one of these | |
|
122 | arguments must be defined. | |
|
123 | ||
|
124 | The response bytestream starts with a CBOR map describing the data that follows. | |
|
125 | This map has the following bytestring keys: | |
|
126 | ||
|
127 | totalitems | |
|
128 | (unsigned integer) Total number of changelog revisions whose data is being | |
|
129 | transferred. | |
|
130 | ||
|
131 | Following the map header is a series of 0 or more CBOR values. If values | |
|
132 | are present, the first value will always be a map describing a single changeset | |
|
133 | revision. If revision data is requested, the raw revision data (encoded as | |
|
134 | a CBOR bytestring) will follow the map describing it. Otherwise, another CBOR | |
|
135 | map describing the next changeset revision will occur. | |
|
136 | ||
|
137 | Each map has the following bytestring keys: | |
|
138 | ||
|
139 | node | |
|
140 | (bytestring) The node value for this revision. This is the SHA-1 hash of | |
|
141 | the raw revision data. | |
|
142 | ||
|
143 | parents (optional) | |
|
144 | (array of bytestrings) The nodes representing the parent revisions of this | |
|
145 | revision. Only present if ``parents`` data is being requested. | |
|
146 | ||
|
147 | revisionsize (optional) | |
|
148 | (unsigned integer) Indicates the size of raw revision data that follows this | |
|
149 | map. The following data contains a serialized form of the changeset data, | |
|
150 | including the author, date, commit message, set of changed files, manifest | |
|
151 | node, and other metadata. | |
|
152 | ||
|
153 | Only present if ``revision`` data was requested and the data follows this | |
|
154 | map. | |
|
155 | ||
|
156 | If nodes are requested via ``noderange``, they will be emitted in DAG order, | |
|
157 | parents always before children. | |
|
158 | ||
|
159 | If nodes are requested via ``nodes``, they will be emitted in requested order. | |
|
160 | ||
|
161 | Nodes from ``nodes`` are emitted before nodes from ``noderange``. | |
|
162 | ||
|
163 | TODO support different revision selection mechanisms (e.g. non-public, specific | |
|
164 | revisions) | |
|
165 | TODO support different hash "namespaces" for revisions (e.g. sha-1 versus other) | |
|
166 | TODO support emitting phases data | |
|
167 | TODO support emitting bookmarks data | |
|
168 | TODO support emitting obsolescence data | |
|
169 | TODO support filtering based on relevant paths (narrow clone) | |
|
170 | TODO support depth limiting | |
|
171 | TODO support hgtagsfnodes cache / tags data | |
|
172 | TODO support branch heads cache | |
|
173 | ||
|
90 | 174 | heads |
|
91 | 175 | ----- |
|
92 | 176 |
@@ -802,8 +802,7 b' class httpv2peer(object):' | |||
|
802 | 802 | return True |
|
803 | 803 | |
|
804 | 804 | # Other concepts. |
|
805 | # TODO remove exchangev2 once we have a command implemented. | |
|
806 | if name in ('bundle2', 'exchangev2'): | |
|
805 | if name in ('bundle2'): | |
|
807 | 806 | return True |
|
808 | 807 | |
|
809 | 808 | # Alias command-* to presence of command of that name. |
@@ -9,7 +9,11 b' from __future__ import absolute_import' | |||
|
9 | 9 | import contextlib |
|
10 | 10 | |
|
11 | 11 | from .i18n import _ |
|
12 | from .node import ( | |
|
13 | nullid, | |
|
14 | ) | |
|
12 | 15 | from . import ( |
|
16 | discovery, | |
|
13 | 17 | encoding, |
|
14 | 18 | error, |
|
15 | 19 | pycompat, |
@@ -460,6 +464,81 b' def branchmapv2(repo, proto):' | |||
|
460 | 464 | def capabilitiesv2(repo, proto): |
|
461 | 465 | yield _capabilitiesv2(repo, proto) |
|
462 | 466 | |
|
467 | @wireprotocommand('changesetdata', | |
|
468 | args={ | |
|
469 | 'noderange': [[b'0123456...'], [b'abcdef...']], | |
|
470 | 'nodes': [b'0123456...'], | |
|
471 | 'fields': {b'parents', b'revision'}, | |
|
472 | }, | |
|
473 | permission='pull') | |
|
474 | def changesetdata(repo, proto, noderange=None, nodes=None, fields=None): | |
|
475 | fields = fields or set() | |
|
476 | ||
|
477 | if noderange is None and nodes is None: | |
|
478 | raise error.WireprotoCommandError( | |
|
479 | 'noderange or nodes must be defined') | |
|
480 | ||
|
481 | if noderange is not None: | |
|
482 | if len(noderange) != 2: | |
|
483 | raise error.WireprotoCommandError( | |
|
484 | 'noderange must consist of 2 elements') | |
|
485 | ||
|
486 | if not noderange[1]: | |
|
487 | raise error.WireprotoCommandError( | |
|
488 | 'heads in noderange request cannot be empty') | |
|
489 | ||
|
490 | cl = repo.changelog | |
|
491 | hasnode = cl.hasnode | |
|
492 | ||
|
493 | seen = set() | |
|
494 | outgoing = [] | |
|
495 | ||
|
496 | if nodes is not None: | |
|
497 | outgoing.extend(n for n in nodes if hasnode(n)) | |
|
498 | seen |= set(outgoing) | |
|
499 | ||
|
500 | if noderange is not None: | |
|
501 | if noderange[0]: | |
|
502 | common = [n for n in noderange[0] if hasnode(n)] | |
|
503 | else: | |
|
504 | common = [nullid] | |
|
505 | ||
|
506 | for n in discovery.outgoing(repo, common, noderange[1]).missing: | |
|
507 | if n not in seen: | |
|
508 | outgoing.append(n) | |
|
509 | # Don't need to add to seen here because this is the final | |
|
510 | # source of nodes and there should be no duplicates in this | |
|
511 | # list. | |
|
512 | ||
|
513 | seen.clear() | |
|
514 | ||
|
515 | if outgoing: | |
|
516 | repo.hook('preoutgoing', throw=True, source='serve') | |
|
517 | ||
|
518 | yield { | |
|
519 | b'totalitems': len(outgoing), | |
|
520 | } | |
|
521 | ||
|
522 | # It is already topologically sorted by revision number. | |
|
523 | for node in outgoing: | |
|
524 | d = { | |
|
525 | b'node': node, | |
|
526 | } | |
|
527 | ||
|
528 | if b'parents' in fields: | |
|
529 | d[b'parents'] = cl.parents(node) | |
|
530 | ||
|
531 | revisiondata = None | |
|
532 | ||
|
533 | if b'revision' in fields: | |
|
534 | revisiondata = cl.revision(node, raw=True) | |
|
535 | d[b'revisionsize'] = len(revisiondata) | |
|
536 | ||
|
537 | yield d | |
|
538 | ||
|
539 | if revisiondata is not None: | |
|
540 | yield revisiondata | |
|
541 | ||
|
463 | 542 | @wireprotocommand('heads', |
|
464 | 543 | args={ |
|
465 | 544 | 'publiconly': False, |
@@ -313,7 +313,7 b' Client with HTTPv2 enabled automatically' | |||
|
313 | 313 | s> Content-Type: application/mercurial-cbor\r\n |
|
314 | 314 | s> Content-Length: *\r\n (glob) |
|
315 | 315 | s> \r\n |
|
316 |
s> \xa3GapibaseDapi/Dapis\xa1Pexp-http-v2-0001\xa4Hcommands\xa |
|
|
316 | s> \xa3GapibaseDapi/Dapis\xa1Pexp-http-v2-0001\xa4Hcommands\xa8Ibranchmap\xa2Dargs\xa0Kpermissions\x81DpullLcapabilities\xa2Dargs\xa0Kpermissions\x81DpullMchangesetdata\xa2Dargs\xa3Ffields\xd9\x01\x02\x82GparentsHrevisionInoderange\x82\x81J0123456...\x81Iabcdef...Enodes\x81J0123456...Kpermissions\x81DpullEheads\xa2Dargs\xa1Jpubliconly\xf4Kpermissions\x81DpullEknown\xa2Dargs\xa1Enodes\x81HdeadbeefKpermissions\x81DpullHlistkeys\xa2Dargs\xa1InamespaceBnsKpermissions\x81DpullFlookup\xa2Dargs\xa1CkeyCfooKpermissions\x81DpullGpushkey\xa2Dargs\xa4CkeyCkeyInamespaceBnsCnewCnewColdColdKpermissions\x81DpushKcompression\x81\xa1DnameDzlibQframingmediatypes\x81X&application/mercurial-exp-framing-0005Nrawrepoformats\x82LgeneraldeltaHrevlogv1Nv1capabilitiesY\x01\xc5batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset compression=$BUNDLE2_COMPRESSIONS$ getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash | |
|
317 | 317 | sending heads command |
|
318 | 318 | s> POST /api/exp-http-v2-0001/ro/heads HTTP/1.1\r\n |
|
319 | 319 | s> Accept-Encoding: identity\r\n |
@@ -212,7 +212,7 b' Request for HTTPv2 service returns infor' | |||
|
212 | 212 | s> Content-Type: application/mercurial-cbor\r\n |
|
213 | 213 | s> Content-Length: *\r\n (glob) |
|
214 | 214 | s> \r\n |
|
215 |
s> \xa3GapibaseDapi/Dapis\xa1Pexp-http-v2-0001\xa4Hcommands\xa |
|
|
215 | s> \xa3GapibaseDapi/Dapis\xa1Pexp-http-v2-0001\xa4Hcommands\xa8Ibranchmap\xa2Dargs\xa0Kpermissions\x81DpullLcapabilities\xa2Dargs\xa0Kpermissions\x81DpullMchangesetdata\xa2Dargs\xa3Ffields\xd9\x01\x02\x82GparentsHrevisionInoderange\x82\x81J0123456...\x81Iabcdef...Enodes\x81J0123456...Kpermissions\x81DpullEheads\xa2Dargs\xa1Jpubliconly\xf4Kpermissions\x81DpullEknown\xa2Dargs\xa1Enodes\x81HdeadbeefKpermissions\x81DpullHlistkeys\xa2Dargs\xa1InamespaceBnsKpermissions\x81DpullFlookup\xa2Dargs\xa1CkeyCfooKpermissions\x81DpullGpushkey\xa2Dargs\xa4CkeyCkeyInamespaceBnsCnewCnewColdColdKpermissions\x81DpushKcompression\x81\xa1DnameDzlibQframingmediatypes\x81X&application/mercurial-exp-framing-0005Nrawrepoformats\x82LgeneraldeltaHrevlogv1Nv1capabilitiesY\x01\xc5batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset compression=$BUNDLE2_COMPRESSIONS$ getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash | |
|
216 | 216 | cbor> { |
|
217 | 217 | b'apibase': b'api/', |
|
218 | 218 | b'apis': { |
@@ -230,6 +230,28 b' Request for HTTPv2 service returns infor' | |||
|
230 | 230 | b'pull' |
|
231 | 231 | ] |
|
232 | 232 | }, |
|
233 | b'changesetdata': { | |
|
234 | b'args': { | |
|
235 | b'fields': set([ | |
|
236 | b'parents', | |
|
237 | b'revision' | |
|
238 | ]), | |
|
239 | b'noderange': [ | |
|
240 | [ | |
|
241 | b'0123456...' | |
|
242 | ], | |
|
243 | [ | |
|
244 | b'abcdef...' | |
|
245 | ] | |
|
246 | ], | |
|
247 | b'nodes': [ | |
|
248 | b'0123456...' | |
|
249 | ] | |
|
250 | }, | |
|
251 | b'permissions': [ | |
|
252 | b'pull' | |
|
253 | ] | |
|
254 | }, | |
|
233 | 255 | b'heads': { |
|
234 | 256 | b'args': { |
|
235 | 257 | b'publiconly': False |
@@ -315,11 +337,11 b' capabilities command returns expected in' | |||
|
315 | 337 | s> Content-Type: application/mercurial-cbor\r\n |
|
316 | 338 | s> Content-Length: *\r\n (glob) |
|
317 | 339 | s> \r\n |
|
318 |
s> \xa3GapibaseDapi/Dapis\xa1Pexp-http-v2-0001\xa4Hcommands\xa |
|
|
340 | s> \xa3GapibaseDapi/Dapis\xa1Pexp-http-v2-0001\xa4Hcommands\xa8Ibranchmap\xa2Dargs\xa0Kpermissions\x81DpullLcapabilities\xa2Dargs\xa0Kpermissions\x81DpullMchangesetdata\xa2Dargs\xa3Ffields\xd9\x01\x02\x82GparentsHrevisionInoderange\x82\x81J0123456...\x81Iabcdef...Enodes\x81J0123456...Kpermissions\x81DpullEheads\xa2Dargs\xa1Jpubliconly\xf4Kpermissions\x81DpullEknown\xa2Dargs\xa1Enodes\x81HdeadbeefKpermissions\x81DpullHlistkeys\xa2Dargs\xa1InamespaceBnsKpermissions\x81DpullFlookup\xa2Dargs\xa1CkeyCfooKpermissions\x81DpullGpushkey\xa2Dargs\xa4CkeyCkeyInamespaceBnsCnewCnewColdColdKpermissions\x81DpushKcompression\x81\xa1DnameDzlibQframingmediatypes\x81X&application/mercurial-exp-framing-0005Nrawrepoformats\x82LgeneraldeltaHrevlogv1Nv1capabilitiesY\x01\xc5batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset compression=$BUNDLE2_COMPRESSIONS$ getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash | |
|
319 | 341 | sending capabilities command |
|
320 | 342 | s> POST /api/exp-http-v2-0001/ro/capabilities HTTP/1.1\r\n |
|
321 | 343 | s> Accept-Encoding: identity\r\n |
|
322 | s> *\r\n (glob) | |
|
344 | s> accept: application/mercurial-exp-framing-0005\r\n | |
|
323 | 345 | s> content-type: application/mercurial-exp-framing-0005\r\n |
|
324 | 346 | s> content-length: 27\r\n |
|
325 | 347 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
@@ -338,11 +360,11 b' capabilities command returns expected in' | |||
|
338 | 360 | s> \xa1FstatusBok |
|
339 | 361 | s> \r\n |
|
340 | 362 | received frame(size=11; request=1; stream=2; streamflags=stream-begin; type=command-response; flags=continuation) |
|
341 |
s> |
|
|
342 |
s> |
|
|
343 |
s> \xa4Hcommands\xa |
|
|
363 | s> 243\r\n | |
|
364 | s> ;\x02\x00\x01\x00\x02\x001 | |
|
365 | s> \xa4Hcommands\xa8Ibranchmap\xa2Dargs\xa0Kpermissions\x81DpullLcapabilities\xa2Dargs\xa0Kpermissions\x81DpullMchangesetdata\xa2Dargs\xa3Ffields\xd9\x01\x02\x82GparentsHrevisionInoderange\x82\x81J0123456...\x81Iabcdef...Enodes\x81J0123456...Kpermissions\x81DpullEheads\xa2Dargs\xa1Jpubliconly\xf4Kpermissions\x81DpullEknown\xa2Dargs\xa1Enodes\x81HdeadbeefKpermissions\x81DpullHlistkeys\xa2Dargs\xa1InamespaceBnsKpermissions\x81DpullFlookup\xa2Dargs\xa1CkeyCfooKpermissions\x81DpullGpushkey\xa2Dargs\xa4CkeyCkeyInamespaceBnsCnewCnewColdColdKpermissions\x81DpushKcompression\x81\xa1DnameDzlibQframingmediatypes\x81X&application/mercurial-exp-framing-0005Nrawrepoformats\x82LgeneraldeltaHrevlogv1 | |
|
344 | 366 | s> \r\n |
|
345 |
received frame(size= |
|
|
367 | received frame(size=571; request=1; stream=2; streamflags=; type=command-response; flags=continuation) | |
|
346 | 368 | s> 8\r\n |
|
347 | 369 | s> \x00\x00\x00\x01\x00\x02\x002 |
|
348 | 370 | s> \r\n |
@@ -364,6 +386,28 b' capabilities command returns expected in' | |||
|
364 | 386 | b'pull' |
|
365 | 387 | ] |
|
366 | 388 | }, |
|
389 | b'changesetdata': { | |
|
390 | b'args': { | |
|
391 | b'fields': set([ | |
|
392 | b'parents', | |
|
393 | b'revision' | |
|
394 | ]), | |
|
395 | b'noderange': [ | |
|
396 | [ | |
|
397 | b'0123456...' | |
|
398 | ], | |
|
399 | [ | |
|
400 | b'abcdef...' | |
|
401 | ] | |
|
402 | ], | |
|
403 | b'nodes': [ | |
|
404 | b'0123456...' | |
|
405 | ] | |
|
406 | }, | |
|
407 | b'permissions': [ | |
|
408 | b'pull' | |
|
409 | ] | |
|
410 | }, | |
|
367 | 411 | b'heads': { |
|
368 | 412 | b'args': { |
|
369 | 413 | b'publiconly': False |
General Comments 0
You need to be logged in to leave comments.
Login now