comparison tests/test-wireproto-command-changesetdata.t @ 40048:a732d70253b0

tests: don't be as verbose in wireprotov2 tests I don't think that printing low-level I/O and frames is beneficial to testing command-level functionality. Protocol-level testing, yes. But command-level functionality shouldn't care about low-level details in most cases. This output makes tests more verbose and harder to read. It also makes them harder to maintain, as you need to glob over various dynamic width fields. Let's remove these low-level details from many of the wireprotov2 tests. Differential Revision: https://phab.mercurial-scm.org/D4861
author Gregory Szorc <gregory.szorc@gmail.com>
date Wed, 03 Oct 2018 09:48:22 -0700
parents 393e44324037
children 6c42409691ec
comparison
equal deleted inserted replaced
40047:8e398628a3f2 40048:a732d70253b0
42 $ sendhttpv2peer << EOF 42 $ sendhttpv2peer << EOF
43 > command changesetdata 43 > command changesetdata
44 > EOF 44 > EOF
45 creating http peer for wire protocol version 2 45 creating http peer for wire protocol version 2
46 sending changesetdata command 46 sending changesetdata command
47 s> POST /api/exp-http-v2-0002/ro/changesetdata HTTP/1.1\r\n
48 s> Accept-Encoding: identity\r\n
49 s> accept: application/mercurial-exp-framing-0005\r\n
50 s> content-type: application/mercurial-exp-framing-0005\r\n
51 s> content-length: 28\r\n
52 s> host: $LOCALIP:$HGPORT\r\n (glob)
53 s> user-agent: Mercurial debugwireproto\r\n
54 s> \r\n
55 s> \x14\x00\x00\x01\x00\x01\x01\x11\xa1DnameMchangesetdata
56 s> makefile('rb', None)
57 s> HTTP/1.1 200 OK\r\n
58 s> Server: testing stub value\r\n
59 s> Date: $HTTP_DATE$\r\n
60 s> Content-Type: application/mercurial-exp-framing-0005\r\n
61 s> Transfer-Encoding: chunked\r\n
62 s> \r\n
63 s> 49\r\n
64 s> A\x00\x00\x01\x00\x02\x012
65 s> \xa2Eerror\xa1GmessageX"noderange or nodes must be definedFstatusEerror
66 s> \r\n
67 received frame(size=65; request=1; stream=2; streamflags=stream-begin; type=command-response; flags=eos)
68 s> 0\r\n
69 s> \r\n
70 abort: noderange or nodes must be defined! 47 abort: noderange or nodes must be defined!
71 [255] 48 [255]
72 49
73 Empty noderange heads results in an error 50 Empty noderange heads results in an error
74 51
76 > command changesetdata 53 > command changesetdata
77 > noderange eval:[[],[]] 54 > noderange eval:[[],[]]
78 > EOF 55 > EOF
79 creating http peer for wire protocol version 2 56 creating http peer for wire protocol version 2
80 sending changesetdata command 57 sending changesetdata command
81 s> POST /api/exp-http-v2-0002/ro/changesetdata HTTP/1.1\r\n
82 s> Accept-Encoding: identity\r\n
83 s> accept: application/mercurial-exp-framing-0005\r\n
84 s> content-type: application/mercurial-exp-framing-0005\r\n
85 s> content-length: 47\r\n
86 s> host: $LOCALIP:$HGPORT\r\n (glob)
87 s> user-agent: Mercurial debugwireproto\r\n
88 s> \r\n
89 s> \'\x00\x00\x01\x00\x01\x01\x11\xa2Dargs\xa1Inoderange\x82\x80\x80DnameMchangesetdata
90 s> makefile('rb', None)
91 s> HTTP/1.1 200 OK\r\n
92 s> Server: testing stub value\r\n
93 s> Date: $HTTP_DATE$\r\n
94 s> Content-Type: application/mercurial-exp-framing-0005\r\n
95 s> Transfer-Encoding: chunked\r\n
96 s> \r\n
97 s> 51\r\n
98 s> I\x00\x00\x01\x00\x02\x012
99 s> \xa2Eerror\xa1GmessageX*heads in noderange request cannot be emptyFstatusEerror
100 s> \r\n
101 received frame(size=73; request=1; stream=2; streamflags=stream-begin; type=command-response; flags=eos)
102 s> 0\r\n
103 s> \r\n
104 abort: heads in noderange request cannot be empty! 58 abort: heads in noderange request cannot be empty!
105 [255] 59 [255]
106 60
107 nodesdepth requires nodes argument 61 nodesdepth requires nodes argument
108 62
111 > nodesdepth 42 65 > nodesdepth 42
112 > noderange eval:[[], [b'ignored']] 66 > noderange eval:[[], [b'ignored']]
113 > EOF 67 > EOF
114 creating http peer for wire protocol version 2 68 creating http peer for wire protocol version 2
115 sending changesetdata command 69 sending changesetdata command
116 s> POST /api/exp-http-v2-0002/ro/changesetdata HTTP/1.1\r\n
117 s> Accept-Encoding: identity\r\n
118 s> accept: application/mercurial-exp-framing-0005\r\n
119 s> content-type: application/mercurial-exp-framing-0005\r\n
120 s> content-length: 69\r\n
121 s> host: $LOCALIP:$HGPORT\r\n (glob)
122 s> user-agent: Mercurial debugwireproto\r\n
123 s> \r\n
124 s> =\x00\x00\x01\x00\x01\x01\x11\xa2Dargs\xa2Inoderange\x82\x80\x81GignoredJnodesdepthB42DnameMchangesetdata
125 s> makefile('rb', None)
126 s> HTTP/1.1 200 OK\r\n
127 s> Server: testing stub value\r\n
128 s> Date: $HTTP_DATE$\r\n
129 s> Content-Type: application/mercurial-exp-framing-0005\r\n
130 s> Transfer-Encoding: chunked\r\n
131 s> \r\n
132 s> 4d\r\n
133 s> E\x00\x00\x01\x00\x02\x012
134 s> \xa2Eerror\xa1GmessageX&nodesdepth requires the nodes argumentFstatusEerror
135 s> \r\n
136 received frame(size=69; request=1; stream=2; streamflags=stream-begin; type=command-response; flags=eos)
137 s> 0\r\n
138 s> \r\n
139 abort: nodesdepth requires the nodes argument! 70 abort: nodesdepth requires the nodes argument!
140 [255] 71 [255]
141 72
142 Sending just noderange heads sends all revisions 73 Sending just noderange heads sends all revisions
143 74
145 > command changesetdata 76 > command changesetdata
146 > 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']] 77 > 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']]
147 > EOF 78 > EOF
148 creating http peer for wire protocol version 2 79 creating http peer for wire protocol version 2
149 sending changesetdata command 80 sending changesetdata command
150 s> POST /api/exp-http-v2-0002/ro/changesetdata HTTP/1.1\r\n
151 s> Accept-Encoding: identity\r\n
152 s> accept: application/mercurial-exp-framing-0005\r\n
153 s> content-type: application/mercurial-exp-framing-0005\r\n
154 s> content-length: 89\r\n
155 s> host: $LOCALIP:$HGPORT\r\n (glob)
156 s> user-agent: Mercurial debugwireproto\r\n
157 s> \r\n
158 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
159 s> makefile('rb', None)
160 s> HTTP/1.1 200 OK\r\n
161 s> Server: testing stub value\r\n
162 s> Date: $HTTP_DATE$\r\n
163 s> Content-Type: application/mercurial-exp-framing-0005\r\n
164 s> Transfer-Encoding: chunked\r\n
165 s> \r\n
166 s> 13\r\n
167 s> \x0b\x00\x00\x01\x00\x02\x011
168 s> \xa1FstatusBok
169 s> \r\n
170 received frame(size=11; request=1; stream=2; streamflags=stream-begin; type=command-response; flags=continuation)
171 s> 81\r\n
172 s> y\x00\x00\x01\x00\x02\x001
173 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
174 s> \r\n
175 received frame(size=121; request=1; stream=2; streamflags=; type=command-response; flags=continuation)
176 s> 8\r\n
177 s> \x00\x00\x00\x01\x00\x02\x002
178 s> \r\n
179 s> 0\r\n
180 s> \r\n
181 received frame(size=0; request=1; stream=2; streamflags=; type=command-response; flags=eos)
182 response: gen[ 81 response: gen[
183 { 82 {
184 b'totalitems': 4 83 b'totalitems': 4
185 }, 84 },
186 { 85 {
194 }, 93 },
195 { 94 {
196 b'node': b'\xea\xe5\xf8,.b#h\xd2}\xae\xcbv\xb7\xe3\x93\xd0\xf2B\x11' 95 b'node': b'\xea\xe5\xf8,.b#h\xd2}\xae\xcbv\xb7\xe3\x93\xd0\xf2B\x11'
197 } 96 }
198 ] 97 ]
199 (sent 2 HTTP requests and * bytes; received * bytes in responses) (glob)
200 98
201 Sending root nodes limits what data is sent 99 Sending root nodes limits what data is sent
202 100
203 $ sendhttpv2peer << EOF 101 $ sendhttpv2peer << EOF
204 > command changesetdata 102 > command changesetdata
205 > 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']] 103 > 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']]
206 > EOF 104 > EOF
207 creating http peer for wire protocol version 2 105 creating http peer for wire protocol version 2
208 sending changesetdata command 106 sending changesetdata command
209 s> POST /api/exp-http-v2-0002/ro/changesetdata HTTP/1.1\r\n
210 s> Accept-Encoding: identity\r\n
211 s> accept: application/mercurial-exp-framing-0005\r\n
212 s> content-type: application/mercurial-exp-framing-0005\r\n
213 s> content-length: 89\r\n
214 s> host: $LOCALIP:$HGPORT\r\n (glob)
215 s> user-agent: Mercurial debugwireproto\r\n
216 s> \r\n
217 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
218 s> makefile('rb', None)
219 s> HTTP/1.1 200 OK\r\n
220 s> Server: testing stub value\r\n
221 s> Date: $HTTP_DATE$\r\n
222 s> Content-Type: application/mercurial-exp-framing-0005\r\n
223 s> Transfer-Encoding: chunked\r\n
224 s> \r\n
225 s> 13\r\n
226 s> \x0b\x00\x00\x01\x00\x02\x011
227 s> \xa1FstatusBok
228 s> \r\n
229 received frame(size=11; request=1; stream=2; streamflags=stream-begin; type=command-response; flags=continuation)
230 s> 4b\r\n
231 s> C\x00\x00\x01\x00\x02\x001
232 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
233 s> \r\n
234 received frame(size=67; request=1; stream=2; streamflags=; type=command-response; flags=continuation)
235 s> 8\r\n
236 s> \x00\x00\x00\x01\x00\x02\x002
237 s> \r\n
238 s> 0\r\n
239 s> \r\n
240 received frame(size=0; request=1; stream=2; streamflags=; type=command-response; flags=eos)
241 response: gen[ 107 response: gen[
242 { 108 {
243 b'totalitems': 2 109 b'totalitems': 2
244 }, 110 },
245 { 111 {
247 }, 113 },
248 { 114 {
249 b'node': b'\x0b\xb8\xad\x89J\x15\xb1S\x80\xb2\xa2\xa5\xb1\x83\xe2\x0f*K(\xdd' 115 b'node': b'\x0b\xb8\xad\x89J\x15\xb1S\x80\xb2\xa2\xa5\xb1\x83\xe2\x0f*K(\xdd'
250 } 116 }
251 ] 117 ]
252 (sent 2 HTTP requests and * bytes; received * bytes in responses) (glob)
253 118
254 Requesting data on a single node by node works 119 Requesting data on a single node by node works
255 120
256 $ sendhttpv2peer << EOF 121 $ sendhttpv2peer << EOF
257 > command changesetdata 122 > command changesetdata
258 > nodes eval:[b'\x33\x90\xef\x85\x00\x73\xfb\xc2\xf0\xdf\xff\x22\x44\x34\x2c\x8e\x92\x29\x01\x3a'] 123 > nodes eval:[b'\x33\x90\xef\x85\x00\x73\xfb\xc2\xf0\xdf\xff\x22\x44\x34\x2c\x8e\x92\x29\x01\x3a']
259 > EOF 124 > EOF
260 creating http peer for wire protocol version 2 125 creating http peer for wire protocol version 2
261 sending changesetdata command 126 sending changesetdata command
262 s> POST /api/exp-http-v2-0002/ro/changesetdata HTTP/1.1\r\n 127 response: gen[
263 s> Accept-Encoding: identity\r\n 128 {
264 s> accept: application/mercurial-exp-framing-0005\r\n 129 b'totalitems': 1
265 s> content-type: application/mercurial-exp-framing-0005\r\n 130 },
266 s> content-length: 62\r\n 131 {
267 s> host: $LOCALIP:$HGPORT\r\n (glob) 132 b'node': b'3\x90\xef\x85\x00s\xfb\xc2\xf0\xdf\xff"D4,\x8e\x92)\x01:'
268 s> user-agent: Mercurial debugwireproto\r\n 133 }
269 s> \r\n 134 ]
270 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
271 s> makefile('rb', None)
272 s> HTTP/1.1 200 OK\r\n
273 s> Server: testing stub value\r\n
274 s> Date: $HTTP_DATE$\r\n
275 s> Content-Type: application/mercurial-exp-framing-0005\r\n
276 s> Transfer-Encoding: chunked\r\n
277 s> \r\n
278 s> 13\r\n
279 s> \x0b\x00\x00\x01\x00\x02\x011
280 s> \xa1FstatusBok
281 s> \r\n
282 received frame(size=11; request=1; stream=2; streamflags=stream-begin; type=command-response; flags=continuation)
283 s> 30\r\n
284 s> (\x00\x00\x01\x00\x02\x001
285 s> \xa1Jtotalitems\x01\xa1DnodeT3\x90\xef\x85\x00s\xfb\xc2\xf0\xdf\xff"D4,\x8e\x92)\x01:
286 s> \r\n
287 received frame(size=40; request=1; stream=2; streamflags=; type=command-response; flags=continuation)
288 s> 8\r\n
289 s> \x00\x00\x00\x01\x00\x02\x002
290 s> \r\n
291 s> 0\r\n
292 s> \r\n
293 received frame(size=0; request=1; stream=2; streamflags=; type=command-response; flags=eos)
294 response: gen[
295 {
296 b'totalitems': 1
297 },
298 {
299 b'node': b'3\x90\xef\x85\x00s\xfb\xc2\xf0\xdf\xff"D4,\x8e\x92)\x01:'
300 }
301 ]
302 (sent 2 HTTP requests and * bytes; received * bytes in responses) (glob)
303 135
304 Specifying a noderange and nodes takes union 136 Specifying a noderange and nodes takes union
305 137
306 $ sendhttpv2peer << EOF 138 $ sendhttpv2peer << EOF
307 > command changesetdata 139 > command changesetdata
308 > 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']] 140 > 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']]
309 > nodes eval:[b'\xea\xe5\xf8\x2c\x2e\x62\x23\x68\xd2\x7d\xae\xcb\x76\xb7\xe3\x93\xd0\xf2\x42\x11'] 141 > nodes eval:[b'\xea\xe5\xf8\x2c\x2e\x62\x23\x68\xd2\x7d\xae\xcb\x76\xb7\xe3\x93\xd0\xf2\x42\x11']
310 > EOF 142 > EOF
311 creating http peer for wire protocol version 2 143 creating http peer for wire protocol version 2
312 sending changesetdata command 144 sending changesetdata command
313 s> POST /api/exp-http-v2-0002/ro/changesetdata HTTP/1.1\r\n
314 s> Accept-Encoding: identity\r\n
315 s> accept: application/mercurial-exp-framing-0005\r\n
316 s> content-type: application/mercurial-exp-framing-0005\r\n
317 s> content-length: 117\r\n
318 s> host: $LOCALIP:$HGPORT\r\n (glob)
319 s> user-agent: Mercurial debugwireproto\r\n
320 s> \r\n
321 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
322 s> makefile('rb', None)
323 s> HTTP/1.1 200 OK\r\n
324 s> Server: testing stub value\r\n
325 s> Date: $HTTP_DATE$\r\n
326 s> Content-Type: application/mercurial-exp-framing-0005\r\n
327 s> Transfer-Encoding: chunked\r\n
328 s> \r\n
329 s> 13\r\n
330 s> \x0b\x00\x00\x01\x00\x02\x011
331 s> \xa1FstatusBok
332 s> \r\n
333 received frame(size=11; request=1; stream=2; streamflags=stream-begin; type=command-response; flags=continuation)
334 s> 4b\r\n
335 s> C\x00\x00\x01\x00\x02\x001
336 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
337 s> \r\n
338 received frame(size=67; request=1; stream=2; streamflags=; type=command-response; flags=continuation)
339 s> 8\r\n
340 s> \x00\x00\x00\x01\x00\x02\x002
341 s> \r\n
342 s> 0\r\n
343 s> \r\n
344 received frame(size=0; request=1; stream=2; streamflags=; type=command-response; flags=eos)
345 response: gen[ 145 response: gen[
346 { 146 {
347 b'totalitems': 2 147 b'totalitems': 2
348 }, 148 },
349 { 149 {
351 }, 151 },
352 { 152 {
353 b'node': b'\x0b\xb8\xad\x89J\x15\xb1S\x80\xb2\xa2\xa5\xb1\x83\xe2\x0f*K(\xdd' 153 b'node': b'\x0b\xb8\xad\x89J\x15\xb1S\x80\xb2\xa2\xa5\xb1\x83\xe2\x0f*K(\xdd'
354 } 154 }
355 ] 155 ]
356 (sent 2 HTTP requests and * bytes; received * bytes in responses) (glob)
357 156
358 nodesdepth of 1 limits to exactly requested nodes 157 nodesdepth of 1 limits to exactly requested nodes
359 158
360 $ sendhttpv2peer << EOF 159 $ sendhttpv2peer << EOF
361 > command changesetdata 160 > command changesetdata
362 > nodes eval:[b'\xea\xe5\xf8\x2c\x2e\x62\x23\x68\xd2\x7d\xae\xcb\x76\xb7\xe3\x93\xd0\xf2\x42\x11'] 161 > nodes eval:[b'\xea\xe5\xf8\x2c\x2e\x62\x23\x68\xd2\x7d\xae\xcb\x76\xb7\xe3\x93\xd0\xf2\x42\x11']
363 > nodesdepth eval:1 162 > nodesdepth eval:1
364 > EOF 163 > EOF
365 creating http peer for wire protocol version 2 164 creating http peer for wire protocol version 2
366 sending changesetdata command 165 sending changesetdata command
367 s> POST /api/exp-http-v2-0002/ro/changesetdata HTTP/1.1\r\n 166 response: gen[
368 s> Accept-Encoding: identity\r\n 167 {
369 s> accept: application/mercurial-exp-framing-0005\r\n 168 b'totalitems': 1
370 s> content-type: application/mercurial-exp-framing-0005\r\n 169 },
371 s> content-length: 74\r\n 170 {
372 s> host: $LOCALIP:$HGPORT\r\n (glob) 171 b'node': b'\xea\xe5\xf8,.b#h\xd2}\xae\xcbv\xb7\xe3\x93\xd0\xf2B\x11'
373 s> user-agent: Mercurial debugwireproto\r\n 172 }
374 s> \r\n 173 ]
375 s> B\x00\x00\x01\x00\x01\x01\x11\xa2Dargs\xa2Enodes\x81T\xea\xe5\xf8,.b#h\xd2}\xae\xcbv\xb7\xe3\x93\xd0\xf2B\x11Jnodesdepth\x01DnameMchangesetdata
376 s> makefile('rb', None)
377 s> HTTP/1.1 200 OK\r\n
378 s> Server: testing stub value\r\n
379 s> Date: $HTTP_DATE$\r\n
380 s> Content-Type: application/mercurial-exp-framing-0005\r\n
381 s> Transfer-Encoding: chunked\r\n
382 s> \r\n
383 s> 13\r\n
384 s> \x0b\x00\x00\x01\x00\x02\x011
385 s> \xa1FstatusBok
386 s> \r\n
387 received frame(size=11; request=1; stream=2; streamflags=stream-begin; type=command-response; flags=continuation)
388 s> 30\r\n
389 s> (\x00\x00\x01\x00\x02\x001
390 s> \xa1Jtotalitems\x01\xa1DnodeT\xea\xe5\xf8,.b#h\xd2}\xae\xcbv\xb7\xe3\x93\xd0\xf2B\x11
391 s> \r\n
392 received frame(size=40; request=1; stream=2; streamflags=; type=command-response; flags=continuation)
393 s> 8\r\n
394 s> \x00\x00\x00\x01\x00\x02\x002
395 s> \r\n
396 s> 0\r\n
397 s> \r\n
398 received frame(size=0; request=1; stream=2; streamflags=; type=command-response; flags=eos)
399 response: gen[
400 {
401 b'totalitems': 1
402 },
403 {
404 b'node': b'\xea\xe5\xf8,.b#h\xd2}\xae\xcbv\xb7\xe3\x93\xd0\xf2B\x11'
405 }
406 ]
407 (sent 2 HTTP requests and * bytes; received * bytes in responses) (glob)
408 174
409 nodesdepth of 2 limits to first ancestor 175 nodesdepth of 2 limits to first ancestor
410 176
411 $ sendhttpv2peer << EOF 177 $ sendhttpv2peer << EOF
412 > command changesetdata 178 > command changesetdata
413 > nodes eval:[b'\xea\xe5\xf8\x2c\x2e\x62\x23\x68\xd2\x7d\xae\xcb\x76\xb7\xe3\x93\xd0\xf2\x42\x11'] 179 > nodes eval:[b'\xea\xe5\xf8\x2c\x2e\x62\x23\x68\xd2\x7d\xae\xcb\x76\xb7\xe3\x93\xd0\xf2\x42\x11']
414 > nodesdepth eval:2 180 > nodesdepth eval:2
415 > EOF 181 > EOF
416 creating http peer for wire protocol version 2 182 creating http peer for wire protocol version 2
417 sending changesetdata command 183 sending changesetdata command
418 s> POST /api/exp-http-v2-0002/ro/changesetdata HTTP/1.1\r\n
419 s> Accept-Encoding: identity\r\n
420 s> accept: application/mercurial-exp-framing-0005\r\n
421 s> content-type: application/mercurial-exp-framing-0005\r\n
422 s> content-length: 74\r\n
423 s> host: $LOCALIP:$HGPORT\r\n (glob)
424 s> user-agent: Mercurial debugwireproto\r\n
425 s> \r\n
426 s> B\x00\x00\x01\x00\x01\x01\x11\xa2Dargs\xa2Enodes\x81T\xea\xe5\xf8,.b#h\xd2}\xae\xcbv\xb7\xe3\x93\xd0\xf2B\x11Jnodesdepth\x02DnameMchangesetdata
427 s> makefile('rb', None)
428 s> HTTP/1.1 200 OK\r\n
429 s> Server: testing stub value\r\n
430 s> Date: $HTTP_DATE$\r\n
431 s> Content-Type: application/mercurial-exp-framing-0005\r\n
432 s> Transfer-Encoding: chunked\r\n
433 s> \r\n
434 s> 13\r\n
435 s> \x0b\x00\x00\x01\x00\x02\x011
436 s> \xa1FstatusBok
437 s> \r\n
438 received frame(size=11; request=1; stream=2; streamflags=stream-begin; type=command-response; flags=continuation)
439 s> 4b\r\n
440 s> C\x00\x00\x01\x00\x02\x001
441 s> \xa1Jtotalitems\x02\xa1DnodeT3\x90\xef\x85\x00s\xfb\xc2\xf0\xdf\xff"D4,\x8e\x92)\x01:\xa1DnodeT\xea\xe5\xf8,.b#h\xd2}\xae\xcbv\xb7\xe3\x93\xd0\xf2B\x11
442 s> \r\n
443 received frame(size=67; request=1; stream=2; streamflags=; type=command-response; flags=continuation)
444 s> 8\r\n
445 s> \x00\x00\x00\x01\x00\x02\x002
446 s> \r\n
447 s> 0\r\n
448 s> \r\n
449 received frame(size=0; request=1; stream=2; streamflags=; type=command-response; flags=eos)
450 response: gen[ 184 response: gen[
451 { 185 {
452 b'totalitems': 2 186 b'totalitems': 2
453 }, 187 },
454 { 188 {
456 }, 190 },
457 { 191 {
458 b'node': b'\xea\xe5\xf8,.b#h\xd2}\xae\xcbv\xb7\xe3\x93\xd0\xf2B\x11' 192 b'node': b'\xea\xe5\xf8,.b#h\xd2}\xae\xcbv\xb7\xe3\x93\xd0\xf2B\x11'
459 } 193 }
460 ] 194 ]
461 (sent 2 HTTP requests and * bytes; received * bytes in responses) (glob)
462 195
463 nodesdepth with multiple nodes 196 nodesdepth with multiple nodes
464 197
465 $ sendhttpv2peer << EOF 198 $ sendhttpv2peer << EOF
466 > command changesetdata 199 > command changesetdata
467 > nodes eval:[b'\xea\xe5\xf8\x2c\x2e\x62\x23\x68\xd2\x7d\xae\xcb\x76\xb7\xe3\x93\xd0\xf2\x42\x11', b'\x0b\xb8\xad\x89\x4a\x15\xb1\x53\x80\xb2\xa2\xa5\xb1\x83\xe2\x0f\x2a\x4b\x28\xdd'] 200 > nodes eval:[b'\xea\xe5\xf8\x2c\x2e\x62\x23\x68\xd2\x7d\xae\xcb\x76\xb7\xe3\x93\xd0\xf2\x42\x11', b'\x0b\xb8\xad\x89\x4a\x15\xb1\x53\x80\xb2\xa2\xa5\xb1\x83\xe2\x0f\x2a\x4b\x28\xdd']
468 > nodesdepth eval:2 201 > nodesdepth eval:2
469 > EOF 202 > EOF
470 creating http peer for wire protocol version 2 203 creating http peer for wire protocol version 2
471 sending changesetdata command 204 sending changesetdata command
472 s> POST /api/exp-http-v2-0002/ro/changesetdata HTTP/1.1\r\n
473 s> Accept-Encoding: identity\r\n
474 s> accept: application/mercurial-exp-framing-0005\r\n
475 s> content-type: application/mercurial-exp-framing-0005\r\n
476 s> content-length: 95\r\n
477 s> host: $LOCALIP:$HGPORT\r\n (glob)
478 s> user-agent: Mercurial debugwireproto\r\n
479 s> \r\n
480 s> W\x00\x00\x01\x00\x01\x01\x11\xa2Dargs\xa2Enodes\x82T\xea\xe5\xf8,.b#h\xd2}\xae\xcbv\xb7\xe3\x93\xd0\xf2B\x11T\x0b\xb8\xad\x89J\x15\xb1S\x80\xb2\xa2\xa5\xb1\x83\xe2\x0f*K(\xddJnodesdepth\x02DnameMchangesetdata
481 s> makefile('rb', None)
482 s> HTTP/1.1 200 OK\r\n
483 s> Server: testing stub value\r\n
484 s> Date: $HTTP_DATE$\r\n
485 s> Content-Type: application/mercurial-exp-framing-0005\r\n
486 s> Transfer-Encoding: chunked\r\n
487 s> \r\n
488 s> 13\r\n
489 s> \x0b\x00\x00\x01\x00\x02\x011
490 s> \xa1FstatusBok
491 s> \r\n
492 received frame(size=11; request=1; stream=2; streamflags=stream-begin; type=command-response; flags=continuation)
493 s> 81\r\n
494 s> y\x00\x00\x01\x00\x02\x001
495 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
496 s> \r\n
497 received frame(size=121; request=1; stream=2; streamflags=; type=command-response; flags=continuation)
498 s> 8\r\n
499 s> \x00\x00\x00\x01\x00\x02\x002
500 s> \r\n
501 s> 0\r\n
502 s> \r\n
503 received frame(size=0; request=1; stream=2; streamflags=; type=command-response; flags=eos)
504 response: gen[ 205 response: gen[
505 { 206 {
506 b'totalitems': 4 207 b'totalitems': 4
507 }, 208 },
508 { 209 {
516 }, 217 },
517 { 218 {
518 b'node': b'\xea\xe5\xf8,.b#h\xd2}\xae\xcbv\xb7\xe3\x93\xd0\xf2B\x11' 219 b'node': b'\xea\xe5\xf8,.b#h\xd2}\xae\xcbv\xb7\xe3\x93\xd0\xf2B\x11'
519 } 220 }
520 ] 221 ]
521 (sent 2 HTTP requests and * bytes; received * bytes in responses) (glob)
522 222
523 Parents data is transferred upon request 223 Parents data is transferred upon request
524 224
525 $ sendhttpv2peer << EOF 225 $ sendhttpv2peer << EOF
526 > command changesetdata 226 > command changesetdata
527 > fields eval:[b'parents'] 227 > fields eval:[b'parents']
528 > nodes eval:[b'\xea\xe5\xf8\x2c\x2e\x62\x23\x68\xd2\x7d\xae\xcb\x76\xb7\xe3\x93\xd0\xf2\x42\x11'] 228 > nodes eval:[b'\xea\xe5\xf8\x2c\x2e\x62\x23\x68\xd2\x7d\xae\xcb\x76\xb7\xe3\x93\xd0\xf2\x42\x11']
529 > EOF 229 > EOF
530 creating http peer for wire protocol version 2 230 creating http peer for wire protocol version 2
531 sending changesetdata command 231 sending changesetdata command
532 s> POST /api/exp-http-v2-0002/ro/changesetdata HTTP/1.1\r\n
533 s> Accept-Encoding: identity\r\n
534 s> accept: application/mercurial-exp-framing-0005\r\n
535 s> content-type: application/mercurial-exp-framing-0005\r\n
536 s> content-length: 78\r\n
537 s> host: $LOCALIP:$HGPORT\r\n (glob)
538 s> user-agent: Mercurial debugwireproto\r\n
539 s> \r\n
540 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
541 s> makefile('rb', None)
542 s> HTTP/1.1 200 OK\r\n
543 s> Server: testing stub value\r\n
544 s> Date: $HTTP_DATE$\r\n
545 s> Content-Type: application/mercurial-exp-framing-0005\r\n
546 s> Transfer-Encoding: chunked\r\n
547 s> \r\n
548 s> 13\r\n
549 s> \x0b\x00\x00\x01\x00\x02\x011
550 s> \xa1FstatusBok
551 s> \r\n
552 received frame(size=11; request=1; stream=2; streamflags=stream-begin; type=command-response; flags=continuation)
553 s> 63\r\n
554 s> [\x00\x00\x01\x00\x02\x001
555 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
556 s> \r\n
557 received frame(size=91; request=1; stream=2; streamflags=; type=command-response; flags=continuation)
558 s> 8\r\n
559 s> \x00\x00\x00\x01\x00\x02\x002
560 s> \r\n
561 s> 0\r\n
562 s> \r\n
563 received frame(size=0; request=1; stream=2; streamflags=; type=command-response; flags=eos)
564 response: gen[ 232 response: gen[
565 { 233 {
566 b'totalitems': 1 234 b'totalitems': 1
567 }, 235 },
568 { 236 {
571 b'3\x90\xef\x85\x00s\xfb\xc2\xf0\xdf\xff"D4,\x8e\x92)\x01:', 239 b'3\x90\xef\x85\x00s\xfb\xc2\xf0\xdf\xff"D4,\x8e\x92)\x01:',
572 b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' 240 b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
573 ] 241 ]
574 } 242 }
575 ] 243 ]
576 (sent 2 HTTP requests and * bytes; received * bytes in responses) (glob)
577 244
578 Phase data is transferred upon request 245 Phase data is transferred upon request
579 246
580 $ sendhttpv2peer << EOF 247 $ sendhttpv2peer << EOF
581 > command changesetdata 248 > command changesetdata
582 > fields eval:[b'phase'] 249 > fields eval:[b'phase']
583 > nodes eval:[b'\x0b\xb8\xad\x89\x4a\x15\xb1\x53\x80\xb2\xa2\xa5\xb1\x83\xe2\x0f\x2a\x4b\x28\xdd'] 250 > nodes eval:[b'\x0b\xb8\xad\x89\x4a\x15\xb1\x53\x80\xb2\xa2\xa5\xb1\x83\xe2\x0f\x2a\x4b\x28\xdd']
584 > EOF 251 > EOF
585 creating http peer for wire protocol version 2 252 creating http peer for wire protocol version 2
586 sending changesetdata command 253 sending changesetdata command
587 s> POST /api/exp-http-v2-0002/ro/changesetdata HTTP/1.1\r\n
588 s> Accept-Encoding: identity\r\n
589 s> accept: application/mercurial-exp-framing-0005\r\n
590 s> content-type: application/mercurial-exp-framing-0005\r\n
591 s> content-length: 76\r\n
592 s> host: $LOCALIP:$HGPORT\r\n (glob)
593 s> user-agent: Mercurial debugwireproto\r\n
594 s> \r\n
595 s> D\x00\x00\x01\x00\x01\x01\x11\xa2Dargs\xa2Ffields\x81EphaseEnodes\x81T\x0b\xb8\xad\x89J\x15\xb1S\x80\xb2\xa2\xa5\xb1\x83\xe2\x0f*K(\xddDnameMchangesetdata
596 s> makefile('rb', None)
597 s> HTTP/1.1 200 OK\r\n
598 s> Server: testing stub value\r\n
599 s> Date: $HTTP_DATE$\r\n
600 s> Content-Type: application/mercurial-exp-framing-0005\r\n
601 s> Transfer-Encoding: chunked\r\n
602 s> \r\n
603 s> 13\r\n
604 s> \x0b\x00\x00\x01\x00\x02\x011
605 s> \xa1FstatusBok
606 s> \r\n
607 received frame(size=11; request=1; stream=2; streamflags=stream-begin; type=command-response; flags=continuation)
608 s> 3d\r\n
609 s> 5\x00\x00\x01\x00\x02\x001
610 s> \xa1Jtotalitems\x01\xa2DnodeT\x0b\xb8\xad\x89J\x15\xb1S\x80\xb2\xa2\xa5\xb1\x83\xe2\x0f*K(\xddEphaseFpublic
611 s> \r\n
612 received frame(size=53; request=1; stream=2; streamflags=; type=command-response; flags=continuation)
613 s> 8\r\n
614 s> \x00\x00\x00\x01\x00\x02\x002
615 s> \r\n
616 s> 0\r\n
617 s> \r\n
618 received frame(size=0; request=1; stream=2; streamflags=; type=command-response; flags=eos)
619 response: gen[ 254 response: gen[
620 { 255 {
621 b'totalitems': 1 256 b'totalitems': 1
622 }, 257 },
623 { 258 {
624 b'node': b'\x0b\xb8\xad\x89J\x15\xb1S\x80\xb2\xa2\xa5\xb1\x83\xe2\x0f*K(\xdd', 259 b'node': b'\x0b\xb8\xad\x89J\x15\xb1S\x80\xb2\xa2\xa5\xb1\x83\xe2\x0f*K(\xdd',
625 b'phase': b'public' 260 b'phase': b'public'
626 } 261 }
627 ] 262 ]
628 (sent 2 HTTP requests and * bytes; received * bytes in responses) (glob)
629 263
630 Revision data is transferred upon request 264 Revision data is transferred upon request
631 265
632 $ sendhttpv2peer << EOF 266 $ sendhttpv2peer << EOF
633 > command changesetdata 267 > command changesetdata
634 > fields eval:[b'revision'] 268 > fields eval:[b'revision']
635 > nodes eval:[b'\xea\xe5\xf8\x2c\x2e\x62\x23\x68\xd2\x7d\xae\xcb\x76\xb7\xe3\x93\xd0\xf2\x42\x11'] 269 > nodes eval:[b'\xea\xe5\xf8\x2c\x2e\x62\x23\x68\xd2\x7d\xae\xcb\x76\xb7\xe3\x93\xd0\xf2\x42\x11']
636 > EOF 270 > EOF
637 creating http peer for wire protocol version 2 271 creating http peer for wire protocol version 2
638 sending changesetdata command 272 sending changesetdata command
639 s> POST /api/exp-http-v2-0002/ro/changesetdata HTTP/1.1\r\n
640 s> Accept-Encoding: identity\r\n
641 s> accept: application/mercurial-exp-framing-0005\r\n
642 s> content-type: application/mercurial-exp-framing-0005\r\n
643 s> content-length: 79\r\n
644 s> host: $LOCALIP:$HGPORT\r\n (glob)
645 s> user-agent: Mercurial debugwireproto\r\n
646 s> \r\n
647 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
648 s> makefile('rb', None)
649 s> HTTP/1.1 200 OK\r\n
650 s> Server: testing stub value\r\n
651 s> Date: $HTTP_DATE$\r\n
652 s> Content-Type: application/mercurial-exp-framing-0005\r\n
653 s> Transfer-Encoding: chunked\r\n
654 s> \r\n
655 s> 13\r\n
656 s> \x0b\x00\x00\x01\x00\x02\x011
657 s> \xa1FstatusBok
658 s> \r\n
659 received frame(size=11; request=1; stream=2; streamflags=stream-begin; type=command-response; flags=continuation)
660 s> 8c\r\n
661 s> \x84\x00\x00\x01\x00\x02\x001
662 s> \xa1Jtotalitems\x01\xa2Ofieldsfollowing\x81\x82Hrevision\x18=DnodeT\xea\xe5\xf8,.b#h\xd2}\xae\xcbv\xb7\xe3\x93\xd0\xf2B\x11X=1b74476799ec8318045db759b1b4bcc9b839d0aa\n
663 s> test\n
664 s> 0 0\n
665 s> a\n
666 s> \n
667 s> commit 3
668 s> \r\n
669 received frame(size=132; request=1; stream=2; streamflags=; type=command-response; flags=continuation)
670 s> 8\r\n
671 s> \x00\x00\x00\x01\x00\x02\x002
672 s> \r\n
673 s> 0\r\n
674 s> \r\n
675 received frame(size=0; request=1; stream=2; streamflags=; type=command-response; flags=eos)
676 response: gen[ 273 response: gen[
677 { 274 {
678 b'totalitems': 1 275 b'totalitems': 1
679 }, 276 },
680 { 277 {
686 ], 283 ],
687 b'node': b'\xea\xe5\xf8,.b#h\xd2}\xae\xcbv\xb7\xe3\x93\xd0\xf2B\x11' 284 b'node': b'\xea\xe5\xf8,.b#h\xd2}\xae\xcbv\xb7\xe3\x93\xd0\xf2B\x11'
688 }, 285 },
689 b'1b74476799ec8318045db759b1b4bcc9b839d0aa\ntest\n0 0\na\n\ncommit 3' 286 b'1b74476799ec8318045db759b1b4bcc9b839d0aa\ntest\n0 0\na\n\ncommit 3'
690 ] 287 ]
691 (sent 2 HTTP requests and * bytes; received * bytes in responses) (glob)
692 288
693 Bookmarks key isn't present if no bookmarks data 289 Bookmarks key isn't present if no bookmarks data
694 290
695 $ sendhttpv2peer << EOF 291 $ sendhttpv2peer << EOF
696 > command changesetdata 292 > command changesetdata
697 > fields eval:[b'bookmarks'] 293 > fields eval:[b'bookmarks']
698 > 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']] 294 > 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']]
699 > EOF 295 > EOF
700 creating http peer for wire protocol version 2 296 creating http peer for wire protocol version 2
701 sending changesetdata command 297 sending changesetdata command
702 s> POST /api/exp-http-v2-0002/ro/changesetdata HTTP/1.1\r\n
703 s> Accept-Encoding: identity\r\n
704 s> accept: application/mercurial-exp-framing-0005\r\n
705 s> content-type: application/mercurial-exp-framing-0005\r\n
706 s> content-length: 107\r\n
707 s> host: $LOCALIP:$HGPORT\r\n (glob)
708 s> user-agent: Mercurial debugwireproto\r\n
709 s> \r\n
710 s> c\x00\x00\x01\x00\x01\x01\x11\xa2Dargs\xa2Ffields\x81IbookmarksInoderange\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
711 s> makefile('rb', None)
712 s> HTTP/1.1 200 OK\r\n
713 s> Server: testing stub value\r\n
714 s> Date: $HTTP_DATE$\r\n
715 s> Content-Type: application/mercurial-exp-framing-0005\r\n
716 s> Transfer-Encoding: chunked\r\n
717 s> \r\n
718 s> 13\r\n
719 s> \x0b\x00\x00\x01\x00\x02\x011
720 s> \xa1FstatusBok
721 s> \r\n
722 received frame(size=11; request=1; stream=2; streamflags=stream-begin; type=command-response; flags=continuation)
723 s> 81\r\n
724 s> y\x00\x00\x01\x00\x02\x001
725 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
726 s> \r\n
727 received frame(size=121; request=1; stream=2; streamflags=; type=command-response; flags=continuation)
728 s> 8\r\n
729 s> \x00\x00\x00\x01\x00\x02\x002
730 s> \r\n
731 s> 0\r\n
732 s> \r\n
733 received frame(size=0; request=1; stream=2; streamflags=; type=command-response; flags=eos)
734 response: gen[ 298 response: gen[
735 { 299 {
736 b'totalitems': 4 300 b'totalitems': 4
737 }, 301 },
738 { 302 {
746 }, 310 },
747 { 311 {
748 b'node': b'\xea\xe5\xf8,.b#h\xd2}\xae\xcbv\xb7\xe3\x93\xd0\xf2B\x11' 312 b'node': b'\xea\xe5\xf8,.b#h\xd2}\xae\xcbv\xb7\xe3\x93\xd0\xf2B\x11'
749 } 313 }
750 ] 314 ]
751 (sent 2 HTTP requests and * bytes; received * bytes in responses) (glob)
752 315
753 Bookmarks are sent when requested 316 Bookmarks are sent when requested
754 317
755 $ hg -R ../server bookmark -r 0bb8ad894a15b15380b2a2a5b183e20f2a4b28dd book-1 318 $ hg -R ../server bookmark -r 0bb8ad894a15b15380b2a2a5b183e20f2a4b28dd book-1
756 $ hg -R ../server bookmark -r eae5f82c2e622368d27daecb76b7e393d0f24211 book-2 319 $ hg -R ../server bookmark -r eae5f82c2e622368d27daecb76b7e393d0f24211 book-2
761 > fields eval:[b'bookmarks'] 324 > fields eval:[b'bookmarks']
762 > 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']] 325 > 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']]
763 > EOF 326 > EOF
764 creating http peer for wire protocol version 2 327 creating http peer for wire protocol version 2
765 sending changesetdata command 328 sending changesetdata command
766 s> POST /api/exp-http-v2-0002/ro/changesetdata HTTP/1.1\r\n
767 s> Accept-Encoding: identity\r\n
768 s> accept: application/mercurial-exp-framing-0005\r\n
769 s> content-type: application/mercurial-exp-framing-0005\r\n
770 s> content-length: 107\r\n
771 s> host: $LOCALIP:$HGPORT\r\n (glob)
772 s> user-agent: Mercurial debugwireproto\r\n
773 s> \r\n
774 s> c\x00\x00\x01\x00\x01\x01\x11\xa2Dargs\xa2Ffields\x81IbookmarksInoderange\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
775 s> makefile('rb', None)
776 s> HTTP/1.1 200 OK\r\n
777 s> Server: testing stub value\r\n
778 s> Date: $HTTP_DATE$\r\n
779 s> Content-Type: application/mercurial-exp-framing-0005\r\n
780 s> Transfer-Encoding: chunked\r\n
781 s> \r\n
782 s> 13\r\n
783 s> \x0b\x00\x00\x01\x00\x02\x011
784 s> \xa1FstatusBok
785 s> \r\n
786 received frame(size=11; request=1; stream=2; streamflags=stream-begin; type=command-response; flags=continuation)
787 s> ac\r\n
788 s> \xa4\x00\x00\x01\x00\x02\x001
789 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\xa2Ibookmarks\x81Fbook-1DnodeT\x0b\xb8\xad\x89J\x15\xb1S\x80\xb2\xa2\xa5\xb1\x83\xe2\x0f*K(\xdd\xa2Ibookmarks\x82Fbook-2Fbook-3DnodeT\xea\xe5\xf8,.b#h\xd2}\xae\xcbv\xb7\xe3\x93\xd0\xf2B\x11
790 s> \r\n
791 received frame(size=164; request=1; stream=2; streamflags=; type=command-response; flags=continuation)
792 s> 8\r\n
793 s> \x00\x00\x00\x01\x00\x02\x002
794 s> \r\n
795 s> 0\r\n
796 s> \r\n
797 received frame(size=0; request=1; stream=2; streamflags=; type=command-response; flags=eos)
798 response: gen[ 329 response: gen[
799 { 330 {
800 b'totalitems': 4 331 b'totalitems': 4
801 }, 332 },
802 { 333 {
817 b'book-3' 348 b'book-3'
818 ], 349 ],
819 b'node': b'\xea\xe5\xf8,.b#h\xd2}\xae\xcbv\xb7\xe3\x93\xd0\xf2B\x11' 350 b'node': b'\xea\xe5\xf8,.b#h\xd2}\xae\xcbv\xb7\xe3\x93\xd0\xf2B\x11'
820 } 351 }
821 ] 352 ]
822 (sent 2 HTTP requests and * bytes; received * bytes in responses) (glob)
823 353
824 Bookmarks are sent when we make a no-new-revisions request 354 Bookmarks are sent when we make a no-new-revisions request
825 355
826 $ sendhttpv2peer << EOF 356 $ sendhttpv2peer << EOF
827 > command changesetdata 357 > command changesetdata
828 > fields eval:[b'bookmarks', b'revision'] 358 > fields eval:[b'bookmarks', b'revision']
829 > noderange eval:[[b'\xea\xe5\xf8\x2c\x2e\x62\x23\x68\xd2\x7d\xae\xcb\x76\xb7\xe3\x93\xd0\xf2\x42\x11'], [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']] 359 > noderange eval:[[b'\xea\xe5\xf8\x2c\x2e\x62\x23\x68\xd2\x7d\xae\xcb\x76\xb7\xe3\x93\xd0\xf2\x42\x11'], [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']]
830 > EOF 360 > EOF
831 creating http peer for wire protocol version 2 361 creating http peer for wire protocol version 2
832 sending changesetdata command 362 sending changesetdata command
833 s> POST /api/exp-http-v2-0002/ro/changesetdata HTTP/1.1\r\n
834 s> Accept-Encoding: identity\r\n
835 s> accept: application/mercurial-exp-framing-0005\r\n
836 s> content-type: application/mercurial-exp-framing-0005\r\n
837 s> content-length: 137\r\n
838 s> host: $LOCALIP:$HGPORT\r\n (glob)
839 s> user-agent: Mercurial debugwireproto\r\n
840 s> \r\n
841 s> \x81\x00\x00\x01\x00\x01\x01\x11\xa2Dargs\xa2Ffields\x82IbookmarksHrevisionInoderange\x82\x81T\xea\xe5\xf8,.b#h\xd2}\xae\xcbv\xb7\xe3\x93\xd0\xf2B\x11\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
842 s> makefile('rb', None)
843 s> HTTP/1.1 200 OK\r\n
844 s> Server: testing stub value\r\n
845 s> Date: $HTTP_DATE$\r\n
846 s> Content-Type: application/mercurial-exp-framing-0005\r\n
847 s> Transfer-Encoding: chunked\r\n
848 s> \r\n
849 s> 13\r\n
850 s> \x0b\x00\x00\x01\x00\x02\x011
851 s> \xa1FstatusBok
852 s> \r\n
853 received frame(size=11; request=1; stream=2; streamflags=stream-begin; type=command-response; flags=continuation)
854 s> 14b\r\n
855 s> C\x01\x00\x01\x00\x02\x001
856 s> \xa1Jtotalitems\x02\xa2Ofieldsfollowing\x81\x82Hrevision\x18?DnodeTu\x92\x91~\x1c>\x82g|\xb0\xa4\xbcq\\\xa2]\xd1-(\xc1X?7f144aea0ba742713887b564d57e9d12f12ff382\n
857 s> test\n
858 s> 0 0\n
859 s> a\n
860 s> b\n
861 s> \n
862 s> commit 1\xa3Ibookmarks\x81Fbook-1Ofieldsfollowing\x81\x82Hrevision\x18=DnodeT\x0b\xb8\xad\x89J\x15\xb1S\x80\xb2\xa2\xa5\xb1\x83\xe2\x0f*K(\xddX=37f0a2d1c28ffe4b879109a7d1bbf8f07b3c763b\n
863 s> test\n
864 s> 0 0\n
865 s> b\n
866 s> \n
867 s> commit 2\xa2Ibookmarks\x82Fbook-2Fbook-3DnodeT\xea\xe5\xf8,.b#h\xd2}\xae\xcbv\xb7\xe3\x93\xd0\xf2B\x11
868 s> \r\n
869 received frame(size=323; request=1; stream=2; streamflags=; type=command-response; flags=continuation)
870 s> 8\r\n
871 s> \x00\x00\x00\x01\x00\x02\x002
872 s> \r\n
873 s> 0\r\n
874 s> \r\n
875 received frame(size=0; request=1; stream=2; streamflags=; type=command-response; flags=eos)
876 response: gen[ 363 response: gen[
877 { 364 {
878 b'totalitems': 2 365 b'totalitems': 2
879 }, 366 },
880 { 367 {
906 b'book-3' 393 b'book-3'
907 ], 394 ],
908 b'node': b'\xea\xe5\xf8,.b#h\xd2}\xae\xcbv\xb7\xe3\x93\xd0\xf2B\x11' 395 b'node': b'\xea\xe5\xf8,.b#h\xd2}\xae\xcbv\xb7\xe3\x93\xd0\xf2B\x11'
909 } 396 }
910 ] 397 ]
911 (sent 2 HTTP requests and * bytes; received * bytes in responses) (glob)
912 398
913 Multiple fields can be transferred 399 Multiple fields can be transferred
914 400
915 $ sendhttpv2peer << EOF 401 $ sendhttpv2peer << EOF
916 > command changesetdata 402 > command changesetdata
917 > fields eval:[b'parents', b'revision'] 403 > fields eval:[b'parents', b'revision']
918 > nodes eval:[b'\xea\xe5\xf8\x2c\x2e\x62\x23\x68\xd2\x7d\xae\xcb\x76\xb7\xe3\x93\xd0\xf2\x42\x11'] 404 > nodes eval:[b'\xea\xe5\xf8\x2c\x2e\x62\x23\x68\xd2\x7d\xae\xcb\x76\xb7\xe3\x93\xd0\xf2\x42\x11']
919 > EOF 405 > EOF
920 creating http peer for wire protocol version 2 406 creating http peer for wire protocol version 2
921 sending changesetdata command 407 sending changesetdata command
922 s> POST /api/exp-http-v2-0002/ro/changesetdata HTTP/1.1\r\n
923 s> Accept-Encoding: identity\r\n
924 s> accept: application/mercurial-exp-framing-0005\r\n
925 s> content-type: application/mercurial-exp-framing-0005\r\n
926 s> content-length: 87\r\n
927 s> host: $LOCALIP:$HGPORT\r\n (glob)
928 s> user-agent: Mercurial debugwireproto\r\n
929 s> \r\n
930 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
931 s> makefile('rb', None)
932 s> HTTP/1.1 200 OK\r\n
933 s> Server: testing stub value\r\n
934 s> Date: $HTTP_DATE$\r\n
935 s> Content-Type: application/mercurial-exp-framing-0005\r\n
936 s> Transfer-Encoding: chunked\r\n
937 s> \r\n
938 s> 13\r\n
939 s> \x0b\x00\x00\x01\x00\x02\x011
940 s> \xa1FstatusBok
941 s> \r\n
942 received frame(size=11; request=1; stream=2; streamflags=stream-begin; type=command-response; flags=continuation)
943 s> bf\r\n
944 s> \xb7\x00\x00\x01\x00\x02\x001
945 s> \xa1Jtotalitems\x01\xa3Ofieldsfollowing\x81\x82Hrevision\x18=DnodeT\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\x00X=1b74476799ec8318045db759b1b4bcc9b839d0aa\n
946 s> test\n
947 s> 0 0\n
948 s> a\n
949 s> \n
950 s> commit 3
951 s> \r\n
952 received frame(size=183; request=1; stream=2; streamflags=; type=command-response; flags=continuation)
953 s> 8\r\n
954 s> \x00\x00\x00\x01\x00\x02\x002
955 s> \r\n
956 s> 0\r\n
957 s> \r\n
958 received frame(size=0; request=1; stream=2; streamflags=; type=command-response; flags=eos)
959 response: gen[ 408 response: gen[
960 { 409 {
961 b'totalitems': 1 410 b'totalitems': 1
962 }, 411 },
963 { 412 {
973 b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' 422 b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
974 ] 423 ]
975 }, 424 },
976 b'1b74476799ec8318045db759b1b4bcc9b839d0aa\ntest\n0 0\na\n\ncommit 3' 425 b'1b74476799ec8318045db759b1b4bcc9b839d0aa\ntest\n0 0\na\n\ncommit 3'
977 ] 426 ]
978 (sent 2 HTTP requests and * bytes; received * bytes in responses) (glob)
979 427
980 Base nodes have just their metadata (e.g. phase) transferred 428 Base nodes have just their metadata (e.g. phase) transferred
981 429
982 $ sendhttpv2peer << EOF 430 $ sendhttpv2peer << EOF
983 > command changesetdata 431 > command changesetdata
984 > fields eval:[b'phase', b'parents', b'revision'] 432 > fields eval:[b'phase', b'parents', b'revision']
985 > 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', b'\xea\xe5\xf8\x2c\x2e\x62\x23\x68\xd2\x7d\xae\xcb\x76\xb7\xe3\x93\xd0\xf2\x42\x11']] 433 > 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', b'\xea\xe5\xf8\x2c\x2e\x62\x23\x68\xd2\x7d\xae\xcb\x76\xb7\xe3\x93\xd0\xf2\x42\x11']]
986 > EOF 434 > EOF
987 creating http peer for wire protocol version 2 435 creating http peer for wire protocol version 2
988 sending changesetdata command 436 sending changesetdata command
989 s> POST /api/exp-http-v2-0002/ro/changesetdata HTTP/1.1\r\n
990 s> Accept-Encoding: identity\r\n
991 s> accept: application/mercurial-exp-framing-0005\r\n
992 s> content-type: application/mercurial-exp-framing-0005\r\n
993 s> content-length: 141\r\n
994 s> host: $LOCALIP:$HGPORT\r\n (glob)
995 s> user-agent: Mercurial debugwireproto\r\n
996 s> \r\n
997 s> \x85\x00\x00\x01\x00\x01\x01\x11\xa2Dargs\xa2Ffields\x83EphaseGparentsHrevisionInoderange\x82\x81T3\x90\xef\x85\x00s\xfb\xc2\xf0\xdf\xff"D4,\x8e\x92)\x01:\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
998 s> makefile('rb', None)
999 s> HTTP/1.1 200 OK\r\n
1000 s> Server: testing stub value\r\n
1001 s> Date: $HTTP_DATE$\r\n
1002 s> Content-Type: application/mercurial-exp-framing-0005\r\n
1003 s> Transfer-Encoding: chunked\r\n
1004 s> \r\n
1005 s> 13\r\n
1006 s> \x0b\x00\x00\x01\x00\x02\x011
1007 s> \xa1FstatusBok
1008 s> \r\n
1009 received frame(size=11; request=1; stream=2; streamflags=stream-begin; type=command-response; flags=continuation)
1010 s> 263\r\n
1011 s> [\x02\x00\x01\x00\x02\x001
1012 s> \xa1Jtotalitems\x03\xa2DnodeT3\x90\xef\x85\x00s\xfb\xc2\xf0\xdf\xff"D4,\x8e\x92)\x01:EphaseFpublic\xa4Ofieldsfollowing\x81\x82Hrevision\x18?DnodeTu\x92\x91~\x1c>\x82g|\xb0\xa4\xbcq\\\xa2]\xd1-(\xc1Gparents\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\x00EphaseFpublicX?7f144aea0ba742713887b564d57e9d12f12ff382\n
1013 s> test\n
1014 s> 0 0\n
1015 s> a\n
1016 s> b\n
1017 s> \n
1018 s> commit 1\xa4Ofieldsfollowing\x81\x82Hrevision\x18=DnodeT\x0b\xb8\xad\x89J\x15\xb1S\x80\xb2\xa2\xa5\xb1\x83\xe2\x0f*K(\xddGparents\x82Tu\x92\x91~\x1c>\x82g|\xb0\xa4\xbcq\\\xa2]\xd1-(\xc1T\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00EphaseFpublicX=37f0a2d1c28ffe4b879109a7d1bbf8f07b3c763b\n
1019 s> test\n
1020 s> 0 0\n
1021 s> b\n
1022 s> \n
1023 s> commit 2\xa4Ofieldsfollowing\x81\x82Hrevision\x18=DnodeT\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\x00EphaseEdraftX=1b74476799ec8318045db759b1b4bcc9b839d0aa\n
1024 s> test\n
1025 s> 0 0\n
1026 s> a\n
1027 s> \n
1028 s> commit 3
1029 s> \r\n
1030 received frame(size=603; request=1; stream=2; streamflags=; type=command-response; flags=continuation)
1031 s> 8\r\n
1032 s> \x00\x00\x00\x01\x00\x02\x002
1033 s> \r\n
1034 s> 0\r\n
1035 s> \r\n
1036 received frame(size=0; request=1; stream=2; streamflags=; type=command-response; flags=eos)
1037 response: gen[ 437 response: gen[
1038 { 438 {
1039 b'totalitems': 3 439 b'totalitems': 3
1040 }, 440 },
1041 { 441 {
1086 ], 486 ],
1087 b'phase': b'draft' 487 b'phase': b'draft'
1088 }, 488 },
1089 b'1b74476799ec8318045db759b1b4bcc9b839d0aa\ntest\n0 0\na\n\ncommit 3' 489 b'1b74476799ec8318045db759b1b4bcc9b839d0aa\ntest\n0 0\na\n\ncommit 3'
1090 ] 490 ]
1091 (sent 2 HTTP requests and * bytes; received * bytes in responses) (glob)
1092 491
1093 $ cat error.log 492 $ cat error.log