##// END OF EJS Templates
tests: explicitly define compression engines for tests...
Gregory Szorc -
r37840:da07c781 stable
parent child Browse files
Show More
@@ -1,335 +1,335
1 1 $ . $TESTDIR/wireprotohelpers.sh
2 2
3 3 $ cat >> $HGRCPATH << EOF
4 4 > [web]
5 5 > push_ssl = false
6 6 > allow_push = *
7 7 > EOF
8 8
9 9 $ hg init server
10 10 $ cd server
11 11 $ touch a
12 12 $ hg -q commit -A -m initial
13 13 $ cd ..
14 14
15 15 $ hg serve -R server -p $HGPORT -d --pid-file hg.pid
16 16 $ cat hg.pid >> $DAEMON_PIDS
17 17
18 18 compression formats are advertised in compression capability
19 19
20 20 #if zstd
21 21 $ get-with-headers.py $LOCALIP:$HGPORT '?cmd=capabilities' | tr ' ' '\n' | grep '^compression=zstd,zlib$' > /dev/null
22 22 #else
23 23 $ get-with-headers.py $LOCALIP:$HGPORT '?cmd=capabilities' | tr ' ' '\n' | grep '^compression=zlib$' > /dev/null
24 24 #endif
25 25
26 26 $ killdaemons.py
27 27
28 28 server.compressionengines can replace engines list wholesale
29 29
30 30 $ hg serve --config server.compressionengines=none -R server -p $HGPORT -d --pid-file hg.pid
31 31 $ cat hg.pid > $DAEMON_PIDS
32 32 $ get-with-headers.py $LOCALIP:$HGPORT '?cmd=capabilities' | tr ' ' '\n' | grep '^compression=none$' > /dev/null
33 33
34 34 $ killdaemons.py
35 35
36 36 Order of engines can also change
37 37
38 38 $ hg serve --config server.compressionengines=none,zlib -R server -p $HGPORT -d --pid-file hg.pid
39 39 $ cat hg.pid > $DAEMON_PIDS
40 40 $ get-with-headers.py $LOCALIP:$HGPORT '?cmd=capabilities' | tr ' ' '\n' | grep '^compression=none,zlib$' > /dev/null
41 41
42 42 $ killdaemons.py
43 43
44 44 Start a default server again
45 45
46 46 $ hg serve -R server -p $HGPORT -d --pid-file hg.pid
47 47 $ cat hg.pid > $DAEMON_PIDS
48 48
49 49 Server should send application/mercurial-0.1 to clients if no Accept is used
50 50
51 51 $ get-with-headers.py --headeronly $LOCALIP:$HGPORT '?cmd=getbundle&heads=e93700bd72895c5addab234c56d4024b487a362f&common=0000000000000000000000000000000000000000' -
52 52 200 Script output follows
53 53 content-type: application/mercurial-0.1
54 54 date: $HTTP_DATE$
55 55 server: testing stub value
56 56 transfer-encoding: chunked
57 57
58 58 Server should send application/mercurial-0.1 when client says it wants it
59 59
60 60 $ get-with-headers.py --hgproto '0.1' --headeronly $LOCALIP:$HGPORT '?cmd=getbundle&heads=e93700bd72895c5addab234c56d4024b487a362f&common=0000000000000000000000000000000000000000' -
61 61 200 Script output follows
62 62 content-type: application/mercurial-0.1
63 63 date: $HTTP_DATE$
64 64 server: testing stub value
65 65 transfer-encoding: chunked
66 66
67 67 Server should send application/mercurial-0.2 when client says it wants it
68 68
69 69 $ get-with-headers.py --hgproto '0.2' --headeronly $LOCALIP:$HGPORT '?cmd=getbundle&heads=e93700bd72895c5addab234c56d4024b487a362f&common=0000000000000000000000000000000000000000' -
70 70 200 Script output follows
71 71 content-type: application/mercurial-0.2
72 72 date: $HTTP_DATE$
73 73 server: testing stub value
74 74 transfer-encoding: chunked
75 75
76 76 $ get-with-headers.py --hgproto '0.1 0.2' --headeronly $LOCALIP:$HGPORT '?cmd=getbundle&heads=e93700bd72895c5addab234c56d4024b487a362f&common=0000000000000000000000000000000000000000' -
77 77 200 Script output follows
78 78 content-type: application/mercurial-0.2
79 79 date: $HTTP_DATE$
80 80 server: testing stub value
81 81 transfer-encoding: chunked
82 82
83 83 Requesting a compression format that server doesn't support results will fall back to 0.1
84 84
85 85 $ get-with-headers.py --hgproto '0.2 comp=aa' --headeronly $LOCALIP:$HGPORT '?cmd=getbundle&heads=e93700bd72895c5addab234c56d4024b487a362f&common=0000000000000000000000000000000000000000' -
86 86 200 Script output follows
87 87 content-type: application/mercurial-0.1
88 88 date: $HTTP_DATE$
89 89 server: testing stub value
90 90 transfer-encoding: chunked
91 91
92 92 #if zstd
93 93 zstd is used if available
94 94
95 95 $ get-with-headers.py --hgproto '0.2 comp=zstd' $LOCALIP:$HGPORT '?cmd=getbundle&heads=e93700bd72895c5addab234c56d4024b487a362f&common=0000000000000000000000000000000000000000' > resp
96 96 $ f --size --hexdump --bytes 36 --sha1 resp
97 97 resp: size=248, sha1=4d8d8f87fb82bd542ce52881fdc94f850748
98 98 0000: 32 30 30 20 53 63 72 69 70 74 20 6f 75 74 70 75 |200 Script outpu|
99 99 0010: 74 20 66 6f 6c 6c 6f 77 73 0a 0a 04 7a 73 74 64 |t follows...zstd|
100 100 0020: 28 b5 2f fd |(./.|
101 101
102 102 #endif
103 103
104 104 application/mercurial-0.2 is not yet used on non-streaming responses
105 105
106 106 $ get-with-headers.py --hgproto '0.2' $LOCALIP:$HGPORT '?cmd=heads' -
107 107 200 Script output follows
108 108 content-length: 41
109 109 content-type: application/mercurial-0.1
110 110 date: $HTTP_DATE$
111 111 server: testing stub value
112 112
113 113 e93700bd72895c5addab234c56d4024b487a362f
114 114
115 115 Now test protocol preference usage
116 116
117 117 $ killdaemons.py
118 118 $ hg serve --config server.compressionengines=none,zlib -R server -p $HGPORT -d --pid-file hg.pid
119 119 $ cat hg.pid > $DAEMON_PIDS
120 120
121 121 No Accept will send 0.1+zlib, even though "none" is preferred b/c "none" isn't supported on 0.1
122 122
123 123 $ get-with-headers.py --headeronly $LOCALIP:$HGPORT '?cmd=getbundle&heads=e93700bd72895c5addab234c56d4024b487a362f&common=0000000000000000000000000000000000000000' Content-Type
124 124 200 Script output follows
125 125 content-type: application/mercurial-0.1
126 126
127 127 $ get-with-headers.py $LOCALIP:$HGPORT '?cmd=getbundle&heads=e93700bd72895c5addab234c56d4024b487a362f&common=0000000000000000000000000000000000000000' > resp
128 128 $ f --size --hexdump --bytes 28 --sha1 resp
129 129 resp: size=227, sha1=35a4c074da74f32f5440da3cbf04
130 130 0000: 32 30 30 20 53 63 72 69 70 74 20 6f 75 74 70 75 |200 Script outpu|
131 131 0010: 74 20 66 6f 6c 6c 6f 77 73 0a 0a 78 |t follows..x|
132 132
133 133 Explicit 0.1 will send zlib because "none" isn't supported on 0.1
134 134
135 135 $ get-with-headers.py --hgproto '0.1' $LOCALIP:$HGPORT '?cmd=getbundle&heads=e93700bd72895c5addab234c56d4024b487a362f&common=0000000000000000000000000000000000000000' > resp
136 136 $ f --size --hexdump --bytes 28 --sha1 resp
137 137 resp: size=227, sha1=35a4c074da74f32f5440da3cbf04
138 138 0000: 32 30 30 20 53 63 72 69 70 74 20 6f 75 74 70 75 |200 Script outpu|
139 139 0010: 74 20 66 6f 6c 6c 6f 77 73 0a 0a 78 |t follows..x|
140 140
141 141 0.2 with no compression will get "none" because that is server's preference
142 142 (spec says ZL and UN are implicitly supported)
143 143
144 144 $ get-with-headers.py --hgproto '0.2' $LOCALIP:$HGPORT '?cmd=getbundle&heads=e93700bd72895c5addab234c56d4024b487a362f&common=0000000000000000000000000000000000000000' > resp
145 145 $ f --size --hexdump --bytes 32 --sha1 resp
146 146 resp: size=432, sha1=ac931b412ec185a02e0e5bcff98dac83
147 147 0000: 32 30 30 20 53 63 72 69 70 74 20 6f 75 74 70 75 |200 Script outpu|
148 148 0010: 74 20 66 6f 6c 6c 6f 77 73 0a 0a 04 6e 6f 6e 65 |t follows...none|
149 149
150 150 Client receives server preference even if local order doesn't match
151 151
152 152 $ get-with-headers.py --hgproto '0.2 comp=zlib,none' $LOCALIP:$HGPORT '?cmd=getbundle&heads=e93700bd72895c5addab234c56d4024b487a362f&common=0000000000000000000000000000000000000000' > resp
153 153 $ f --size --hexdump --bytes 32 --sha1 resp
154 154 resp: size=432, sha1=ac931b412ec185a02e0e5bcff98dac83
155 155 0000: 32 30 30 20 53 63 72 69 70 74 20 6f 75 74 70 75 |200 Script outpu|
156 156 0010: 74 20 66 6f 6c 6c 6f 77 73 0a 0a 04 6e 6f 6e 65 |t follows...none|
157 157
158 158 Client receives only supported format even if not server preferred format
159 159
160 160 $ get-with-headers.py --hgproto '0.2 comp=zlib' $LOCALIP:$HGPORT '?cmd=getbundle&heads=e93700bd72895c5addab234c56d4024b487a362f&common=0000000000000000000000000000000000000000' > resp
161 161 $ f --size --hexdump --bytes 33 --sha1 resp
162 162 resp: size=232, sha1=a1c727f0c9693ca15742a75c30419bc36
163 163 0000: 32 30 30 20 53 63 72 69 70 74 20 6f 75 74 70 75 |200 Script outpu|
164 164 0010: 74 20 66 6f 6c 6c 6f 77 73 0a 0a 04 7a 6c 69 62 |t follows...zlib|
165 165 0020: 78 |x|
166 166
167 167 $ killdaemons.py
168 168 $ cd ..
169 169
170 170 Test listkeys for listing namespaces
171 171
172 172 $ hg init empty
173 173 $ hg -R empty serve -p $HGPORT -d --pid-file hg.pid
174 174 $ cat hg.pid > $DAEMON_PIDS
175 175
176 176 $ hg --verbose debugwireproto http://$LOCALIP:$HGPORT << EOF
177 177 > command listkeys
178 178 > namespace namespaces
179 179 > EOF
180 180 s> GET /?cmd=capabilities HTTP/1.1\r\n
181 181 s> Accept-Encoding: identity\r\n
182 182 s> accept: application/mercurial-0.1\r\n
183 183 s> host: $LOCALIP:$HGPORT\r\n (glob)
184 184 s> user-agent: Mercurial debugwireproto\r\n
185 185 s> \r\n
186 186 s> makefile('rb', None)
187 187 s> HTTP/1.1 200 Script output follows\r\n
188 188 s> Server: testing stub value\r\n
189 189 s> Date: $HTTP_DATE$\r\n
190 190 s> Content-Type: application/mercurial-0.1\r\n
191 191 s> Content-Length: *\r\n (glob)
192 192 s> \r\n
193 193 s> batch 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
194 194 sending listkeys command
195 195 s> GET /?cmd=listkeys HTTP/1.1\r\n
196 196 s> Accept-Encoding: identity\r\n
197 197 s> vary: X-HgArg-1,X-HgProto-1\r\n
198 198 s> x-hgarg-1: namespace=namespaces\r\n
199 199 s> x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull\r\n
200 200 s> accept: application/mercurial-0.1\r\n
201 201 s> host: $LOCALIP:$HGPORT\r\n (glob)
202 202 s> user-agent: Mercurial debugwireproto\r\n
203 203 s> \r\n
204 204 s> makefile('rb', None)
205 205 s> HTTP/1.1 200 Script output follows\r\n
206 206 s> Server: testing stub value\r\n
207 207 s> Date: $HTTP_DATE$\r\n
208 208 s> Content-Type: application/mercurial-0.1\r\n
209 209 s> Content-Length: 30\r\n
210 210 s> \r\n
211 211 s> bookmarks\t\n
212 212 s> namespaces\t\n
213 213 s> phases\t
214 214 response: {b'bookmarks': b'', b'namespaces': b'', b'phases': b''}
215 215
216 216 Same thing, but with "httprequest" command
217 217
218 218 $ hg --verbose debugwireproto --peer raw http://$LOCALIP:$HGPORT << EOF
219 219 > httprequest GET ?cmd=listkeys
220 220 > user-agent: test
221 221 > x-hgarg-1: namespace=namespaces
222 222 > EOF
223 223 using raw connection to peer
224 224 s> GET /?cmd=listkeys HTTP/1.1\r\n
225 225 s> Accept-Encoding: identity\r\n
226 226 s> user-agent: test\r\n
227 227 s> x-hgarg-1: namespace=namespaces\r\n
228 228 s> host: $LOCALIP:$HGPORT\r\n (glob)
229 229 s> \r\n
230 230 s> makefile('rb', None)
231 231 s> HTTP/1.1 200 Script output follows\r\n
232 232 s> Server: testing stub value\r\n
233 233 s> Date: $HTTP_DATE$\r\n
234 234 s> Content-Type: application/mercurial-0.1\r\n
235 235 s> Content-Length: 30\r\n
236 236 s> \r\n
237 237 s> bookmarks\t\n
238 238 s> namespaces\t\n
239 239 s> phases\t
240 240
241 241 Client with HTTPv2 enabled advertises that and gets old capabilities response from old server
242 242
243 243 $ hg --config experimental.httppeer.advertise-v2=true --verbose debugwireproto http://$LOCALIP:$HGPORT << EOF
244 244 > command heads
245 245 > EOF
246 246 s> GET /?cmd=capabilities HTTP/1.1\r\n
247 247 s> Accept-Encoding: identity\r\n
248 248 s> vary: X-HgProto-1,X-HgUpgrade-1\r\n
249 249 s> x-hgproto-1: cbor\r\n
250 250 s> x-hgupgrade-1: exp-http-v2-0001\r\n
251 251 s> accept: application/mercurial-0.1\r\n
252 252 s> host: $LOCALIP:$HGPORT\r\n (glob)
253 253 s> user-agent: Mercurial debugwireproto\r\n
254 254 s> \r\n
255 255 s> makefile('rb', None)
256 256 s> HTTP/1.1 200 Script output follows\r\n
257 257 s> Server: testing stub value\r\n
258 258 s> Date: $HTTP_DATE$\r\n
259 259 s> Content-Type: application/mercurial-0.1\r\n
260 260 s> Content-Length: *\r\n (glob)
261 261 s> \r\n
262 262 s> batch 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
263 263 sending heads command
264 264 s> GET /?cmd=heads HTTP/1.1\r\n
265 265 s> Accept-Encoding: identity\r\n
266 266 s> vary: X-HgProto-1\r\n
267 267 s> x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull\r\n
268 268 s> accept: application/mercurial-0.1\r\n
269 269 s> host: $LOCALIP:$HGPORT\r\n (glob)
270 270 s> user-agent: Mercurial debugwireproto\r\n
271 271 s> \r\n
272 272 s> makefile('rb', None)
273 273 s> HTTP/1.1 200 Script output follows\r\n
274 274 s> Server: testing stub value\r\n
275 275 s> Date: $HTTP_DATE$\r\n
276 276 s> Content-Type: application/mercurial-0.1\r\n
277 277 s> Content-Length: 41\r\n
278 278 s> \r\n
279 279 s> 0000000000000000000000000000000000000000\n
280 280 response: [b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00']
281 281
282 282 $ killdaemons.py
283 283 $ enablehttpv2 empty
284 $ hg -R empty serve -p $HGPORT -d --pid-file hg.pid
284 $ hg --config server.compressionengines=zlib -R empty serve -p $HGPORT -d --pid-file hg.pid
285 285 $ cat hg.pid > $DAEMON_PIDS
286 286
287 287 Client with HTTPv2 enabled automatically upgrades if the server supports it
288 288
289 289 $ hg --config experimental.httppeer.advertise-v2=true --verbose debugwireproto http://$LOCALIP:$HGPORT << EOF
290 290 > command heads
291 291 > EOF
292 292 s> GET /?cmd=capabilities HTTP/1.1\r\n
293 293 s> Accept-Encoding: identity\r\n
294 294 s> vary: X-HgProto-1,X-HgUpgrade-1\r\n
295 295 s> x-hgproto-1: cbor\r\n
296 296 s> x-hgupgrade-1: exp-http-v2-0001\r\n
297 297 s> accept: application/mercurial-0.1\r\n
298 298 s> host: $LOCALIP:$HGPORT\r\n (glob)
299 299 s> user-agent: Mercurial debugwireproto\r\n
300 300 s> \r\n
301 301 s> makefile('rb', None)
302 302 s> HTTP/1.1 200 OK\r\n
303 303 s> Server: testing stub value\r\n
304 304 s> Date: $HTTP_DATE$\r\n
305 305 s> Content-Type: application/mercurial-cbor\r\n
306 306 s> Content-Length: *\r\n (glob)
307 307 s> \r\n
308 s> \xa3Dapis\xa1Pexp-http-v2-0001\xa4Hcommands\xa7Eheads\xa2Dargs\xa1Jpubliconly\xf4Kpermissions\x81DpullEknown\xa2Dargs\xa1Enodes\x81HdeadbeefKpermissions\x81DpullFlookup\xa2Dargs\xa1CkeyCfooKpermissions\x81DpullGpushkey\xa2Dargs\xa4CkeyCkeyCnewCnewColdColdInamespaceBnsKpermissions\x81DpushHlistkeys\xa2Dargs\xa1InamespaceBnsKpermissions\x81DpullIbranchmap\xa2Dargs\xa0Kpermissions\x81DpullLcapabilities\xa2Dargs\xa0Kpermissions\x81DpullKcompression\x82\xa1DnameDzstd\xa1DnameDzlibNrawrepoformats\x82LgeneraldeltaHrevlogv1Qframingmediatypes\x81X&application/mercurial-exp-framing-0005GapibaseDapi/Nv1capabilitiesY\x01\xcabatch 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
308 s> \xa3Dapis\xa1Pexp-http-v2-0001\xa4Hcommands\xa7Eheads\xa2Dargs\xa1Jpubliconly\xf4Kpermissions\x81DpullEknown\xa2Dargs\xa1Enodes\x81HdeadbeefKpermissions\x81DpullFlookup\xa2Dargs\xa1CkeyCfooKpermissions\x81DpullGpushkey\xa2Dargs\xa4CkeyCkeyCnewCnewColdColdInamespaceBnsKpermissions\x81DpushHlistkeys\xa2Dargs\xa1InamespaceBnsKpermissions\x81DpullIbranchmap\xa2Dargs\xa0Kpermissions\x81DpullLcapabilities\xa2Dargs\xa0Kpermissions\x81DpullKcompression\x81\xa1DnameDzlibNrawrepoformats\x82LgeneraldeltaHrevlogv1Qframingmediatypes\x81X&application/mercurial-exp-framing-0005GapibaseDapi/Nv1capabilitiesY\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
309 309 sending heads command
310 310 s> POST /api/exp-http-v2-0001/ro/heads HTTP/1.1\r\n
311 311 s> Accept-Encoding: identity\r\n
312 312 s> accept: application/mercurial-exp-framing-0005\r\n
313 313 s> content-type: application/mercurial-exp-framing-0005\r\n
314 314 s> content-length: 20\r\n
315 315 s> host: $LOCALIP:$HGPORT\r\n (glob)
316 316 s> user-agent: Mercurial debugwireproto\r\n
317 317 s> \r\n
318 318 s> \x0c\x00\x00\x01\x00\x01\x01\x11\xa1DnameEheads
319 319 s> makefile('rb', None)
320 320 s> HTTP/1.1 200 OK\r\n
321 321 s> Server: testing stub value\r\n
322 322 s> Date: $HTTP_DATE$\r\n
323 323 s> Content-Type: application/mercurial-exp-framing-0005\r\n
324 324 s> Transfer-Encoding: chunked\r\n
325 325 s> \r\n
326 326 s> 29\r\n
327 327 s> !\x00\x00\x01\x00\x02\x012
328 328 s> \xa1FstatusBok\x81T\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00
329 329 s> \r\n
330 330 received frame(size=33; request=1; stream=2; streamflags=stream-begin; type=command-response; flags=eos)
331 331 s> 0\r\n
332 332 s> \r\n
333 333 response: [b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00']
334 334
335 335 $ killdaemons.py
@@ -1,248 +1,257
1 1 $ . $TESTDIR/wireprotohelpers.sh
2 2
3 3 $ hg init server
4
5 zstd isn't present in plain builds. Make tests easier by removing
6 zstd from the equation.
7
8 $ cat >> server/.hg/hgrc << EOF
9 > [server]
10 > compressionengines = zlib
11 > EOF
12
4 13 $ hg -R server serve -p $HGPORT -d --pid-file hg.pid -E error.log
5 14 $ cat hg.pid > $DAEMON_PIDS
6 15
7 16 A normal capabilities request is serviced for version 1
8 17
9 18 $ sendhttpraw << EOF
10 19 > httprequest GET ?cmd=capabilities
11 20 > user-agent: test
12 21 > EOF
13 22 using raw connection to peer
14 23 s> GET /?cmd=capabilities HTTP/1.1\r\n
15 24 s> Accept-Encoding: identity\r\n
16 25 s> user-agent: test\r\n
17 26 s> host: $LOCALIP:$HGPORT\r\n (glob)
18 27 s> \r\n
19 28 s> makefile('rb', None)
20 29 s> HTTP/1.1 200 Script output follows\r\n
21 30 s> Server: testing stub value\r\n
22 31 s> Date: $HTTP_DATE$\r\n
23 32 s> Content-Type: application/mercurial-0.1\r\n
24 33 s> Content-Length: *\r\n (glob)
25 34 s> \r\n
26 35 s> batch 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
27 36
28 37 A proper request without the API server enabled returns the legacy response
29 38
30 39 $ sendhttpraw << EOF
31 40 > httprequest GET ?cmd=capabilities
32 41 > user-agent: test
33 42 > x-hgupgrade-1: foo
34 43 > x-hgproto-1: cbor
35 44 > EOF
36 45 using raw connection to peer
37 46 s> GET /?cmd=capabilities HTTP/1.1\r\n
38 47 s> Accept-Encoding: identity\r\n
39 48 s> user-agent: test\r\n
40 49 s> x-hgproto-1: cbor\r\n
41 50 s> x-hgupgrade-1: foo\r\n
42 51 s> host: $LOCALIP:$HGPORT\r\n (glob)
43 52 s> \r\n
44 53 s> makefile('rb', None)
45 54 s> HTTP/1.1 200 Script output follows\r\n
46 55 s> Server: testing stub value\r\n
47 56 s> Date: $HTTP_DATE$\r\n
48 57 s> Content-Type: application/mercurial-0.1\r\n
49 58 s> Content-Length: *\r\n (glob)
50 59 s> \r\n
51 60 s> batch 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
52 61
53 62 Restart with just API server enabled. This enables serving the new format.
54 63
55 64 $ killdaemons.py
56 65 $ cat error.log
57 66
58 67 $ cat >> server/.hg/hgrc << EOF
59 68 > [experimental]
60 69 > web.apiserver = true
61 70 > EOF
62 71
63 72 $ hg -R server serve -p $HGPORT -d --pid-file hg.pid -E error.log
64 73 $ cat hg.pid > $DAEMON_PIDS
65 74
66 75 X-HgUpgrade-<N> without CBOR advertisement uses legacy response
67 76
68 77 $ sendhttpraw << EOF
69 78 > httprequest GET ?cmd=capabilities
70 79 > user-agent: test
71 80 > x-hgupgrade-1: foo bar
72 81 > EOF
73 82 using raw connection to peer
74 83 s> GET /?cmd=capabilities HTTP/1.1\r\n
75 84 s> Accept-Encoding: identity\r\n
76 85 s> user-agent: test\r\n
77 86 s> x-hgupgrade-1: foo bar\r\n
78 87 s> host: $LOCALIP:$HGPORT\r\n (glob)
79 88 s> \r\n
80 89 s> makefile('rb', None)
81 90 s> HTTP/1.1 200 Script output follows\r\n
82 91 s> Server: testing stub value\r\n
83 92 s> Date: $HTTP_DATE$\r\n
84 93 s> Content-Type: application/mercurial-0.1\r\n
85 94 s> Content-Length: *\r\n (glob)
86 95 s> \r\n
87 96 s> batch 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
88 97
89 98 X-HgUpgrade-<N> without known serialization in X-HgProto-<N> uses legacy response
90 99
91 100 $ sendhttpraw << EOF
92 101 > httprequest GET ?cmd=capabilities
93 102 > user-agent: test
94 103 > x-hgupgrade-1: foo bar
95 104 > x-hgproto-1: some value
96 105 > EOF
97 106 using raw connection to peer
98 107 s> GET /?cmd=capabilities HTTP/1.1\r\n
99 108 s> Accept-Encoding: identity\r\n
100 109 s> user-agent: test\r\n
101 110 s> x-hgproto-1: some value\r\n
102 111 s> x-hgupgrade-1: foo bar\r\n
103 112 s> host: $LOCALIP:$HGPORT\r\n (glob)
104 113 s> \r\n
105 114 s> makefile('rb', None)
106 115 s> HTTP/1.1 200 Script output follows\r\n
107 116 s> Server: testing stub value\r\n
108 117 s> Date: $HTTP_DATE$\r\n
109 118 s> Content-Type: application/mercurial-0.1\r\n
110 119 s> Content-Length: *\r\n (glob)
111 120 s> \r\n
112 121 s> batch 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
113 122
114 123 X-HgUpgrade-<N> + X-HgProto-<N> headers trigger new response format
115 124
116 125 $ sendhttpraw << EOF
117 126 > httprequest GET ?cmd=capabilities
118 127 > user-agent: test
119 128 > x-hgupgrade-1: foo bar
120 129 > x-hgproto-1: cbor
121 130 > EOF
122 131 using raw connection to peer
123 132 s> GET /?cmd=capabilities HTTP/1.1\r\n
124 133 s> Accept-Encoding: identity\r\n
125 134 s> user-agent: test\r\n
126 135 s> x-hgproto-1: cbor\r\n
127 136 s> x-hgupgrade-1: foo bar\r\n
128 137 s> host: $LOCALIP:$HGPORT\r\n (glob)
129 138 s> \r\n
130 139 s> makefile('rb', None)
131 140 s> HTTP/1.1 200 OK\r\n
132 141 s> Server: testing stub value\r\n
133 142 s> Date: $HTTP_DATE$\r\n
134 143 s> Content-Type: application/mercurial-cbor\r\n
135 144 s> Content-Length: *\r\n (glob)
136 145 s> \r\n
137 s> \xa3Dapis\xa0GapibaseDapi/Nv1capabilitiesY\x01\xcabatch 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
146 s> \xa3Dapis\xa0GapibaseDapi/Nv1capabilitiesY\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
138 147 cbor> {b'apibase': b'api/', b'apis': {}, b'v1capabilities': b'batch 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'}
139 148
140 149 Restart server to enable HTTPv2
141 150
142 151 $ killdaemons.py
143 152 $ enablehttpv2 server
144 153 $ hg -R server serve -p $HGPORT -d --pid-file hg.pid -E error.log
145 154 $ cat hg.pid > $DAEMON_PIDS
146 155
147 156 Only requested API services are returned
148 157
149 158 $ sendhttpraw << EOF
150 159 > httprequest GET ?cmd=capabilities
151 160 > user-agent: test
152 161 > x-hgupgrade-1: foo bar
153 162 > x-hgproto-1: cbor
154 163 > EOF
155 164 using raw connection to peer
156 165 s> GET /?cmd=capabilities HTTP/1.1\r\n
157 166 s> Accept-Encoding: identity\r\n
158 167 s> user-agent: test\r\n
159 168 s> x-hgproto-1: cbor\r\n
160 169 s> x-hgupgrade-1: foo bar\r\n
161 170 s> host: $LOCALIP:$HGPORT\r\n (glob)
162 171 s> \r\n
163 172 s> makefile('rb', None)
164 173 s> HTTP/1.1 200 OK\r\n
165 174 s> Server: testing stub value\r\n
166 175 s> Date: $HTTP_DATE$\r\n
167 176 s> Content-Type: application/mercurial-cbor\r\n
168 177 s> Content-Length: *\r\n (glob)
169 178 s> \r\n
170 s> \xa3Dapis\xa0GapibaseDapi/Nv1capabilitiesY\x01\xcabatch 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
179 s> \xa3Dapis\xa0GapibaseDapi/Nv1capabilitiesY\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
171 180 cbor> {b'apibase': b'api/', b'apis': {}, b'v1capabilities': b'batch 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'}
172 181
173 182 Request for HTTPv2 service returns information about it
174 183
175 184 $ sendhttpraw << EOF
176 185 > httprequest GET ?cmd=capabilities
177 186 > user-agent: test
178 187 > x-hgupgrade-1: exp-http-v2-0001 foo bar
179 188 > x-hgproto-1: cbor
180 189 > EOF
181 190 using raw connection to peer
182 191 s> GET /?cmd=capabilities HTTP/1.1\r\n
183 192 s> Accept-Encoding: identity\r\n
184 193 s> user-agent: test\r\n
185 194 s> x-hgproto-1: cbor\r\n
186 195 s> x-hgupgrade-1: exp-http-v2-0001 foo bar\r\n
187 196 s> host: $LOCALIP:$HGPORT\r\n (glob)
188 197 s> \r\n
189 198 s> makefile('rb', None)
190 199 s> HTTP/1.1 200 OK\r\n
191 200 s> Server: testing stub value\r\n
192 201 s> Date: $HTTP_DATE$\r\n
193 202 s> Content-Type: application/mercurial-cbor\r\n
194 203 s> Content-Length: *\r\n (glob)
195 204 s> \r\n
196 s> \xa3Dapis\xa1Pexp-http-v2-0001\xa4Hcommands\xa7Eheads\xa2Dargs\xa1Jpubliconly\xf4Kpermissions\x81DpullEknown\xa2Dargs\xa1Enodes\x81HdeadbeefKpermissions\x81DpullFlookup\xa2Dargs\xa1CkeyCfooKpermissions\x81DpullGpushkey\xa2Dargs\xa4CkeyCkeyCnewCnewColdColdInamespaceBnsKpermissions\x81DpushHlistkeys\xa2Dargs\xa1InamespaceBnsKpermissions\x81DpullIbranchmap\xa2Dargs\xa0Kpermissions\x81DpullLcapabilities\xa2Dargs\xa0Kpermissions\x81DpullKcompression\x82\xa1DnameDzstd\xa1DnameDzlibNrawrepoformats\x82LgeneraldeltaHrevlogv1Qframingmediatypes\x81X&application/mercurial-exp-framing-0005GapibaseDapi/Nv1capabilitiesY\x01\xcabatch 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
197 cbor> {b'apibase': b'api/', b'apis': {b'exp-http-v2-0001': {b'commands': {b'branchmap': {b'args': {}, b'permissions': [b'pull']}, b'capabilities': {b'args': {}, b'permissions': [b'pull']}, b'heads': {b'args': {b'publiconly': False}, b'permissions': [b'pull']}, b'known': {b'args': {b'nodes': [b'deadbeef']}, b'permissions': [b'pull']}, b'listkeys': {b'args': {b'namespace': b'ns'}, b'permissions': [b'pull']}, b'lookup': {b'args': {b'key': b'foo'}, b'permissions': [b'pull']}, b'pushkey': {b'args': {b'key': b'key', b'namespace': b'ns', b'new': b'new', b'old': b'old'}, b'permissions': [b'push']}}, b'compression': [{b'name': b'zstd'}, {b'name': b'zlib'}], b'framingmediatypes': [b'application/mercurial-exp-framing-0005'], b'rawrepoformats': [b'generaldelta', b'revlogv1']}}, b'v1capabilities': b'batch 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'}
205 s> \xa3Dapis\xa1Pexp-http-v2-0001\xa4Hcommands\xa7Eheads\xa2Dargs\xa1Jpubliconly\xf4Kpermissions\x81DpullEknown\xa2Dargs\xa1Enodes\x81HdeadbeefKpermissions\x81DpullFlookup\xa2Dargs\xa1CkeyCfooKpermissions\x81DpullGpushkey\xa2Dargs\xa4CkeyCkeyCnewCnewColdColdInamespaceBnsKpermissions\x81DpushHlistkeys\xa2Dargs\xa1InamespaceBnsKpermissions\x81DpullIbranchmap\xa2Dargs\xa0Kpermissions\x81DpullLcapabilities\xa2Dargs\xa0Kpermissions\x81DpullKcompression\x81\xa1DnameDzlibNrawrepoformats\x82LgeneraldeltaHrevlogv1Qframingmediatypes\x81X&application/mercurial-exp-framing-0005GapibaseDapi/Nv1capabilitiesY\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
206 cbor> {b'apibase': b'api/', b'apis': {b'exp-http-v2-0001': {b'commands': {b'branchmap': {b'args': {}, b'permissions': [b'pull']}, b'capabilities': {b'args': {}, b'permissions': [b'pull']}, b'heads': {b'args': {b'publiconly': False}, b'permissions': [b'pull']}, b'known': {b'args': {b'nodes': [b'deadbeef']}, b'permissions': [b'pull']}, b'listkeys': {b'args': {b'namespace': b'ns'}, b'permissions': [b'pull']}, b'lookup': {b'args': {b'key': b'foo'}, b'permissions': [b'pull']}, b'pushkey': {b'args': {b'key': b'key', b'namespace': b'ns', b'new': b'new', b'old': b'old'}, b'permissions': [b'push']}}, b'compression': [{b'name': b'zlib'}], b'framingmediatypes': [b'application/mercurial-exp-framing-0005'], b'rawrepoformats': [b'generaldelta', b'revlogv1']}}, b'v1capabilities': b'batch 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'}
198 207
199 208 capabilities command returns expected info
200 209
201 210 $ sendhttpv2peerhandshake << EOF
202 211 > command capabilities
203 212 > EOF
204 213 creating http peer for wire protocol version 2
205 214 s> GET /?cmd=capabilities HTTP/1.1\r\n
206 215 s> Accept-Encoding: identity\r\n
207 216 s> vary: X-HgProto-1,X-HgUpgrade-1\r\n
208 217 s> x-hgproto-1: cbor\r\n
209 218 s> x-hgupgrade-1: exp-http-v2-0001\r\n
210 219 s> accept: application/mercurial-0.1\r\n
211 220 s> host: $LOCALIP:$HGPORT\r\n (glob)
212 221 s> user-agent: Mercurial debugwireproto\r\n
213 222 s> \r\n
214 223 s> makefile('rb', None)
215 224 s> HTTP/1.1 200 OK\r\n
216 225 s> Server: testing stub value\r\n
217 226 s> Date: $HTTP_DATE$\r\n
218 227 s> Content-Type: application/mercurial-cbor\r\n
219 228 s> Content-Length: *\r\n (glob)
220 229 s> \r\n
221 s> \xa3Dapis\xa1Pexp-http-v2-0001\xa4Hcommands\xa7Eheads\xa2Dargs\xa1Jpubliconly\xf4Kpermissions\x81DpullEknown\xa2Dargs\xa1Enodes\x81HdeadbeefKpermissions\x81DpullFlookup\xa2Dargs\xa1CkeyCfooKpermissions\x81DpullGpushkey\xa2Dargs\xa4CkeyCkeyCnewCnewColdColdInamespaceBnsKpermissions\x81DpushHlistkeys\xa2Dargs\xa1InamespaceBnsKpermissions\x81DpullIbranchmap\xa2Dargs\xa0Kpermissions\x81DpullLcapabilities\xa2Dargs\xa0Kpermissions\x81DpullKcompression\x82\xa1DnameDzstd\xa1DnameDzlibNrawrepoformats\x82LgeneraldeltaHrevlogv1Qframingmediatypes\x81X&application/mercurial-exp-framing-0005GapibaseDapi/Nv1capabilitiesY\x01\xcabatch 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
230 s> \xa3Dapis\xa1Pexp-http-v2-0001\xa4Hcommands\xa7Eheads\xa2Dargs\xa1Jpubliconly\xf4Kpermissions\x81DpullEknown\xa2Dargs\xa1Enodes\x81HdeadbeefKpermissions\x81DpullFlookup\xa2Dargs\xa1CkeyCfooKpermissions\x81DpullGpushkey\xa2Dargs\xa4CkeyCkeyCnewCnewColdColdInamespaceBnsKpermissions\x81DpushHlistkeys\xa2Dargs\xa1InamespaceBnsKpermissions\x81DpullIbranchmap\xa2Dargs\xa0Kpermissions\x81DpullLcapabilities\xa2Dargs\xa0Kpermissions\x81DpullKcompression\x81\xa1DnameDzlibNrawrepoformats\x82LgeneraldeltaHrevlogv1Qframingmediatypes\x81X&application/mercurial-exp-framing-0005GapibaseDapi/Nv1capabilitiesY\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
222 231 sending capabilities command
223 232 s> POST /api/exp-http-v2-0001/ro/capabilities HTTP/1.1\r\n
224 233 s> Accept-Encoding: identity\r\n
225 234 s> *\r\n (glob)
226 235 s> content-type: application/mercurial-exp-framing-0005\r\n
227 236 s> content-length: 27\r\n
228 237 s> host: $LOCALIP:$HGPORT\r\n (glob)
229 238 s> user-agent: Mercurial debugwireproto\r\n
230 239 s> \r\n
231 240 s> \x13\x00\x00\x01\x00\x01\x01\x11\xa1DnameLcapabilities
232 241 s> makefile('rb', None)
233 242 s> HTTP/1.1 200 OK\r\n
234 243 s> Server: testing stub value\r\n
235 244 s> Date: $HTTP_DATE$\r\n
236 245 s> Content-Type: application/mercurial-exp-framing-0005\r\n
237 246 s> Transfer-Encoding: chunked\r\n
238 247 s> \r\n
239 s> 1e2\r\n
240 s> \xda\x01\x00\x01\x00\x02\x012
241 s> \xa1FstatusBok\xa4Hcommands\xa7Eheads\xa2Dargs\xa1Jpubliconly\xf4Kpermissions\x81DpullEknown\xa2Dargs\xa1Enodes\x81HdeadbeefKpermissions\x81DpullFlookup\xa2Dargs\xa1CkeyCfooKpermissions\x81DpullGpushkey\xa2Dargs\xa4CkeyCkeyCnewCnewColdColdInamespaceBnsKpermissions\x81DpushHlistkeys\xa2Dargs\xa1InamespaceBnsKpermissions\x81DpullIbranchmap\xa2Dargs\xa0Kpermissions\x81DpullLcapabilities\xa2Dargs\xa0Kpermissions\x81DpullKcompression\x82\xa1DnameDzstd\xa1DnameDzlibNrawrepoformats\x82LgeneraldeltaHrevlogv1Qframingmediatypes\x81X&application/mercurial-exp-framing-0005
248 s> 1d7\r\n
249 s> \xcf\x01\x00\x01\x00\x02\x012
250 s> \xa1FstatusBok\xa4Hcommands\xa7Eheads\xa2Dargs\xa1Jpubliconly\xf4Kpermissions\x81DpullEknown\xa2Dargs\xa1Enodes\x81HdeadbeefKpermissions\x81DpullFlookup\xa2Dargs\xa1CkeyCfooKpermissions\x81DpullGpushkey\xa2Dargs\xa4CkeyCkeyCnewCnewColdColdInamespaceBnsKpermissions\x81DpushHlistkeys\xa2Dargs\xa1InamespaceBnsKpermissions\x81DpullIbranchmap\xa2Dargs\xa0Kpermissions\x81DpullLcapabilities\xa2Dargs\xa0Kpermissions\x81DpullKcompression\x81\xa1DnameDzlibNrawrepoformats\x82LgeneraldeltaHrevlogv1Qframingmediatypes\x81X&application/mercurial-exp-framing-0005
242 251 s> \r\n
243 received frame(size=474; request=1; stream=2; streamflags=stream-begin; type=command-response; flags=eos)
252 received frame(size=463; request=1; stream=2; streamflags=stream-begin; type=command-response; flags=eos)
244 253 s> 0\r\n
245 254 s> \r\n
246 response: [{b'status': b'ok'}, {b'commands': {b'branchmap': {b'args': {}, b'permissions': [b'pull']}, b'capabilities': {b'args': {}, b'permissions': [b'pull']}, b'heads': {b'args': {b'publiconly': False}, b'permissions': [b'pull']}, b'known': {b'args': {b'nodes': [b'deadbeef']}, b'permissions': [b'pull']}, b'listkeys': {b'args': {b'namespace': b'ns'}, b'permissions': [b'pull']}, b'lookup': {b'args': {b'key': b'foo'}, b'permissions': [b'pull']}, b'pushkey': {b'args': {b'key': b'key', b'namespace': b'ns', b'new': b'new', b'old': b'old'}, b'permissions': [b'push']}}, b'compression': [{b'name': b'zstd'}, {b'name': b'zlib'}], b'framingmediatypes': [b'application/mercurial-exp-framing-0005'], b'rawrepoformats': [b'generaldelta', b'revlogv1']}]
255 response: [{b'status': b'ok'}, {b'commands': {b'branchmap': {b'args': {}, b'permissions': [b'pull']}, b'capabilities': {b'args': {}, b'permissions': [b'pull']}, b'heads': {b'args': {b'publiconly': False}, b'permissions': [b'pull']}, b'known': {b'args': {b'nodes': [b'deadbeef']}, b'permissions': [b'pull']}, b'listkeys': {b'args': {b'namespace': b'ns'}, b'permissions': [b'pull']}, b'lookup': {b'args': {b'key': b'foo'}, b'permissions': [b'pull']}, b'pushkey': {b'args': {b'key': b'key', b'namespace': b'ns', b'new': b'new', b'old': b'old'}, b'permissions': [b'push']}}, b'compression': [{b'name': b'zlib'}], b'framingmediatypes': [b'application/mercurial-exp-framing-0005'], b'rawrepoformats': [b'generaldelta', b'revlogv1']}]
247 256
248 257 $ cat error.log
General Comments 0
You need to be logged in to leave comments. Login now