Show More
@@ -12,9 +12,6 b' import sys' | |||||
12 | import threading |
|
12 | import threading | |
13 |
|
13 | |||
14 | from .i18n import _ |
|
14 | from .i18n import _ | |
15 | from .thirdparty import ( |
|
|||
16 | cbor, |
|
|||
17 | ) |
|
|||
18 | from . import ( |
|
15 | from . import ( | |
19 | encoding, |
|
16 | encoding, | |
20 | error, |
|
17 | error, | |
@@ -25,6 +22,7 b' from . import (' | |||||
25 | wireprotov2server, |
|
22 | wireprotov2server, | |
26 | ) |
|
23 | ) | |
27 | from .utils import ( |
|
24 | from .utils import ( | |
|
25 | cborutil, | |||
28 | interfaceutil, |
|
26 | interfaceutil, | |
29 | procutil, |
|
27 | procutil, | |
30 | ) |
|
28 | ) | |
@@ -389,7 +387,7 b' def processcapabilitieshandshake(repo, r' | |||||
389 |
|
387 | |||
390 | res.status = b'200 OK' |
|
388 | res.status = b'200 OK' | |
391 | res.headers[b'Content-Type'] = b'application/mercurial-cbor' |
|
389 | res.headers[b'Content-Type'] = b'application/mercurial-cbor' | |
392 | res.setbodybytes(cbor.dumps(m, canonical=True)) |
|
390 | res.setbodybytes(b''.join(cborutil.streamencode(m))) | |
393 |
|
391 | |||
394 | return True |
|
392 | return True | |
395 |
|
393 |
@@ -313,7 +313,7 b' Client with HTTPv2 enabled automatically' | |||||
313 | s> Content-Type: application/mercurial-cbor\r\n |
|
313 | s> Content-Type: application/mercurial-cbor\r\n | |
314 | s> Content-Length: *\r\n (glob) |
|
314 | s> Content-Length: *\r\n (glob) | |
315 | s> \r\n |
|
315 | s> \r\n | |
316 |
s> \xa3Dapis\xa1Pexp-http-v2-0001\xa4Hcommands\xa7Eheads\xa2Dargs\xa1Jpubliconly\xf4Kpermissions\x81DpullEknown\xa2Dargs\xa1Enodes\x81HdeadbeefKpermissions\x81DpullFlookup\xa2Dargs\xa1CkeyCfooKpermissions\x81DpullGpushkey\xa2Dargs\xa4CkeyCkeyCnewCnewColdCold |
|
316 | s> \xa3GapibaseDapi/Dapis\xa1Pexp-http-v2-0001\xa4Hcommands\xa7Ibranchmap\xa2Dargs\xa0Kpermissions\x81DpullLcapabilities\xa2Dargs\xa0Kpermissions\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 | sending heads command |
|
317 | sending heads command | |
318 | s> POST /api/exp-http-v2-0001/ro/heads HTTP/1.1\r\n |
|
318 | s> POST /api/exp-http-v2-0001/ro/heads HTTP/1.1\r\n | |
319 | s> Accept-Encoding: identity\r\n |
|
319 | s> Accept-Encoding: identity\r\n |
@@ -145,7 +145,7 b' X-HgUpgrade-<N> + X-HgProto-<N> headers ' | |||||
145 | s> Content-Type: application/mercurial-cbor\r\n |
|
145 | s> Content-Type: application/mercurial-cbor\r\n | |
146 | s> Content-Length: *\r\n (glob) |
|
146 | s> Content-Length: *\r\n (glob) | |
147 | s> \r\n |
|
147 | s> \r\n | |
148 |
s> \xa3Dapis\xa0 |
|
148 | s> \xa3GapibaseDapi/Dapis\xa0Nv1capabilitiesY\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 | |
149 | cbor> { |
|
149 | cbor> { | |
150 | b'apibase': b'api/', |
|
150 | b'apibase': b'api/', | |
151 | b'apis': {}, |
|
151 | b'apis': {}, | |
@@ -182,7 +182,7 b' Only requested API services are returned' | |||||
182 | s> Content-Type: application/mercurial-cbor\r\n |
|
182 | s> Content-Type: application/mercurial-cbor\r\n | |
183 | s> Content-Length: *\r\n (glob) |
|
183 | s> Content-Length: *\r\n (glob) | |
184 | s> \r\n |
|
184 | s> \r\n | |
185 |
s> \xa3Dapis\xa0 |
|
185 | s> \xa3GapibaseDapi/Dapis\xa0Nv1capabilitiesY\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 | |
186 | cbor> { |
|
186 | cbor> { | |
187 | b'apibase': b'api/', |
|
187 | b'apibase': b'api/', | |
188 | b'apis': {}, |
|
188 | b'apis': {}, | |
@@ -212,7 +212,7 b' Request for HTTPv2 service returns infor' | |||||
212 | s> Content-Type: application/mercurial-cbor\r\n |
|
212 | s> Content-Type: application/mercurial-cbor\r\n | |
213 | s> Content-Length: *\r\n (glob) |
|
213 | s> Content-Length: *\r\n (glob) | |
214 | s> \r\n |
|
214 | s> \r\n | |
215 |
s> \xa3Dapis\xa1Pexp-http-v2-0001\xa4Hcommands\xa7Eheads\xa2Dargs\xa1Jpubliconly\xf4Kpermissions\x81DpullEknown\xa2Dargs\xa1Enodes\x81HdeadbeefKpermissions\x81DpullFlookup\xa2Dargs\xa1CkeyCfooKpermissions\x81DpullGpushkey\xa2Dargs\xa4CkeyCkeyCnewCnewColdCold |
|
215 | s> \xa3GapibaseDapi/Dapis\xa1Pexp-http-v2-0001\xa4Hcommands\xa7Ibranchmap\xa2Dargs\xa0Kpermissions\x81DpullLcapabilities\xa2Dargs\xa0Kpermissions\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 | cbor> { |
|
216 | cbor> { | |
217 | b'apibase': b'api/', |
|
217 | b'apibase': b'api/', | |
218 | b'apis': { |
|
218 | b'apis': { | |
@@ -315,7 +315,7 b' capabilities command returns expected in' | |||||
315 | s> Content-Type: application/mercurial-cbor\r\n |
|
315 | s> Content-Type: application/mercurial-cbor\r\n | |
316 | s> Content-Length: *\r\n (glob) |
|
316 | s> Content-Length: *\r\n (glob) | |
317 | s> \r\n |
|
317 | s> \r\n | |
318 |
s> \xa3Dapis\xa1Pexp-http-v2-0001\xa4Hcommands\xa7Eheads\xa2Dargs\xa1Jpubliconly\xf4Kpermissions\x81DpullEknown\xa2Dargs\xa1Enodes\x81HdeadbeefKpermissions\x81DpullFlookup\xa2Dargs\xa1CkeyCfooKpermissions\x81DpullGpushkey\xa2Dargs\xa4CkeyCkeyCnewCnewColdCold |
|
318 | s> \xa3GapibaseDapi/Dapis\xa1Pexp-http-v2-0001\xa4Hcommands\xa7Ibranchmap\xa2Dargs\xa0Kpermissions\x81DpullLcapabilities\xa2Dargs\xa0Kpermissions\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 | sending capabilities command |
|
319 | sending capabilities command | |
320 | s> POST /api/exp-http-v2-0001/ro/capabilities HTTP/1.1\r\n |
|
320 | s> POST /api/exp-http-v2-0001/ro/capabilities HTTP/1.1\r\n | |
321 | s> Accept-Encoding: identity\r\n |
|
321 | s> Accept-Encoding: identity\r\n |
General Comments 0
You need to be logged in to leave comments.
Login now