Show More
This diff has been collapsed as it changes many lines, (1394 lines changed) Show them Hide them | |||||
@@ -1,1473 +1,1483 | |||||
|
1 | TRANSITIONAL CONFIG | |||
|
2 | $ cat << EOF >> $HGRCPATH | |||
|
3 | > [format] | |||
|
4 | > sparse-revlog = yes | |||
|
5 | > EOF | |||
|
6 | ||||
1 |
$ |
|
7 | $ . $TESTDIR/wireprotohelpers.sh | |
2 |
|
8 | |||
3 |
$ |
|
9 | $ cat >> $HGRCPATH << EOF | |
4 | > [extensions] |
|
10 | > [extensions] | |
5 | > blackbox = |
|
11 | > blackbox = | |
6 | > [blackbox] |
|
12 | > [blackbox] | |
7 | > track = simplecache |
|
13 | > track = simplecache | |
8 | > EOF |
|
14 | > EOF | |
9 |
|
15 | |||
10 |
$ |
|
16 | $ hg init server | |
11 | $ enablehttpv2 server |
|
17 | $ enablehttpv2 server | |
12 | $ cd server |
|
18 | $ cd server | |
13 | $ cat >> .hg/hgrc << EOF |
|
19 | $ cat >> .hg/hgrc << EOF | |
14 | > [server] |
|
20 | > [server] | |
15 | > compressionengines = zlib |
|
21 | > compressionengines = zlib | |
16 | > [extensions] |
|
22 | > [extensions] | |
17 | > simplecache = $TESTDIR/wireprotosimplecache.py |
|
23 | > simplecache = $TESTDIR/wireprotosimplecache.py | |
18 | > [simplecache] |
|
24 | > [simplecache] | |
19 | > cacheapi = true |
|
25 | > cacheapi = true | |
20 | > EOF |
|
26 | > EOF | |
21 |
|
27 | |||
22 | $ echo a0 > a |
|
28 | $ echo a0 > a | |
23 | $ echo b0 > b |
|
29 | $ echo b0 > b | |
24 | $ hg -q commit -A -m 'commit 0' |
|
30 | $ hg -q commit -A -m 'commit 0' | |
25 | $ echo a1 > a |
|
31 | $ echo a1 > a | |
26 | $ hg commit -m 'commit 1' |
|
32 | $ hg commit -m 'commit 1' | |
27 |
|
33 | |||
28 | $ hg --debug debugindex -m |
|
34 | $ hg --debug debugindex -m | |
29 | rev linkrev nodeid p1 p2 |
|
35 | rev linkrev nodeid p1 p2 | |
30 | 0 0 992f4779029a3df8d0666d00bb924f69634e2641 0000000000000000000000000000000000000000 0000000000000000000000000000000000000000 |
|
36 | 0 0 992f4779029a3df8d0666d00bb924f69634e2641 0000000000000000000000000000000000000000 0000000000000000000000000000000000000000 | |
31 | 1 1 a988fb43583e871d1ed5750ee074c6d840bbbfc8 992f4779029a3df8d0666d00bb924f69634e2641 0000000000000000000000000000000000000000 |
|
37 | 1 1 a988fb43583e871d1ed5750ee074c6d840bbbfc8 992f4779029a3df8d0666d00bb924f69634e2641 0000000000000000000000000000000000000000 | |
32 |
|
38 | |||
33 | $ hg --config simplecache.redirectsfile=redirects.py serve -p $HGPORT -d --pid-file hg.pid -E error.log |
|
39 | $ hg --config simplecache.redirectsfile=redirects.py serve -p $HGPORT -d --pid-file hg.pid -E error.log | |
34 | $ cat hg.pid > $DAEMON_PIDS |
|
40 | $ cat hg.pid > $DAEMON_PIDS | |
35 |
|
41 | |||
36 | $ cat > redirects.py << EOF |
|
42 | $ cat > redirects.py << EOF | |
37 | > [ |
|
43 | > [ | |
38 | > { |
|
44 | > { | |
39 | > b'name': b'target-a', |
|
45 | > b'name': b'target-a', | |
40 | > b'protocol': b'http', |
|
46 | > b'protocol': b'http', | |
41 | > b'snirequired': False, |
|
47 | > b'snirequired': False, | |
42 | > b'tlsversions': [b'1.2', b'1.3'], |
|
48 | > b'tlsversions': [b'1.2', b'1.3'], | |
43 | > b'uris': [b'http://example.com/'], |
|
49 | > b'uris': [b'http://example.com/'], | |
44 | > }, |
|
50 | > }, | |
45 | > ] |
|
51 | > ] | |
46 | > EOF |
|
52 | > EOF | |
47 |
|
53 | |||
48 | Redirect targets advertised when configured |
|
54 | Redirect targets advertised when configured | |
49 |
|
55 | |||
50 | $ sendhttpv2peerhandshake << EOF |
|
56 | $ sendhttpv2peerhandshake << EOF | |
51 | > command capabilities |
|
57 | > command capabilities | |
52 | > EOF |
|
58 | > EOF | |
53 | creating http peer for wire protocol version 2 |
|
59 | creating http peer for wire protocol version 2 | |
54 | s> GET /?cmd=capabilities HTTP/1.1\r\n |
|
60 | s> GET /?cmd=capabilities HTTP/1.1\r\n | |
55 | s> Accept-Encoding: identity\r\n |
|
61 | s> Accept-Encoding: identity\r\n | |
56 | s> vary: X-HgProto-1,X-HgUpgrade-1\r\n |
|
62 | s> vary: X-HgProto-1,X-HgUpgrade-1\r\n | |
57 | s> x-hgproto-1: cbor\r\n |
|
63 | s> x-hgproto-1: cbor\r\n | |
58 | s> x-hgupgrade-1: exp-http-v2-0003\r\n |
|
64 | s> x-hgupgrade-1: exp-http-v2-0003\r\n | |
59 | s> accept: application/mercurial-0.1\r\n |
|
65 | s> accept: application/mercurial-0.1\r\n | |
60 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
66 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
61 | s> user-agent: Mercurial debugwireproto\r\n |
|
67 | s> user-agent: Mercurial debugwireproto\r\n | |
62 | s> \r\n |
|
68 | s> \r\n | |
63 | s> makefile('rb', None) |
|
69 | s> makefile('rb', None) | |
64 | s> HTTP/1.1 200 OK\r\n |
|
70 | s> HTTP/1.1 200 OK\r\n | |
65 | s> Server: testing stub value\r\n |
|
71 | s> Server: testing stub value\r\n | |
66 | s> Date: $HTTP_DATE$\r\n |
|
72 | s> Date: $HTTP_DATE$\r\n | |
67 | s> Content-Type: application/mercurial-cbor\r\n |
|
73 | s> Content-Type: application/mercurial-cbor\r\n | |
68 |
s> Content-Length: 225 |
|
74 | s> Content-Length: 2285\r\n | |
69 | s> \r\n |
|
75 | s> \r\n | |
70 |
s> \xa3GapibaseDapi/Dapis\xa1Pexp-http-v2-0003\xa5Hcommands\xacIbranchmap\xa2Dargs\xa0Kpermissions\x81DpullLcapabilities\xa2Dargs\xa0Kpermissions\x81DpullMchangesetdata\xa2Dargs\xa2Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x84IbookmarksGparentsEphaseHrevisionIrevisions\xa2Hrequired\xf5DtypeDlistKpermissions\x81DpullHfiledata\xa2Dargs\xa4Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x83HlinknodeGparentsHrevisionKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolEnodes\xa2Hrequired\xf5DtypeDlistDpath\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullIfilesdata\xa3Dargs\xa4Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x84NfirstchangesetHlinknodeGparentsHrevisionKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolJpathfilter\xa3Gdefault\xf6Hrequired\xf4DtypeDdictIrevisions\xa2Hrequired\xf5DtypeDlistKpermissions\x81DpullTrecommendedbatchsize\x19\xc3PEheads\xa2Dargs\xa1Jpubliconly\xa3Gdefault\xf4Hrequired\xf4DtypeDboolKpermissions\x81DpullEknown\xa2Dargs\xa1Enodes\xa3Gdefault\x80Hrequired\xf4DtypeDlistKpermissions\x81DpullHlistkeys\xa2Dargs\xa1Inamespace\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullFlookup\xa2Dargs\xa1Ckey\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullLmanifestdata\xa3Dargs\xa4Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x82GparentsHrevisionKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolEnodes\xa2Hrequired\xf5DtypeDlistDtree\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullTrecommendedbatchsize\x1a\x00\x01\x86\xa0Gpushkey\xa2Dargs\xa4Ckey\xa2Hrequired\xf5DtypeEbytesInamespace\xa2Hrequired\xf5DtypeEbytesCnew\xa2Hrequired\xf5DtypeEbytesCold\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpushPrawstorefiledata\xa2Dargs\xa2Efiles\xa2Hrequired\xf5DtypeDlistJpathfilter\xa3Gdefault\xf6Hrequired\xf4DtypeDlistKpermissions\x81DpullQframingmediatypes\x81X&application/mercurial-exp-framing-0006Rpathfilterprefixes\xd9\x01\x02\x82Epath:Lrootfilesin:Nrawrepoformats\x8 |
|
76 | s> \xa3GapibaseDapi/Dapis\xa1Pexp-http-v2-0003\xa5Hcommands\xacIbranchmap\xa2Dargs\xa0Kpermissions\x81DpullLcapabilities\xa2Dargs\xa0Kpermissions\x81DpullMchangesetdata\xa2Dargs\xa2Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x84IbookmarksGparentsEphaseHrevisionIrevisions\xa2Hrequired\xf5DtypeDlistKpermissions\x81DpullHfiledata\xa2Dargs\xa4Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x83HlinknodeGparentsHrevisionKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolEnodes\xa2Hrequired\xf5DtypeDlistDpath\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullIfilesdata\xa3Dargs\xa4Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x84NfirstchangesetHlinknodeGparentsHrevisionKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolJpathfilter\xa3Gdefault\xf6Hrequired\xf4DtypeDdictIrevisions\xa2Hrequired\xf5DtypeDlistKpermissions\x81DpullTrecommendedbatchsize\x19\xc3PEheads\xa2Dargs\xa1Jpubliconly\xa3Gdefault\xf4Hrequired\xf4DtypeDboolKpermissions\x81DpullEknown\xa2Dargs\xa1Enodes\xa3Gdefault\x80Hrequired\xf4DtypeDlistKpermissions\x81DpullHlistkeys\xa2Dargs\xa1Inamespace\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullFlookup\xa2Dargs\xa1Ckey\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullLmanifestdata\xa3Dargs\xa4Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x82GparentsHrevisionKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolEnodes\xa2Hrequired\xf5DtypeDlistDtree\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullTrecommendedbatchsize\x1a\x00\x01\x86\xa0Gpushkey\xa2Dargs\xa4Ckey\xa2Hrequired\xf5DtypeEbytesInamespace\xa2Hrequired\xf5DtypeEbytesCnew\xa2Hrequired\xf5DtypeEbytesCold\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpushPrawstorefiledata\xa2Dargs\xa2Efiles\xa2Hrequired\xf5DtypeDlistJpathfilter\xa3Gdefault\xf6Hrequired\xf4DtypeDlistKpermissions\x81DpullQframingmediatypes\x81X&application/mercurial-exp-framing-0006Rpathfilterprefixes\xd9\x01\x02\x82Epath:Lrootfilesin:Nrawrepoformats\x83LgeneraldeltaHrevlogv1LsparserevlogHredirect\xa2Fhashes\x82Fsha256Dsha1Gtargets\x81\xa5DnameHtarget-aHprotocolDhttpKsnirequired\xf4Ktlsversions\x82C1.2C1.3Duris\x81Shttp://example.com/Nv1capabilitiesY\x01\xe0batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset compression=$BUNDLE2_COMPRESSIONS$ getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash | |
71 | (remote redirect target target-a is compatible) (tls1.2 !) |
|
77 | (remote redirect target target-a is compatible) (tls1.2 !) | |
72 | (remote redirect target target-a requires unsupported TLS versions: 1.2, 1.3) (no-tls1.2 !) |
|
78 | (remote redirect target target-a requires unsupported TLS versions: 1.2, 1.3) (no-tls1.2 !) | |
73 | sending capabilities command |
|
79 | sending capabilities command | |
74 | s> POST /api/exp-http-v2-0003/ro/capabilities HTTP/1.1\r\n |
|
80 | s> POST /api/exp-http-v2-0003/ro/capabilities HTTP/1.1\r\n | |
75 | s> Accept-Encoding: identity\r\n |
|
81 | s> Accept-Encoding: identity\r\n | |
76 | s> accept: application/mercurial-exp-framing-0006\r\n |
|
82 | s> accept: application/mercurial-exp-framing-0006\r\n | |
77 | s> content-type: application/mercurial-exp-framing-0006\r\n |
|
83 | s> content-type: application/mercurial-exp-framing-0006\r\n | |
78 | s> content-length: 111\r\n (tls1.2 !) |
|
84 | s> content-length: 111\r\n (tls1.2 !) | |
79 | s> content-length: 102\r\n (no-tls1.2 !) |
|
85 | s> content-length: 102\r\n (no-tls1.2 !) | |
80 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
86 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
81 | s> user-agent: Mercurial debugwireproto\r\n |
|
87 | s> user-agent: Mercurial debugwireproto\r\n | |
82 | s> \r\n |
|
88 | s> \r\n | |
83 | s> \x1c\x00\x00\x01\x00\x01\x01\x82\xa1Pcontentencodings\x81HidentityC\x00\x00\x01\x00\x01\x00\x11\xa2DnameLcapabilitiesHredirect\xa2Fhashes\x82Fsha256Dsha1Gtargets\x81Htarget-a (tls1.2 !) |
|
89 | s> \x1c\x00\x00\x01\x00\x01\x01\x82\xa1Pcontentencodings\x81HidentityC\x00\x00\x01\x00\x01\x00\x11\xa2DnameLcapabilitiesHredirect\xa2Fhashes\x82Fsha256Dsha1Gtargets\x81Htarget-a (tls1.2 !) | |
84 | s> \x1c\x00\x00\x01\x00\x01\x01\x82\xa1Pcontentencodings\x81Hidentity:\x00\x00\x01\x00\x01\x00\x11\xa2DnameLcapabilitiesHredirect\xa2Fhashes\x82Fsha256Dsha1Gtargets\x80 (no-tls1.2 !) |
|
90 | s> \x1c\x00\x00\x01\x00\x01\x01\x82\xa1Pcontentencodings\x81Hidentity:\x00\x00\x01\x00\x01\x00\x11\xa2DnameLcapabilitiesHredirect\xa2Fhashes\x82Fsha256Dsha1Gtargets\x80 (no-tls1.2 !) | |
85 | s> makefile('rb', None) |
|
91 | s> makefile('rb', None) | |
86 | s> HTTP/1.1 200 OK\r\n |
|
92 | s> HTTP/1.1 200 OK\r\n | |
87 | s> Server: testing stub value\r\n |
|
93 | s> Server: testing stub value\r\n | |
88 | s> Date: $HTTP_DATE$\r\n |
|
94 | s> Date: $HTTP_DATE$\r\n | |
89 | s> Content-Type: application/mercurial-exp-framing-0006\r\n |
|
95 | s> Content-Type: application/mercurial-exp-framing-0006\r\n | |
90 | s> Transfer-Encoding: chunked\r\n |
|
96 | s> Transfer-Encoding: chunked\r\n | |
91 | s> \r\n |
|
97 | s> \r\n | |
92 | s> 11\r\n |
|
98 | s> 11\r\n | |
93 | s> \t\x00\x00\x01\x00\x02\x01\x92 |
|
99 | s> \t\x00\x00\x01\x00\x02\x01\x92 | |
94 | s> Hidentity |
|
100 | s> Hidentity | |
95 | s> \r\n |
|
101 | s> \r\n | |
96 | received frame(size=9; request=1; stream=2; streamflags=stream-begin; type=stream-settings; flags=eos) |
|
102 | received frame(size=9; request=1; stream=2; streamflags=stream-begin; type=stream-settings; flags=eos) | |
97 | s> 13\r\n |
|
103 | s> 13\r\n | |
98 | s> \x0b\x00\x00\x01\x00\x02\x041 |
|
104 | s> \x0b\x00\x00\x01\x00\x02\x041 | |
99 | s> \xa1FstatusBok |
|
105 | s> \xa1FstatusBok | |
100 | s> \r\n |
|
106 | s> \r\n | |
101 | received frame(size=11; request=1; stream=2; streamflags=encoded; type=command-response; flags=continuation) |
|
107 | received frame(size=11; request=1; stream=2; streamflags=encoded; type=command-response; flags=continuation) | |
|
108 | s> 6de\r\n | |||
|
109 | s> \xd6\x06\x00\x01\x00\x02\x041 | |||
|
110 | s> \xa5Hcommands\xacIbranchmap\xa2Dargs\xa0Kpermissions\x81DpullLcapabilities\xa2Dargs\xa0Kpermissions\x81DpullMchangesetdata\xa2Dargs\xa2Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x84IbookmarksGparentsEphaseHrevisionIrevisions\xa2Hrequired\xf5DtypeDlistKpermissions\x81DpullHfiledata\xa2Dargs\xa4Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x83HlinknodeGparentsHrevisionKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolEnodes\xa2Hrequired\xf5DtypeDlistDpath\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullIfilesdata\xa3Dargs\xa4Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x84NfirstchangesetHlinknodeGparentsHrevisionKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolJpathfilter\xa3Gdefault\xf6Hrequired\xf4DtypeDdictIrevisions\xa2Hrequired\xf5DtypeDlistKpermissions\x81DpullTrecommendedbatchsize\x19\xc3PEheads\xa2Dargs\xa1Jpubliconly\xa3Gdefault\xf4Hrequired\xf4DtypeDboolKpermissions\x81DpullEknown\xa2Dargs\xa1Enodes\xa3Gdefault\x80Hrequired\xf4DtypeDlistKpermissions\x81DpullHlistkeys\xa2Dargs\xa1Inamespace\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullFlookup\xa2Dargs\xa1Ckey\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullLmanifestdata\xa3Dargs\xa4Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x82GparentsHrevisionKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolEnodes\xa2Hrequired\xf5DtypeDlistDtree\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullTrecommendedbatchsize\x1a\x00\x01\x86\xa0Gpushkey\xa2Dargs\xa4Ckey\xa2Hrequired\xf5DtypeEbytesInamespace\xa2Hrequired\xf5DtypeEbytesCnew\xa2Hrequired\xf5DtypeEbytesCold\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpushPrawstorefiledata\xa2Dargs\xa2Efiles\xa2Hrequired\xf5DtypeDlistJpathfilter\xa3Gdefault\xf6Hrequired\xf4DtypeDlistKpermissions\x81DpullQframingmediatypes\x81X&application/mercurial-exp-framing-0006Rpathfilterprefixes\xd9\x01\x02\x82Epath:Lrootfilesin:Nrawrepoformats\x83LgeneraldeltaHrevlogv1LsparserevlogHredirect\xa2Fhashes\x82Fsha256Dsha1Gtargets\x81\xa5DnameHtarget-aHprotocolDhttpKsnirequired\xf4Ktlsversions\x82C1.2C1.3Duris\x81Shttp://example.com/ | |||
|
111 | s> \r\n | |||
|
112 | received frame(size=1750; request=1; stream=2; streamflags=encoded; type=command-response; flags=continuation) | |||
|
113 | s> 8\r\n | |||
|
114 | s> \x00\x00\x00\x01\x00\x02\x002 | |||
|
115 | s> \r\n | |||
|
116 | s> 0\r\n | |||
|
117 | s> \r\n | |||
|
118 | received frame(size=0; request=1; stream=2; streamflags=; type=command-response; flags=eos) | |||
|
119 | response: gen[ | |||
|
120 | { | |||
|
121 | b'commands': { | |||
|
122 | b'branchmap': { | |||
|
123 | b'args': {}, | |||
|
124 | b'permissions': [ | |||
|
125 | b'pull' | |||
|
126 | ] | |||
|
127 | }, | |||
|
128 | b'capabilities': { | |||
|
129 | b'args': {}, | |||
|
130 | b'permissions': [ | |||
|
131 | b'pull' | |||
|
132 | ] | |||
|
133 | }, | |||
|
134 | b'changesetdata': { | |||
|
135 | b'args': { | |||
|
136 | b'fields': { | |||
|
137 | b'default': set([]), | |||
|
138 | b'required': False, | |||
|
139 | b'type': b'set', | |||
|
140 | b'validvalues': set([ | |||
|
141 | b'bookmarks', | |||
|
142 | b'parents', | |||
|
143 | b'phase', | |||
|
144 | b'revision' | |||
|
145 | ]) | |||
|
146 | }, | |||
|
147 | b'revisions': { | |||
|
148 | b'required': True, | |||
|
149 | b'type': b'list' | |||
|
150 | } | |||
|
151 | }, | |||
|
152 | b'permissions': [ | |||
|
153 | b'pull' | |||
|
154 | ] | |||
|
155 | }, | |||
|
156 | b'filedata': { | |||
|
157 | b'args': { | |||
|
158 | b'fields': { | |||
|
159 | b'default': set([]), | |||
|
160 | b'required': False, | |||
|
161 | b'type': b'set', | |||
|
162 | b'validvalues': set([ | |||
|
163 | b'linknode', | |||
|
164 | b'parents', | |||
|
165 | b'revision' | |||
|
166 | ]) | |||
|
167 | }, | |||
|
168 | b'haveparents': { | |||
|
169 | b'default': False, | |||
|
170 | b'required': False, | |||
|
171 | b'type': b'bool' | |||
|
172 | }, | |||
|
173 | b'nodes': { | |||
|
174 | b'required': True, | |||
|
175 | b'type': b'list' | |||
|
176 | }, | |||
|
177 | b'path': { | |||
|
178 | b'required': True, | |||
|
179 | b'type': b'bytes' | |||
|
180 | } | |||
|
181 | }, | |||
|
182 | b'permissions': [ | |||
|
183 | b'pull' | |||
|
184 | ] | |||
|
185 | }, | |||
|
186 | b'filesdata': { | |||
|
187 | b'args': { | |||
|
188 | b'fields': { | |||
|
189 | b'default': set([]), | |||
|
190 | b'required': False, | |||
|
191 | b'type': b'set', | |||
|
192 | b'validvalues': set([ | |||
|
193 | b'firstchangeset', | |||
|
194 | b'linknode', | |||
|
195 | b'parents', | |||
|
196 | b'revision' | |||
|
197 | ]) | |||
|
198 | }, | |||
|
199 | b'haveparents': { | |||
|
200 | b'default': False, | |||
|
201 | b'required': False, | |||
|
202 | b'type': b'bool' | |||
|
203 | }, | |||
|
204 | b'pathfilter': { | |||
|
205 | b'default': None, | |||
|
206 | b'required': False, | |||
|
207 | b'type': b'dict' | |||
|
208 | }, | |||
|
209 | b'revisions': { | |||
|
210 | b'required': True, | |||
|
211 | b'type': b'list' | |||
|
212 | } | |||
|
213 | }, | |||
|
214 | b'permissions': [ | |||
|
215 | b'pull' | |||
|
216 | ], | |||
|
217 | b'recommendedbatchsize': 50000 | |||
|
218 | }, | |||
|
219 | b'heads': { | |||
|
220 | b'args': { | |||
|
221 | b'publiconly': { | |||
|
222 | b'default': False, | |||
|
223 | b'required': False, | |||
|
224 | b'type': b'bool' | |||
|
225 | } | |||
|
226 | }, | |||
|
227 | b'permissions': [ | |||
|
228 | b'pull' | |||
|
229 | ] | |||
|
230 | }, | |||
|
231 | b'known': { | |||
|
232 | b'args': { | |||
|
233 | b'nodes': { | |||
|
234 | b'default': [], | |||
|
235 | b'required': False, | |||
|
236 | b'type': b'list' | |||
|
237 | } | |||
|
238 | }, | |||
|
239 | b'permissions': [ | |||
|
240 | b'pull' | |||
|
241 | ] | |||
|
242 | }, | |||
|
243 | b'listkeys': { | |||
|
244 | b'args': { | |||
|
245 | b'namespace': { | |||
|
246 | b'required': True, | |||
|
247 | b'type': b'bytes' | |||
|
248 | } | |||
|
249 | }, | |||
|
250 | b'permissions': [ | |||
|
251 | b'pull' | |||
|
252 | ] | |||
|
253 | }, | |||
|
254 | b'lookup': { | |||
|
255 | b'args': { | |||
|
256 | b'key': { | |||
|
257 | b'required': True, | |||
|
258 | b'type': b'bytes' | |||
|
259 | } | |||
|
260 | }, | |||
|
261 | b'permissions': [ | |||
|
262 | b'pull' | |||
|
263 | ] | |||
|
264 | }, | |||
|
265 | b'manifestdata': { | |||
|
266 | b'args': { | |||
|
267 | b'fields': { | |||
|
268 | b'default': set([]), | |||
|
269 | b'required': False, | |||
|
270 | b'type': b'set', | |||
|
271 | b'validvalues': set([ | |||
|
272 | b'parents', | |||
|
273 | b'revision' | |||
|
274 | ]) | |||
|
275 | }, | |||
|
276 | b'haveparents': { | |||
|
277 | b'default': False, | |||
|
278 | b'required': False, | |||
|
279 | b'type': b'bool' | |||
|
280 | }, | |||
|
281 | b'nodes': { | |||
|
282 | b'required': True, | |||
|
283 | b'type': b'list' | |||
|
284 | }, | |||
|
285 | b'tree': { | |||
|
286 | b'required': True, | |||
|
287 | b'type': b'bytes' | |||
|
288 | } | |||
|
289 | }, | |||
|
290 | b'permissions': [ | |||
|
291 | b'pull' | |||
|
292 | ], | |||
|
293 | b'recommendedbatchsize': 100000 | |||
|
294 | }, | |||
|
295 | b'pushkey': { | |||
|
296 | b'args': { | |||
|
297 | b'key': { | |||
|
298 | b'required': True, | |||
|
299 | b'type': b'bytes' | |||
|
300 | }, | |||
|
301 | b'namespace': { | |||
|
302 | b'required': True, | |||
|
303 | b'type': b'bytes' | |||
|
304 | }, | |||
|
305 | b'new': { | |||
|
306 | b'required': True, | |||
|
307 | b'type': b'bytes' | |||
|
308 | }, | |||
|
309 | b'old': { | |||
|
310 | b'required': True, | |||
|
311 | b'type': b'bytes' | |||
|
312 | } | |||
|
313 | }, | |||
|
314 | b'permissions': [ | |||
|
315 | b'push' | |||
|
316 | ] | |||
|
317 | }, | |||
|
318 | b'rawstorefiledata': { | |||
|
319 | b'args': { | |||
|
320 | b'files': { | |||
|
321 | b'required': True, | |||
|
322 | b'type': b'list' | |||
|
323 | }, | |||
|
324 | b'pathfilter': { | |||
|
325 | b'default': None, | |||
|
326 | b'required': False, | |||
|
327 | b'type': b'list' | |||
|
328 | } | |||
|
329 | }, | |||
|
330 | b'permissions': [ | |||
|
331 | b'pull' | |||
|
332 | ] | |||
|
333 | } | |||
|
334 | }, | |||
|
335 | b'framingmediatypes': [ | |||
|
336 | b'application/mercurial-exp-framing-0006' | |||
|
337 | ], | |||
|
338 | b'pathfilterprefixes': set([ | |||
|
339 | b'path:', | |||
|
340 | b'rootfilesin:' | |||
|
341 | ]), | |||
|
342 | b'rawrepoformats': [ | |||
|
343 | b'generaldelta', | |||
|
344 | b'revlogv1', | |||
|
345 | b'sparserevlog' | |||
|
346 | ], | |||
|
347 | b'redirect': { | |||
|
348 | b'hashes': [ | |||
|
349 | b'sha256', | |||
|
350 | b'sha1' | |||
|
351 | ], | |||
|
352 | b'targets': [ | |||
|
353 | { | |||
|
354 | b'name': b'target-a', | |||
|
355 | b'protocol': b'http', | |||
|
356 | b'snirequired': False, | |||
|
357 | b'tlsversions': [ | |||
|
358 | b'1.2', | |||
|
359 | b'1.3' | |||
|
360 | ], | |||
|
361 | b'uris': [ | |||
|
362 | b'http://example.com/' | |||
|
363 | ] | |||
|
364 | } | |||
|
365 | ] | |||
|
366 | } | |||
|
367 | } | |||
|
368 | ] | |||
|
369 | (sent 2 HTTP requests and * bytes; received * bytes in responses) (glob) | |||
|
370 | ||||
|
371 | Unknown protocol is filtered from compatible targets | |||
|
372 | ||||
|
373 | $ cat > redirects.py << EOF | |||
|
374 | > [ | |||
|
375 | > { | |||
|
376 | > b'name': b'target-a', | |||
|
377 | > b'protocol': b'http', | |||
|
378 | > b'uris': [b'http://example.com/'], | |||
|
379 | > }, | |||
|
380 | > { | |||
|
381 | > b'name': b'target-b', | |||
|
382 | > b'protocol': b'unknown', | |||
|
383 | > b'uris': [b'unknown://example.com/'], | |||
|
384 | > }, | |||
|
385 | > ] | |||
|
386 | > EOF | |||
|
387 | ||||
|
388 | $ sendhttpv2peerhandshake << EOF | |||
|
389 | > command capabilities | |||
|
390 | > EOF | |||
|
391 | creating http peer for wire protocol version 2 | |||
|
392 | s> GET /?cmd=capabilities HTTP/1.1\r\n | |||
|
393 | s> Accept-Encoding: identity\r\n | |||
|
394 | s> vary: X-HgProto-1,X-HgUpgrade-1\r\n | |||
|
395 | s> x-hgproto-1: cbor\r\n | |||
|
396 | s> x-hgupgrade-1: exp-http-v2-0003\r\n | |||
|
397 | s> accept: application/mercurial-0.1\r\n | |||
|
398 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |||
|
399 | s> user-agent: Mercurial debugwireproto\r\n | |||
|
400 | s> \r\n | |||
|
401 | s> makefile('rb', None) | |||
|
402 | s> HTTP/1.1 200 OK\r\n | |||
|
403 | s> Server: testing stub value\r\n | |||
|
404 | s> Date: $HTTP_DATE$\r\n | |||
|
405 | s> Content-Type: application/mercurial-cbor\r\n | |||
|
406 | s> Content-Length: 2312\r\n | |||
|
407 | s> \r\n | |||
|
408 | s> \xa3GapibaseDapi/Dapis\xa1Pexp-http-v2-0003\xa5Hcommands\xacIbranchmap\xa2Dargs\xa0Kpermissions\x81DpullLcapabilities\xa2Dargs\xa0Kpermissions\x81DpullMchangesetdata\xa2Dargs\xa2Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x84IbookmarksGparentsEphaseHrevisionIrevisions\xa2Hrequired\xf5DtypeDlistKpermissions\x81DpullHfiledata\xa2Dargs\xa4Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x83HlinknodeGparentsHrevisionKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolEnodes\xa2Hrequired\xf5DtypeDlistDpath\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullIfilesdata\xa3Dargs\xa4Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x84NfirstchangesetHlinknodeGparentsHrevisionKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolJpathfilter\xa3Gdefault\xf6Hrequired\xf4DtypeDdictIrevisions\xa2Hrequired\xf5DtypeDlistKpermissions\x81DpullTrecommendedbatchsize\x19\xc3PEheads\xa2Dargs\xa1Jpubliconly\xa3Gdefault\xf4Hrequired\xf4DtypeDboolKpermissions\x81DpullEknown\xa2Dargs\xa1Enodes\xa3Gdefault\x80Hrequired\xf4DtypeDlistKpermissions\x81DpullHlistkeys\xa2Dargs\xa1Inamespace\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullFlookup\xa2Dargs\xa1Ckey\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullLmanifestdata\xa3Dargs\xa4Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x82GparentsHrevisionKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolEnodes\xa2Hrequired\xf5DtypeDlistDtree\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullTrecommendedbatchsize\x1a\x00\x01\x86\xa0Gpushkey\xa2Dargs\xa4Ckey\xa2Hrequired\xf5DtypeEbytesInamespace\xa2Hrequired\xf5DtypeEbytesCnew\xa2Hrequired\xf5DtypeEbytesCold\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpushPrawstorefiledata\xa2Dargs\xa2Efiles\xa2Hrequired\xf5DtypeDlistJpathfilter\xa3Gdefault\xf6Hrequired\xf4DtypeDlistKpermissions\x81DpullQframingmediatypes\x81X&application/mercurial-exp-framing-0006Rpathfilterprefixes\xd9\x01\x02\x82Epath:Lrootfilesin:Nrawrepoformats\x83LgeneraldeltaHrevlogv1LsparserevlogHredirect\xa2Fhashes\x82Fsha256Dsha1Gtargets\x82\xa3DnameHtarget-aHprotocolDhttpDuris\x81Shttp://example.com/\xa3DnameHtarget-bHprotocolGunknownDuris\x81Vunknown://example.com/Nv1capabilitiesY\x01\xe0batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset compression=$BUNDLE2_COMPRESSIONS$ getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash | |||
|
409 | (remote redirect target target-a is compatible) | |||
|
410 | (remote redirect target target-b uses unsupported protocol: unknown) | |||
|
411 | sending capabilities command | |||
|
412 | s> POST /api/exp-http-v2-0003/ro/capabilities HTTP/1.1\r\n | |||
|
413 | s> Accept-Encoding: identity\r\n | |||
|
414 | s> accept: application/mercurial-exp-framing-0006\r\n | |||
|
415 | s> content-type: application/mercurial-exp-framing-0006\r\n | |||
|
416 | s> content-length: 111\r\n | |||
|
417 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |||
|
418 | s> user-agent: Mercurial debugwireproto\r\n | |||
|
419 | s> \r\n | |||
|
420 | s> \x1c\x00\x00\x01\x00\x01\x01\x82\xa1Pcontentencodings\x81HidentityC\x00\x00\x01\x00\x01\x00\x11\xa2DnameLcapabilitiesHredirect\xa2Fhashes\x82Fsha256Dsha1Gtargets\x81Htarget-a | |||
|
421 | s> makefile('rb', None) | |||
|
422 | s> HTTP/1.1 200 OK\r\n | |||
|
423 | s> Server: testing stub value\r\n | |||
|
424 | s> Date: $HTTP_DATE$\r\n | |||
|
425 | s> Content-Type: application/mercurial-exp-framing-0006\r\n | |||
|
426 | s> Transfer-Encoding: chunked\r\n | |||
|
427 | s> \r\n | |||
|
428 | s> 11\r\n | |||
|
429 | s> \t\x00\x00\x01\x00\x02\x01\x92 | |||
|
430 | s> Hidentity | |||
|
431 | s> \r\n | |||
|
432 | received frame(size=9; request=1; stream=2; streamflags=stream-begin; type=stream-settings; flags=eos) | |||
|
433 | s> 13\r\n | |||
|
434 | s> \x0b\x00\x00\x01\x00\x02\x041 | |||
|
435 | s> \xa1FstatusBok | |||
|
436 | s> \r\n | |||
|
437 | received frame(size=11; request=1; stream=2; streamflags=encoded; type=command-response; flags=continuation) | |||
|
438 | s> 6f9\r\n | |||
|
439 | s> \xf1\x06\x00\x01\x00\x02\x041 | |||
|
440 | s> \xa5Hcommands\xacIbranchmap\xa2Dargs\xa0Kpermissions\x81DpullLcapabilities\xa2Dargs\xa0Kpermissions\x81DpullMchangesetdata\xa2Dargs\xa2Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x84IbookmarksGparentsEphaseHrevisionIrevisions\xa2Hrequired\xf5DtypeDlistKpermissions\x81DpullHfiledata\xa2Dargs\xa4Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x83HlinknodeGparentsHrevisionKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolEnodes\xa2Hrequired\xf5DtypeDlistDpath\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullIfilesdata\xa3Dargs\xa4Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x84NfirstchangesetHlinknodeGparentsHrevisionKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolJpathfilter\xa3Gdefault\xf6Hrequired\xf4DtypeDdictIrevisions\xa2Hrequired\xf5DtypeDlistKpermissions\x81DpullTrecommendedbatchsize\x19\xc3PEheads\xa2Dargs\xa1Jpubliconly\xa3Gdefault\xf4Hrequired\xf4DtypeDboolKpermissions\x81DpullEknown\xa2Dargs\xa1Enodes\xa3Gdefault\x80Hrequired\xf4DtypeDlistKpermissions\x81DpullHlistkeys\xa2Dargs\xa1Inamespace\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullFlookup\xa2Dargs\xa1Ckey\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullLmanifestdata\xa3Dargs\xa4Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x82GparentsHrevisionKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolEnodes\xa2Hrequired\xf5DtypeDlistDtree\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullTrecommendedbatchsize\x1a\x00\x01\x86\xa0Gpushkey\xa2Dargs\xa4Ckey\xa2Hrequired\xf5DtypeEbytesInamespace\xa2Hrequired\xf5DtypeEbytesCnew\xa2Hrequired\xf5DtypeEbytesCold\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpushPrawstorefiledata\xa2Dargs\xa2Efiles\xa2Hrequired\xf5DtypeDlistJpathfilter\xa3Gdefault\xf6Hrequired\xf4DtypeDlistKpermissions\x81DpullQframingmediatypes\x81X&application/mercurial-exp-framing-0006Rpathfilterprefixes\xd9\x01\x02\x82Epath:Lrootfilesin:Nrawrepoformats\x83LgeneraldeltaHrevlogv1LsparserevlogHredirect\xa2Fhashes\x82Fsha256Dsha1Gtargets\x82\xa3DnameHtarget-aHprotocolDhttpDuris\x81Shttp://example.com/\xa3DnameHtarget-bHprotocolGunknownDuris\x81Vunknown://example.com/ | |||
|
441 | s> \r\n | |||
|
442 | received frame(size=1777; request=1; stream=2; streamflags=encoded; type=command-response; flags=continuation) | |||
|
443 | s> 8\r\n | |||
|
444 | s> \x00\x00\x00\x01\x00\x02\x002 | |||
|
445 | s> \r\n | |||
|
446 | s> 0\r\n | |||
|
447 | s> \r\n | |||
|
448 | received frame(size=0; request=1; stream=2; streamflags=; type=command-response; flags=eos) | |||
|
449 | response: gen[ | |||
|
450 | { | |||
|
451 | b'commands': { | |||
|
452 | b'branchmap': { | |||
|
453 | b'args': {}, | |||
|
454 | b'permissions': [ | |||
|
455 | b'pull' | |||
|
456 | ] | |||
|
457 | }, | |||
|
458 | b'capabilities': { | |||
|
459 | b'args': {}, | |||
|
460 | b'permissions': [ | |||
|
461 | b'pull' | |||
|
462 | ] | |||
|
463 | }, | |||
|
464 | b'changesetdata': { | |||
|
465 | b'args': { | |||
|
466 | b'fields': { | |||
|
467 | b'default': set([]), | |||
|
468 | b'required': False, | |||
|
469 | b'type': b'set', | |||
|
470 | b'validvalues': set([ | |||
|
471 | b'bookmarks', | |||
|
472 | b'parents', | |||
|
473 | b'phase', | |||
|
474 | b'revision' | |||
|
475 | ]) | |||
|
476 | }, | |||
|
477 | b'revisions': { | |||
|
478 | b'required': True, | |||
|
479 | b'type': b'list' | |||
|
480 | } | |||
|
481 | }, | |||
|
482 | b'permissions': [ | |||
|
483 | b'pull' | |||
|
484 | ] | |||
|
485 | }, | |||
|
486 | b'filedata': { | |||
|
487 | b'args': { | |||
|
488 | b'fields': { | |||
|
489 | b'default': set([]), | |||
|
490 | b'required': False, | |||
|
491 | b'type': b'set', | |||
|
492 | b'validvalues': set([ | |||
|
493 | b'linknode', | |||
|
494 | b'parents', | |||
|
495 | b'revision' | |||
|
496 | ]) | |||
|
497 | }, | |||
|
498 | b'haveparents': { | |||
|
499 | b'default': False, | |||
|
500 | b'required': False, | |||
|
501 | b'type': b'bool' | |||
|
502 | }, | |||
|
503 | b'nodes': { | |||
|
504 | b'required': True, | |||
|
505 | b'type': b'list' | |||
|
506 | }, | |||
|
507 | b'path': { | |||
|
508 | b'required': True, | |||
|
509 | b'type': b'bytes' | |||
|
510 | } | |||
|
511 | }, | |||
|
512 | b'permissions': [ | |||
|
513 | b'pull' | |||
|
514 | ] | |||
|
515 | }, | |||
|
516 | b'filesdata': { | |||
|
517 | b'args': { | |||
|
518 | b'fields': { | |||
|
519 | b'default': set([]), | |||
|
520 | b'required': False, | |||
|
521 | b'type': b'set', | |||
|
522 | b'validvalues': set([ | |||
|
523 | b'firstchangeset', | |||
|
524 | b'linknode', | |||
|
525 | b'parents', | |||
|
526 | b'revision' | |||
|
527 | ]) | |||
|
528 | }, | |||
|
529 | b'haveparents': { | |||
|
530 | b'default': False, | |||
|
531 | b'required': False, | |||
|
532 | b'type': b'bool' | |||
|
533 | }, | |||
|
534 | b'pathfilter': { | |||
|
535 | b'default': None, | |||
|
536 | b'required': False, | |||
|
537 | b'type': b'dict' | |||
|
538 | }, | |||
|
539 | b'revisions': { | |||
|
540 | b'required': True, | |||
|
541 | b'type': b'list' | |||
|
542 | } | |||
|
543 | }, | |||
|
544 | b'permissions': [ | |||
|
545 | b'pull' | |||
|
546 | ], | |||
|
547 | b'recommendedbatchsize': 50000 | |||
|
548 | }, | |||
|
549 | b'heads': { | |||
|
550 | b'args': { | |||
|
551 | b'publiconly': { | |||
|
552 | b'default': False, | |||
|
553 | b'required': False, | |||
|
554 | b'type': b'bool' | |||
|
555 | } | |||
|
556 | }, | |||
|
557 | b'permissions': [ | |||
|
558 | b'pull' | |||
|
559 | ] | |||
|
560 | }, | |||
|
561 | b'known': { | |||
|
562 | b'args': { | |||
|
563 | b'nodes': { | |||
|
564 | b'default': [], | |||
|
565 | b'required': False, | |||
|
566 | b'type': b'list' | |||
|
567 | } | |||
|
568 | }, | |||
|
569 | b'permissions': [ | |||
|
570 | b'pull' | |||
|
571 | ] | |||
|
572 | }, | |||
|
573 | b'listkeys': { | |||
|
574 | b'args': { | |||
|
575 | b'namespace': { | |||
|
576 | b'required': True, | |||
|
577 | b'type': b'bytes' | |||
|
578 | } | |||
|
579 | }, | |||
|
580 | b'permissions': [ | |||
|
581 | b'pull' | |||
|
582 | ] | |||
|
583 | }, | |||
|
584 | b'lookup': { | |||
|
585 | b'args': { | |||
|
586 | b'key': { | |||
|
587 | b'required': True, | |||
|
588 | b'type': b'bytes' | |||
|
589 | } | |||
|
590 | }, | |||
|
591 | b'permissions': [ | |||
|
592 | b'pull' | |||
|
593 | ] | |||
|
594 | }, | |||
|
595 | b'manifestdata': { | |||
|
596 | b'args': { | |||
|
597 | b'fields': { | |||
|
598 | b'default': set([]), | |||
|
599 | b'required': False, | |||
|
600 | b'type': b'set', | |||
|
601 | b'validvalues': set([ | |||
|
602 | b'parents', | |||
|
603 | b'revision' | |||
|
604 | ]) | |||
|
605 | }, | |||
|
606 | b'haveparents': { | |||
|
607 | b'default': False, | |||
|
608 | b'required': False, | |||
|
609 | b'type': b'bool' | |||
|
610 | }, | |||
|
611 | b'nodes': { | |||
|
612 | b'required': True, | |||
|
613 | b'type': b'list' | |||
|
614 | }, | |||
|
615 | b'tree': { | |||
|
616 | b'required': True, | |||
|
617 | b'type': b'bytes' | |||
|
618 | } | |||
|
619 | }, | |||
|
620 | b'permissions': [ | |||
|
621 | b'pull' | |||
|
622 | ], | |||
|
623 | b'recommendedbatchsize': 100000 | |||
|
624 | }, | |||
|
625 | b'pushkey': { | |||
|
626 | b'args': { | |||
|
627 | b'key': { | |||
|
628 | b'required': True, | |||
|
629 | b'type': b'bytes' | |||
|
630 | }, | |||
|
631 | b'namespace': { | |||
|
632 | b'required': True, | |||
|
633 | b'type': b'bytes' | |||
|
634 | }, | |||
|
635 | b'new': { | |||
|
636 | b'required': True, | |||
|
637 | b'type': b'bytes' | |||
|
638 | }, | |||
|
639 | b'old': { | |||
|
640 | b'required': True, | |||
|
641 | b'type': b'bytes' | |||
|
642 | } | |||
|
643 | }, | |||
|
644 | b'permissions': [ | |||
|
645 | b'push' | |||
|
646 | ] | |||
|
647 | }, | |||
|
648 | b'rawstorefiledata': { | |||
|
649 | b'args': { | |||
|
650 | b'files': { | |||
|
651 | b'required': True, | |||
|
652 | b'type': b'list' | |||
|
653 | }, | |||
|
654 | b'pathfilter': { | |||
|
655 | b'default': None, | |||
|
656 | b'required': False, | |||
|
657 | b'type': b'list' | |||
|
658 | } | |||
|
659 | }, | |||
|
660 | b'permissions': [ | |||
|
661 | b'pull' | |||
|
662 | ] | |||
|
663 | } | |||
|
664 | }, | |||
|
665 | b'framingmediatypes': [ | |||
|
666 | b'application/mercurial-exp-framing-0006' | |||
|
667 | ], | |||
|
668 | b'pathfilterprefixes': set([ | |||
|
669 | b'path:', | |||
|
670 | b'rootfilesin:' | |||
|
671 | ]), | |||
|
672 | b'rawrepoformats': [ | |||
|
673 | b'generaldelta', | |||
|
674 | b'revlogv1', | |||
|
675 | b'sparserevlog' | |||
|
676 | ], | |||
|
677 | b'redirect': { | |||
|
678 | b'hashes': [ | |||
|
679 | b'sha256', | |||
|
680 | b'sha1' | |||
|
681 | ], | |||
|
682 | b'targets': [ | |||
|
683 | { | |||
|
684 | b'name': b'target-a', | |||
|
685 | b'protocol': b'http', | |||
|
686 | b'uris': [ | |||
|
687 | b'http://example.com/' | |||
|
688 | ] | |||
|
689 | }, | |||
|
690 | { | |||
|
691 | b'name': b'target-b', | |||
|
692 | b'protocol': b'unknown', | |||
|
693 | b'uris': [ | |||
|
694 | b'unknown://example.com/' | |||
|
695 | ] | |||
|
696 | } | |||
|
697 | ] | |||
|
698 | } | |||
|
699 | } | |||
|
700 | ] | |||
|
701 | (sent 2 HTTP requests and * bytes; received * bytes in responses) (glob) | |||
|
702 | ||||
|
703 | Missing SNI support filters targets that require SNI | |||
|
704 | ||||
|
705 | $ cat > nosni.py << EOF | |||
|
706 | > from mercurial import sslutil | |||
|
707 | > sslutil.hassni = False | |||
|
708 | > EOF | |||
|
709 | $ cat >> $HGRCPATH << EOF | |||
|
710 | > [extensions] | |||
|
711 | > nosni=`pwd`/nosni.py | |||
|
712 | > EOF | |||
|
713 | ||||
|
714 | $ cat > redirects.py << EOF | |||
|
715 | > [ | |||
|
716 | > { | |||
|
717 | > b'name': b'target-bad-tls', | |||
|
718 | > b'protocol': b'https', | |||
|
719 | > b'uris': [b'https://example.com/'], | |||
|
720 | > b'snirequired': True, | |||
|
721 | > }, | |||
|
722 | > ] | |||
|
723 | > EOF | |||
|
724 | ||||
|
725 | $ sendhttpv2peerhandshake << EOF | |||
|
726 | > command capabilities | |||
|
727 | > EOF | |||
|
728 | creating http peer for wire protocol version 2 | |||
|
729 | s> GET /?cmd=capabilities HTTP/1.1\r\n | |||
|
730 | s> Accept-Encoding: identity\r\n | |||
|
731 | s> vary: X-HgProto-1,X-HgUpgrade-1\r\n | |||
|
732 | s> x-hgproto-1: cbor\r\n | |||
|
733 | s> x-hgupgrade-1: exp-http-v2-0003\r\n | |||
|
734 | s> accept: application/mercurial-0.1\r\n | |||
|
735 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |||
|
736 | s> user-agent: Mercurial debugwireproto\r\n | |||
|
737 | s> \r\n | |||
|
738 | s> makefile('rb', None) | |||
|
739 | s> HTTP/1.1 200 OK\r\n | |||
|
740 | s> Server: testing stub value\r\n | |||
|
741 | s> Date: $HTTP_DATE$\r\n | |||
|
742 | s> Content-Type: application/mercurial-cbor\r\n | |||
|
743 | s> Content-Length: 2272\r\n | |||
|
744 | s> \r\n | |||
|
745 | s> \xa3GapibaseDapi/Dapis\xa1Pexp-http-v2-0003\xa5Hcommands\xacIbranchmap\xa2Dargs\xa0Kpermissions\x81DpullLcapabilities\xa2Dargs\xa0Kpermissions\x81DpullMchangesetdata\xa2Dargs\xa2Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x84IbookmarksGparentsEphaseHrevisionIrevisions\xa2Hrequired\xf5DtypeDlistKpermissions\x81DpullHfiledata\xa2Dargs\xa4Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x83HlinknodeGparentsHrevisionKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolEnodes\xa2Hrequired\xf5DtypeDlistDpath\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullIfilesdata\xa3Dargs\xa4Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x84NfirstchangesetHlinknodeGparentsHrevisionKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolJpathfilter\xa3Gdefault\xf6Hrequired\xf4DtypeDdictIrevisions\xa2Hrequired\xf5DtypeDlistKpermissions\x81DpullTrecommendedbatchsize\x19\xc3PEheads\xa2Dargs\xa1Jpubliconly\xa3Gdefault\xf4Hrequired\xf4DtypeDboolKpermissions\x81DpullEknown\xa2Dargs\xa1Enodes\xa3Gdefault\x80Hrequired\xf4DtypeDlistKpermissions\x81DpullHlistkeys\xa2Dargs\xa1Inamespace\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullFlookup\xa2Dargs\xa1Ckey\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullLmanifestdata\xa3Dargs\xa4Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x82GparentsHrevisionKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolEnodes\xa2Hrequired\xf5DtypeDlistDtree\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullTrecommendedbatchsize\x1a\x00\x01\x86\xa0Gpushkey\xa2Dargs\xa4Ckey\xa2Hrequired\xf5DtypeEbytesInamespace\xa2Hrequired\xf5DtypeEbytesCnew\xa2Hrequired\xf5DtypeEbytesCold\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpushPrawstorefiledata\xa2Dargs\xa2Efiles\xa2Hrequired\xf5DtypeDlistJpathfilter\xa3Gdefault\xf6Hrequired\xf4DtypeDlistKpermissions\x81DpullQframingmediatypes\x81X&application/mercurial-exp-framing-0006Rpathfilterprefixes\xd9\x01\x02\x82Epath:Lrootfilesin:Nrawrepoformats\x83LgeneraldeltaHrevlogv1LsparserevlogHredirect\xa2Fhashes\x82Fsha256Dsha1Gtargets\x81\xa4DnameNtarget-bad-tlsHprotocolEhttpsKsnirequired\xf5Duris\x81Thttps://example.com/Nv1capabilitiesY\x01\xe0batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset compression=$BUNDLE2_COMPRESSIONS$ getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash | |||
|
746 | (redirect target target-bad-tls requires SNI, which is unsupported) | |||
|
747 | sending capabilities command | |||
|
748 | s> POST /api/exp-http-v2-0003/ro/capabilities HTTP/1.1\r\n | |||
|
749 | s> Accept-Encoding: identity\r\n | |||
|
750 | s> accept: application/mercurial-exp-framing-0006\r\n | |||
|
751 | s> content-type: application/mercurial-exp-framing-0006\r\n | |||
|
752 | s> content-length: 102\r\n | |||
|
753 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |||
|
754 | s> user-agent: Mercurial debugwireproto\r\n | |||
|
755 | s> \r\n | |||
|
756 | s> \x1c\x00\x00\x01\x00\x01\x01\x82\xa1Pcontentencodings\x81Hidentity:\x00\x00\x01\x00\x01\x00\x11\xa2DnameLcapabilitiesHredirect\xa2Fhashes\x82Fsha256Dsha1Gtargets\x80 | |||
|
757 | s> makefile('rb', None) | |||
|
758 | s> HTTP/1.1 200 OK\r\n | |||
|
759 | s> Server: testing stub value\r\n | |||
|
760 | s> Date: $HTTP_DATE$\r\n | |||
|
761 | s> Content-Type: application/mercurial-exp-framing-0006\r\n | |||
|
762 | s> Transfer-Encoding: chunked\r\n | |||
|
763 | s> \r\n | |||
|
764 | s> 11\r\n | |||
|
765 | s> \t\x00\x00\x01\x00\x02\x01\x92 | |||
|
766 | s> Hidentity | |||
|
767 | s> \r\n | |||
|
768 | received frame(size=9; request=1; stream=2; streamflags=stream-begin; type=stream-settings; flags=eos) | |||
|
769 | s> 13\r\n | |||
|
770 | s> \x0b\x00\x00\x01\x00\x02\x041 | |||
|
771 | s> \xa1FstatusBok | |||
|
772 | s> \r\n | |||
|
773 | received frame(size=11; request=1; stream=2; streamflags=encoded; type=command-response; flags=continuation) | |||
102 | s> 6d1\r\n |
|
774 | s> 6d1\r\n | |
103 | s> \xc9\x06\x00\x01\x00\x02\x041 |
|
775 | s> \xc9\x06\x00\x01\x00\x02\x041 | |
104 |
s> \xa5Hcommands\xacIbranchmap\xa2Dargs\xa0Kpermissions\x81DpullLcapabilities\xa2Dargs\xa0Kpermissions\x81DpullMchangesetdata\xa2Dargs\xa2Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x84IbookmarksGparentsEphaseHrevisionIrevisions\xa2Hrequired\xf5DtypeDlistKpermissions\x81DpullHfiledata\xa2Dargs\xa4Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x83HlinknodeGparentsHrevisionKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolEnodes\xa2Hrequired\xf5DtypeDlistDpath\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullIfilesdata\xa3Dargs\xa4Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x84NfirstchangesetHlinknodeGparentsHrevisionKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolJpathfilter\xa3Gdefault\xf6Hrequired\xf4DtypeDdictIrevisions\xa2Hrequired\xf5DtypeDlistKpermissions\x81DpullTrecommendedbatchsize\x19\xc3PEheads\xa2Dargs\xa1Jpubliconly\xa3Gdefault\xf4Hrequired\xf4DtypeDboolKpermissions\x81DpullEknown\xa2Dargs\xa1Enodes\xa3Gdefault\x80Hrequired\xf4DtypeDlistKpermissions\x81DpullHlistkeys\xa2Dargs\xa1Inamespace\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullFlookup\xa2Dargs\xa1Ckey\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullLmanifestdata\xa3Dargs\xa4Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x82GparentsHrevisionKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolEnodes\xa2Hrequired\xf5DtypeDlistDtree\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullTrecommendedbatchsize\x1a\x00\x01\x86\xa0Gpushkey\xa2Dargs\xa4Ckey\xa2Hrequired\xf5DtypeEbytesInamespace\xa2Hrequired\xf5DtypeEbytesCnew\xa2Hrequired\xf5DtypeEbytesCold\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpushPrawstorefiledata\xa2Dargs\xa2Efiles\xa2Hrequired\xf5DtypeDlistJpathfilter\xa3Gdefault\xf6Hrequired\xf4DtypeDlistKpermissions\x81DpullQframingmediatypes\x81X&application/mercurial-exp-framing-0006Rpathfilterprefixes\xd9\x01\x02\x82Epath:Lrootfilesin:Nrawrepoformats\x8 |
|
776 | s> \xa5Hcommands\xacIbranchmap\xa2Dargs\xa0Kpermissions\x81DpullLcapabilities\xa2Dargs\xa0Kpermissions\x81DpullMchangesetdata\xa2Dargs\xa2Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x84IbookmarksGparentsEphaseHrevisionIrevisions\xa2Hrequired\xf5DtypeDlistKpermissions\x81DpullHfiledata\xa2Dargs\xa4Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x83HlinknodeGparentsHrevisionKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolEnodes\xa2Hrequired\xf5DtypeDlistDpath\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullIfilesdata\xa3Dargs\xa4Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x84NfirstchangesetHlinknodeGparentsHrevisionKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolJpathfilter\xa3Gdefault\xf6Hrequired\xf4DtypeDdictIrevisions\xa2Hrequired\xf5DtypeDlistKpermissions\x81DpullTrecommendedbatchsize\x19\xc3PEheads\xa2Dargs\xa1Jpubliconly\xa3Gdefault\xf4Hrequired\xf4DtypeDboolKpermissions\x81DpullEknown\xa2Dargs\xa1Enodes\xa3Gdefault\x80Hrequired\xf4DtypeDlistKpermissions\x81DpullHlistkeys\xa2Dargs\xa1Inamespace\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullFlookup\xa2Dargs\xa1Ckey\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullLmanifestdata\xa3Dargs\xa4Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x82GparentsHrevisionKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolEnodes\xa2Hrequired\xf5DtypeDlistDtree\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullTrecommendedbatchsize\x1a\x00\x01\x86\xa0Gpushkey\xa2Dargs\xa4Ckey\xa2Hrequired\xf5DtypeEbytesInamespace\xa2Hrequired\xf5DtypeEbytesCnew\xa2Hrequired\xf5DtypeEbytesCold\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpushPrawstorefiledata\xa2Dargs\xa2Efiles\xa2Hrequired\xf5DtypeDlistJpathfilter\xa3Gdefault\xf6Hrequired\xf4DtypeDlistKpermissions\x81DpullQframingmediatypes\x81X&application/mercurial-exp-framing-0006Rpathfilterprefixes\xd9\x01\x02\x82Epath:Lrootfilesin:Nrawrepoformats\x83LgeneraldeltaHrevlogv1LsparserevlogHredirect\xa2Fhashes\x82Fsha256Dsha1Gtargets\x81\xa4DnameNtarget-bad-tlsHprotocolEhttpsKsnirequired\xf5Duris\x81Thttps://example.com/ | |
105 | s> \r\n |
|
777 | s> \r\n | |
106 | received frame(size=1737; request=1; stream=2; streamflags=encoded; type=command-response; flags=continuation) |
|
778 | received frame(size=1737; request=1; stream=2; streamflags=encoded; type=command-response; flags=continuation) | |
107 | s> 8\r\n |
|
779 | s> 8\r\n | |
108 | s> \x00\x00\x00\x01\x00\x02\x002 |
|
780 | s> \x00\x00\x00\x01\x00\x02\x002 | |
109 | s> \r\n |
|
781 | s> \r\n | |
110 | s> 0\r\n |
|
782 | s> 0\r\n | |
111 | s> \r\n |
|
783 | s> \r\n | |
112 | received frame(size=0; request=1; stream=2; streamflags=; type=command-response; flags=eos) |
|
784 | received frame(size=0; request=1; stream=2; streamflags=; type=command-response; flags=eos) | |
113 | response: gen[ |
|
785 | response: gen[ | |
114 | { |
|
786 | { | |
115 | b'commands': { |
|
787 | b'commands': { | |
116 | b'branchmap': { |
|
788 | b'branchmap': { | |
117 | b'args': {}, |
|
789 | b'args': {}, | |
118 | b'permissions': [ |
|
790 | b'permissions': [ | |
119 | b'pull' |
|
791 | b'pull' | |
120 | ] |
|
792 | ] | |
121 | }, |
|
793 | }, | |
122 | b'capabilities': { |
|
794 | b'capabilities': { | |
123 | b'args': {}, |
|
795 | b'args': {}, | |
124 | b'permissions': [ |
|
796 | b'permissions': [ | |
125 | b'pull' |
|
797 | b'pull' | |
126 | ] |
|
798 | ] | |
127 | }, |
|
799 | }, | |
128 | b'changesetdata': { |
|
800 | b'changesetdata': { | |
129 | b'args': { |
|
801 | b'args': { | |
130 | b'fields': { |
|
802 | b'fields': { | |
131 | b'default': set([]), |
|
803 | b'default': set([]), | |
132 | b'required': False, |
|
804 | b'required': False, | |
133 | b'type': b'set', |
|
805 | b'type': b'set', | |
134 | b'validvalues': set([ |
|
806 | b'validvalues': set([ | |
135 | b'bookmarks', |
|
807 | b'bookmarks', | |
136 | b'parents', |
|
808 | b'parents', | |
137 | b'phase', |
|
809 | b'phase', | |
138 | b'revision' |
|
810 | b'revision' | |
139 | ]) |
|
811 | ]) | |
140 | }, |
|
812 | }, | |
141 | b'revisions': { |
|
813 | b'revisions': { | |
142 | b'required': True, |
|
814 | b'required': True, | |
143 | b'type': b'list' |
|
815 | b'type': b'list' | |
144 | } |
|
816 | } | |
145 | }, |
|
817 | }, | |
146 | b'permissions': [ |
|
818 | b'permissions': [ | |
147 | b'pull' |
|
819 | b'pull' | |
148 | ] |
|
820 | ] | |
149 | }, |
|
821 | }, | |
150 | b'filedata': { |
|
822 | b'filedata': { | |
151 | b'args': { |
|
823 | b'args': { | |
152 | b'fields': { |
|
824 | b'fields': { | |
153 | b'default': set([]), |
|
825 | b'default': set([]), | |
154 | b'required': False, |
|
826 | b'required': False, | |
155 | b'type': b'set', |
|
827 | b'type': b'set', | |
156 | b'validvalues': set([ |
|
828 | b'validvalues': set([ | |
157 | b'linknode', |
|
829 | b'linknode', | |
158 | b'parents', |
|
830 | b'parents', | |
159 | b'revision' |
|
831 | b'revision' | |
160 | ]) |
|
832 | ]) | |
161 | }, |
|
833 | }, | |
162 | b'haveparents': { |
|
834 | b'haveparents': { | |
163 | b'default': False, |
|
835 | b'default': False, | |
164 | b'required': False, |
|
836 | b'required': False, | |
165 | b'type': b'bool' |
|
837 | b'type': b'bool' | |
166 | }, |
|
838 | }, | |
167 | b'nodes': { |
|
839 | b'nodes': { | |
168 | b'required': True, |
|
840 | b'required': True, | |
169 | b'type': b'list' |
|
841 | b'type': b'list' | |
170 | }, |
|
842 | }, | |
171 | b'path': { |
|
843 | b'path': { | |
172 | b'required': True, |
|
844 | b'required': True, | |
173 | b'type': b'bytes' |
|
845 | b'type': b'bytes' | |
174 | } |
|
846 | } | |
175 | }, |
|
847 | }, | |
176 | b'permissions': [ |
|
848 | b'permissions': [ | |
177 | b'pull' |
|
849 | b'pull' | |
178 | ] |
|
850 | ] | |
179 | }, |
|
851 | }, | |
180 | b'filesdata': { |
|
852 | b'filesdata': { | |
181 | b'args': { |
|
853 | b'args': { | |
182 | b'fields': { |
|
854 | b'fields': { | |
183 | b'default': set([]), |
|
855 | b'default': set([]), | |
184 | b'required': False, |
|
856 | b'required': False, | |
185 | b'type': b'set', |
|
857 | b'type': b'set', | |
186 | b'validvalues': set([ |
|
858 | b'validvalues': set([ | |
187 | b'firstchangeset', |
|
859 | b'firstchangeset', | |
188 | b'linknode', |
|
860 | b'linknode', | |
189 | b'parents', |
|
861 | b'parents', | |
190 | b'revision' |
|
862 | b'revision' | |
191 | ]) |
|
863 | ]) | |
192 | }, |
|
864 | }, | |
193 | b'haveparents': { |
|
865 | b'haveparents': { | |
194 | b'default': False, |
|
866 | b'default': False, | |
195 | b'required': False, |
|
867 | b'required': False, | |
196 | b'type': b'bool' |
|
868 | b'type': b'bool' | |
197 | }, |
|
869 | }, | |
198 | b'pathfilter': { |
|
870 | b'pathfilter': { | |
199 | b'default': None, |
|
871 | b'default': None, | |
200 | b'required': False, |
|
872 | b'required': False, | |
201 | b'type': b'dict' |
|
873 | b'type': b'dict' | |
202 | }, |
|
874 | }, | |
203 | b'revisions': { |
|
875 | b'revisions': { | |
204 | b'required': True, |
|
876 | b'required': True, | |
205 | b'type': b'list' |
|
877 | b'type': b'list' | |
206 | } |
|
878 | } | |
207 | }, |
|
879 | }, | |
208 | b'permissions': [ |
|
880 | b'permissions': [ | |
209 | b'pull' |
|
881 | b'pull' | |
210 | ], |
|
882 | ], | |
211 | b'recommendedbatchsize': 50000 |
|
883 | b'recommendedbatchsize': 50000 | |
212 | }, |
|
884 | }, | |
213 | b'heads': { |
|
885 | b'heads': { | |
214 | b'args': { |
|
886 | b'args': { | |
215 | b'publiconly': { |
|
887 | b'publiconly': { | |
216 | b'default': False, |
|
888 | b'default': False, | |
217 | b'required': False, |
|
889 | b'required': False, | |
218 | b'type': b'bool' |
|
890 | b'type': b'bool' | |
219 | } |
|
891 | } | |
220 | }, |
|
892 | }, | |
221 | b'permissions': [ |
|
893 | b'permissions': [ | |
222 | b'pull' |
|
894 | b'pull' | |
223 | ] |
|
895 | ] | |
224 | }, |
|
896 | }, | |
225 | b'known': { |
|
897 | b'known': { | |
226 | b'args': { |
|
898 | b'args': { | |
227 | b'nodes': { |
|
899 | b'nodes': { | |
228 | b'default': [], |
|
900 | b'default': [], | |
229 | b'required': False, |
|
901 | b'required': False, | |
230 | b'type': b'list' |
|
902 | b'type': b'list' | |
231 | } |
|
903 | } | |
232 | }, |
|
904 | }, | |
233 | b'permissions': [ |
|
905 | b'permissions': [ | |
234 | b'pull' |
|
906 | b'pull' | |
235 | ] |
|
907 | ] | |
236 | }, |
|
908 | }, | |
237 | b'listkeys': { |
|
909 | b'listkeys': { | |
238 | b'args': { |
|
910 | b'args': { | |
239 | b'namespace': { |
|
911 | b'namespace': { | |
240 | b'required': True, |
|
912 | b'required': True, | |
241 | b'type': b'bytes' |
|
913 | b'type': b'bytes' | |
242 | } |
|
914 | } | |
243 | }, |
|
915 | }, | |
244 | b'permissions': [ |
|
916 | b'permissions': [ | |
245 | b'pull' |
|
917 | b'pull' | |
246 | ] |
|
918 | ] | |
247 | }, |
|
919 | }, | |
248 | b'lookup': { |
|
920 | b'lookup': { | |
249 | b'args': { |
|
921 | b'args': { | |
250 | b'key': { |
|
922 | b'key': { | |
251 | b'required': True, |
|
923 | b'required': True, | |
252 | b'type': b'bytes' |
|
924 | b'type': b'bytes' | |
253 | } |
|
925 | } | |
254 | }, |
|
926 | }, | |
255 | b'permissions': [ |
|
927 | b'permissions': [ | |
256 | b'pull' |
|
928 | b'pull' | |
257 | ] |
|
929 | ] | |
258 | }, |
|
930 | }, | |
259 | b'manifestdata': { |
|
931 | b'manifestdata': { | |
260 | b'args': { |
|
932 | b'args': { | |
261 | b'fields': { |
|
933 | b'fields': { | |
262 | b'default': set([]), |
|
934 | b'default': set([]), | |
263 | b'required': False, |
|
935 | b'required': False, | |
264 | b'type': b'set', |
|
936 | b'type': b'set', | |
265 | b'validvalues': set([ |
|
937 | b'validvalues': set([ | |
266 | b'parents', |
|
938 | b'parents', | |
267 | b'revision' |
|
939 | b'revision' | |
268 | ]) |
|
940 | ]) | |
269 | }, |
|
941 | }, | |
270 | b'haveparents': { |
|
942 | b'haveparents': { | |
271 | b'default': False, |
|
943 | b'default': False, | |
272 | b'required': False, |
|
944 | b'required': False, | |
273 | b'type': b'bool' |
|
945 | b'type': b'bool' | |
274 | }, |
|
946 | }, | |
275 | b'nodes': { |
|
947 | b'nodes': { | |
276 | b'required': True, |
|
948 | b'required': True, | |
277 | b'type': b'list' |
|
949 | b'type': b'list' | |
278 | }, |
|
950 | }, | |
279 | b'tree': { |
|
951 | b'tree': { | |
280 | b'required': True, |
|
952 | b'required': True, | |
281 | b'type': b'bytes' |
|
953 | b'type': b'bytes' | |
282 | } |
|
954 | } | |
283 | }, |
|
955 | }, | |
284 | b'permissions': [ |
|
956 | b'permissions': [ | |
285 | b'pull' |
|
957 | b'pull' | |
286 | ], |
|
958 | ], | |
287 | b'recommendedbatchsize': 100000 |
|
959 | b'recommendedbatchsize': 100000 | |
288 | }, |
|
960 | }, | |
289 | b'pushkey': { |
|
961 | b'pushkey': { | |
290 | b'args': { |
|
962 | b'args': { | |
291 | b'key': { |
|
963 | b'key': { | |
292 | b'required': True, |
|
964 | b'required': True, | |
293 | b'type': b'bytes' |
|
965 | b'type': b'bytes' | |
294 | }, |
|
966 | }, | |
295 | b'namespace': { |
|
967 | b'namespace': { | |
296 | b'required': True, |
|
968 | b'required': True, | |
297 | b'type': b'bytes' |
|
969 | b'type': b'bytes' | |
298 | }, |
|
970 | }, | |
299 | b'new': { |
|
971 | b'new': { | |
300 | b'required': True, |
|
972 | b'required': True, | |
301 | b'type': b'bytes' |
|
973 | b'type': b'bytes' | |
302 | }, |
|
974 | }, | |
303 | b'old': { |
|
975 | b'old': { | |
304 | b'required': True, |
|
976 | b'required': True, | |
305 | b'type': b'bytes' |
|
977 | b'type': b'bytes' | |
306 | } |
|
978 | } | |
307 | }, |
|
979 | }, | |
308 | b'permissions': [ |
|
980 | b'permissions': [ | |
309 | b'push' |
|
981 | b'push' | |
310 | ] |
|
982 | ] | |
311 | }, |
|
983 | }, | |
312 | b'rawstorefiledata': { |
|
984 | b'rawstorefiledata': { | |
313 | b'args': { |
|
985 | b'args': { | |
314 | b'files': { |
|
986 | b'files': { | |
315 | b'required': True, |
|
987 | b'required': True, | |
316 | b'type': b'list' |
|
988 | b'type': b'list' | |
317 | }, |
|
989 | }, | |
318 | b'pathfilter': { |
|
990 | b'pathfilter': { | |
319 | b'default': None, |
|
991 | b'default': None, | |
320 | b'required': False, |
|
992 | b'required': False, | |
321 | b'type': b'list' |
|
993 | b'type': b'list' | |
322 | } |
|
994 | } | |
323 | }, |
|
995 | }, | |
324 | b'permissions': [ |
|
996 | b'permissions': [ | |
325 | b'pull' |
|
997 | b'pull' | |
326 | ] |
|
998 | ] | |
327 | } |
|
999 | } | |
328 | }, |
|
1000 | }, | |
329 | b'framingmediatypes': [ |
|
1001 | b'framingmediatypes': [ | |
330 | b'application/mercurial-exp-framing-0006' |
|
1002 | b'application/mercurial-exp-framing-0006' | |
331 | ], |
|
1003 | ], | |
332 | b'pathfilterprefixes': set([ |
|
1004 | b'pathfilterprefixes': set([ | |
333 | b'path:', |
|
1005 | b'path:', | |
334 | b'rootfilesin:' |
|
1006 | b'rootfilesin:' | |
335 | ]), |
|
1007 | ]), | |
336 | b'rawrepoformats': [ |
|
1008 | b'rawrepoformats': [ | |
337 | b'generaldelta', |
|
1009 | b'generaldelta', | |
338 | b'revlogv1' |
|
1010 | b'revlogv1', | |
|
1011 | b'sparserevlog' | |||
339 | ], |
|
1012 | ], | |
340 | b'redirect': { |
|
1013 | b'redirect': { | |
341 | b'hashes': [ |
|
1014 | b'hashes': [ | |
342 | b'sha256', |
|
1015 | b'sha256', | |
343 | b'sha1' |
|
1016 | b'sha1' | |
344 | ], |
|
1017 | ], | |
345 | b'targets': [ |
|
1018 | b'targets': [ | |
346 | { |
|
1019 | { | |
347 | b'name': b'target-a', |
|
1020 | b'name': b'target-bad-tls', | |
348 | b'protocol': b'http', |
|
1021 | b'protocol': b'https', | |
349 |
b'snirequired': |
|
1022 | b'snirequired': True, | |
350 | b'tlsversions': [ |
|
|||
351 | b'1.2', |
|
|||
352 | b'1.3' |
|
|||
353 | ], |
|
|||
354 | b'uris': [ |
|
1023 | b'uris': [ | |
355 | b'http://example.com/' |
|
1024 | b'https://example.com/' | |
356 | ] |
|
1025 | ] | |
357 | } |
|
1026 | } | |
358 | ] |
|
1027 | ] | |
359 | } |
|
1028 | } | |
360 | } |
|
1029 | } | |
361 | ] |
|
1030 | ] | |
362 | (sent 2 HTTP requests and * bytes; received * bytes in responses) (glob) |
|
1031 | (sent 2 HTTP requests and * bytes; received * bytes in responses) (glob) | |
363 |
|
1032 | |||
364 | Unknown protocol is filtered from compatible targets |
|
1033 | $ cat >> $HGRCPATH << EOF | |
|
1034 | > [extensions] | |||
|
1035 | > nosni=! | |||
|
1036 | > EOF | |||
|
1037 | ||||
|
1038 | Unknown tls value is filtered from compatible targets | |||
365 |
|
1039 | |||
366 | $ cat > redirects.py << EOF |
|
1040 | $ cat > redirects.py << EOF | |
367 | > [ |
|
1041 | > [ | |
368 | > { |
|
1042 | > { | |
369 | > b'name': b'target-a', |
|
1043 | > b'name': b'target-bad-tls', | |
370 | > b'protocol': b'http', |
|
1044 | > b'protocol': b'https', | |
371 | > b'uris': [b'http://example.com/'], |
|
1045 | > b'uris': [b'https://example.com/'], | |
372 | > }, |
|
1046 | > b'tlsversions': [b'42', b'39'], | |
373 | > { |
|
|||
374 | > b'name': b'target-b', |
|
|||
375 | > b'protocol': b'unknown', |
|
|||
376 | > b'uris': [b'unknown://example.com/'], |
|
|||
377 | > }, |
|
1047 | > }, | |
378 | > ] |
|
1048 | > ] | |
379 | > EOF |
|
1049 | > EOF | |
380 |
|
1050 | |||
381 | $ sendhttpv2peerhandshake << EOF |
|
1051 | $ sendhttpv2peerhandshake << EOF | |
382 | > command capabilities |
|
1052 | > command capabilities | |
383 | > EOF |
|
1053 | > EOF | |
384 | creating http peer for wire protocol version 2 |
|
1054 | creating http peer for wire protocol version 2 | |
385 | s> GET /?cmd=capabilities HTTP/1.1\r\n |
|
1055 | s> GET /?cmd=capabilities HTTP/1.1\r\n | |
386 | s> Accept-Encoding: identity\r\n |
|
1056 | s> Accept-Encoding: identity\r\n | |
387 | s> vary: X-HgProto-1,X-HgUpgrade-1\r\n |
|
1057 | s> vary: X-HgProto-1,X-HgUpgrade-1\r\n | |
388 | s> x-hgproto-1: cbor\r\n |
|
1058 | s> x-hgproto-1: cbor\r\n | |
389 | s> x-hgupgrade-1: exp-http-v2-0003\r\n |
|
1059 | s> x-hgupgrade-1: exp-http-v2-0003\r\n | |
390 | s> accept: application/mercurial-0.1\r\n |
|
1060 | s> accept: application/mercurial-0.1\r\n | |
391 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
1061 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
392 | s> user-agent: Mercurial debugwireproto\r\n |
|
1062 | s> user-agent: Mercurial debugwireproto\r\n | |
393 | s> \r\n |
|
1063 | s> \r\n | |
394 | s> makefile('rb', None) |
|
1064 | s> makefile('rb', None) | |
395 | s> HTTP/1.1 200 OK\r\n |
|
1065 | s> HTTP/1.1 200 OK\r\n | |
396 | s> Server: testing stub value\r\n |
|
1066 | s> Server: testing stub value\r\n | |
397 | s> Date: $HTTP_DATE$\r\n |
|
1067 | s> Date: $HTTP_DATE$\r\n | |
398 | s> Content-Type: application/mercurial-cbor\r\n |
|
1068 | s> Content-Type: application/mercurial-cbor\r\n | |
399 |
s> Content-Length: 228 |
|
1069 | s> Content-Length: 2278\r\n | |
400 | s> \r\n |
|
1070 | s> \r\n | |
401 |
s> \xa3GapibaseDapi/Dapis\xa1Pexp-http-v2-0003\xa5Hcommands\xacIbranchmap\xa2Dargs\xa0Kpermissions\x81DpullLcapabilities\xa2Dargs\xa0Kpermissions\x81DpullMchangesetdata\xa2Dargs\xa2Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x84IbookmarksGparentsEphaseHrevisionIrevisions\xa2Hrequired\xf5DtypeDlistKpermissions\x81DpullHfiledata\xa2Dargs\xa4Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x83HlinknodeGparentsHrevisionKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolEnodes\xa2Hrequired\xf5DtypeDlistDpath\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullIfilesdata\xa3Dargs\xa4Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x84NfirstchangesetHlinknodeGparentsHrevisionKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolJpathfilter\xa3Gdefault\xf6Hrequired\xf4DtypeDdictIrevisions\xa2Hrequired\xf5DtypeDlistKpermissions\x81DpullTrecommendedbatchsize\x19\xc3PEheads\xa2Dargs\xa1Jpubliconly\xa3Gdefault\xf4Hrequired\xf4DtypeDboolKpermissions\x81DpullEknown\xa2Dargs\xa1Enodes\xa3Gdefault\x80Hrequired\xf4DtypeDlistKpermissions\x81DpullHlistkeys\xa2Dargs\xa1Inamespace\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullFlookup\xa2Dargs\xa1Ckey\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullLmanifestdata\xa3Dargs\xa4Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x82GparentsHrevisionKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolEnodes\xa2Hrequired\xf5DtypeDlistDtree\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullTrecommendedbatchsize\x1a\x00\x01\x86\xa0Gpushkey\xa2Dargs\xa4Ckey\xa2Hrequired\xf5DtypeEbytesInamespace\xa2Hrequired\xf5DtypeEbytesCnew\xa2Hrequired\xf5DtypeEbytesCold\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpushPrawstorefiledata\xa2Dargs\xa2Efiles\xa2Hrequired\xf5DtypeDlistJpathfilter\xa3Gdefault\xf6Hrequired\xf4DtypeDlistKpermissions\x81DpullQframingmediatypes\x81X&application/mercurial-exp-framing-0006Rpathfilterprefixes\xd9\x01\x02\x82Epath:Lrootfilesin:Nrawrepoformats\x8 |
|
1071 | s> \xa3GapibaseDapi/Dapis\xa1Pexp-http-v2-0003\xa5Hcommands\xacIbranchmap\xa2Dargs\xa0Kpermissions\x81DpullLcapabilities\xa2Dargs\xa0Kpermissions\x81DpullMchangesetdata\xa2Dargs\xa2Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x84IbookmarksGparentsEphaseHrevisionIrevisions\xa2Hrequired\xf5DtypeDlistKpermissions\x81DpullHfiledata\xa2Dargs\xa4Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x83HlinknodeGparentsHrevisionKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolEnodes\xa2Hrequired\xf5DtypeDlistDpath\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullIfilesdata\xa3Dargs\xa4Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x84NfirstchangesetHlinknodeGparentsHrevisionKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolJpathfilter\xa3Gdefault\xf6Hrequired\xf4DtypeDdictIrevisions\xa2Hrequired\xf5DtypeDlistKpermissions\x81DpullTrecommendedbatchsize\x19\xc3PEheads\xa2Dargs\xa1Jpubliconly\xa3Gdefault\xf4Hrequired\xf4DtypeDboolKpermissions\x81DpullEknown\xa2Dargs\xa1Enodes\xa3Gdefault\x80Hrequired\xf4DtypeDlistKpermissions\x81DpullHlistkeys\xa2Dargs\xa1Inamespace\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullFlookup\xa2Dargs\xa1Ckey\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullLmanifestdata\xa3Dargs\xa4Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x82GparentsHrevisionKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolEnodes\xa2Hrequired\xf5DtypeDlistDtree\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullTrecommendedbatchsize\x1a\x00\x01\x86\xa0Gpushkey\xa2Dargs\xa4Ckey\xa2Hrequired\xf5DtypeEbytesInamespace\xa2Hrequired\xf5DtypeEbytesCnew\xa2Hrequired\xf5DtypeEbytesCold\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpushPrawstorefiledata\xa2Dargs\xa2Efiles\xa2Hrequired\xf5DtypeDlistJpathfilter\xa3Gdefault\xf6Hrequired\xf4DtypeDlistKpermissions\x81DpullQframingmediatypes\x81X&application/mercurial-exp-framing-0006Rpathfilterprefixes\xd9\x01\x02\x82Epath:Lrootfilesin:Nrawrepoformats\x83LgeneraldeltaHrevlogv1LsparserevlogHredirect\xa2Fhashes\x82Fsha256Dsha1Gtargets\x81\xa4DnameNtarget-bad-tlsHprotocolEhttpsKtlsversions\x82B42B39Duris\x81Thttps://example.com/Nv1capabilitiesY\x01\xe0batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset compression=$BUNDLE2_COMPRESSIONS$ getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash | |
402 |
(remote redirect target target-a is |
|
1072 | (remote redirect target target-bad-tls requires unsupported TLS versions: 39, 42) | |
403 | (remote redirect target target-b uses unsupported protocol: unknown) |
|
|||
404 | sending capabilities command |
|
1073 | sending capabilities command | |
405 | s> POST /api/exp-http-v2-0003/ro/capabilities HTTP/1.1\r\n |
|
1074 | s> POST /api/exp-http-v2-0003/ro/capabilities HTTP/1.1\r\n | |
406 | s> Accept-Encoding: identity\r\n |
|
1075 | s> Accept-Encoding: identity\r\n | |
407 | s> accept: application/mercurial-exp-framing-0006\r\n |
|
1076 | s> accept: application/mercurial-exp-framing-0006\r\n | |
408 | s> content-type: application/mercurial-exp-framing-0006\r\n |
|
1077 | s> content-type: application/mercurial-exp-framing-0006\r\n | |
409 |
s> content-length: 1 |
|
1078 | s> content-length: 102\r\n | |
410 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
1079 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
411 | s> user-agent: Mercurial debugwireproto\r\n |
|
1080 | s> user-agent: Mercurial debugwireproto\r\n | |
412 | s> \r\n |
|
1081 | s> \r\n | |
413 |
s> \x1c\x00\x00\x01\x00\x01\x01\x82\xa1Pcontentencodings\x81Hidentity |
|
1082 | s> \x1c\x00\x00\x01\x00\x01\x01\x82\xa1Pcontentencodings\x81Hidentity:\x00\x00\x01\x00\x01\x00\x11\xa2DnameLcapabilitiesHredirect\xa2Fhashes\x82Fsha256Dsha1Gtargets\x80 | |
414 | s> makefile('rb', None) |
|
1083 | s> makefile('rb', None) | |
415 | s> HTTP/1.1 200 OK\r\n |
|
1084 | s> HTTP/1.1 200 OK\r\n | |
416 | s> Server: testing stub value\r\n |
|
1085 | s> Server: testing stub value\r\n | |
417 | s> Date: $HTTP_DATE$\r\n |
|
1086 | s> Date: $HTTP_DATE$\r\n | |
418 | s> Content-Type: application/mercurial-exp-framing-0006\r\n |
|
1087 | s> Content-Type: application/mercurial-exp-framing-0006\r\n | |
419 | s> Transfer-Encoding: chunked\r\n |
|
1088 | s> Transfer-Encoding: chunked\r\n | |
420 | s> \r\n |
|
1089 | s> \r\n | |
421 | s> 11\r\n |
|
1090 | s> 11\r\n | |
422 | s> \t\x00\x00\x01\x00\x02\x01\x92 |
|
1091 | s> \t\x00\x00\x01\x00\x02\x01\x92 | |
423 | s> Hidentity |
|
1092 | s> Hidentity | |
424 | s> \r\n |
|
1093 | s> \r\n | |
425 | received frame(size=9; request=1; stream=2; streamflags=stream-begin; type=stream-settings; flags=eos) |
|
1094 | received frame(size=9; request=1; stream=2; streamflags=stream-begin; type=stream-settings; flags=eos) | |
426 | s> 13\r\n |
|
1095 | s> 13\r\n | |
427 | s> \x0b\x00\x00\x01\x00\x02\x041 |
|
1096 | s> \x0b\x00\x00\x01\x00\x02\x041 | |
428 | s> \xa1FstatusBok |
|
1097 | s> \xa1FstatusBok | |
429 | s> \r\n |
|
1098 | s> \r\n | |
430 | received frame(size=11; request=1; stream=2; streamflags=encoded; type=command-response; flags=continuation) |
|
1099 | received frame(size=11; request=1; stream=2; streamflags=encoded; type=command-response; flags=continuation) | |
431 |
s> 6 |
|
1100 | s> 6d7\r\n | |
432 |
s> \x |
|
1101 | s> \xcf\x06\x00\x01\x00\x02\x041 | |
433 |
s> \xa5Hcommands\xacIbranchmap\xa2Dargs\xa0Kpermissions\x81DpullLcapabilities\xa2Dargs\xa0Kpermissions\x81DpullMchangesetdata\xa2Dargs\xa2Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x84IbookmarksGparentsEphaseHrevisionIrevisions\xa2Hrequired\xf5DtypeDlistKpermissions\x81DpullHfiledata\xa2Dargs\xa4Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x83HlinknodeGparentsHrevisionKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolEnodes\xa2Hrequired\xf5DtypeDlistDpath\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullIfilesdata\xa3Dargs\xa4Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x84NfirstchangesetHlinknodeGparentsHrevisionKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolJpathfilter\xa3Gdefault\xf6Hrequired\xf4DtypeDdictIrevisions\xa2Hrequired\xf5DtypeDlistKpermissions\x81DpullTrecommendedbatchsize\x19\xc3PEheads\xa2Dargs\xa1Jpubliconly\xa3Gdefault\xf4Hrequired\xf4DtypeDboolKpermissions\x81DpullEknown\xa2Dargs\xa1Enodes\xa3Gdefault\x80Hrequired\xf4DtypeDlistKpermissions\x81DpullHlistkeys\xa2Dargs\xa1Inamespace\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullFlookup\xa2Dargs\xa1Ckey\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullLmanifestdata\xa3Dargs\xa4Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x82GparentsHrevisionKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolEnodes\xa2Hrequired\xf5DtypeDlistDtree\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullTrecommendedbatchsize\x1a\x00\x01\x86\xa0Gpushkey\xa2Dargs\xa4Ckey\xa2Hrequired\xf5DtypeEbytesInamespace\xa2Hrequired\xf5DtypeEbytesCnew\xa2Hrequired\xf5DtypeEbytesCold\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpushPrawstorefiledata\xa2Dargs\xa2Efiles\xa2Hrequired\xf5DtypeDlistJpathfilter\xa3Gdefault\xf6Hrequired\xf4DtypeDlistKpermissions\x81DpullQframingmediatypes\x81X&application/mercurial-exp-framing-0006Rpathfilterprefixes\xd9\x01\x02\x82Epath:Lrootfilesin:Nrawrepoformats\x8 |
|
1102 | s> \xa5Hcommands\xacIbranchmap\xa2Dargs\xa0Kpermissions\x81DpullLcapabilities\xa2Dargs\xa0Kpermissions\x81DpullMchangesetdata\xa2Dargs\xa2Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x84IbookmarksGparentsEphaseHrevisionIrevisions\xa2Hrequired\xf5DtypeDlistKpermissions\x81DpullHfiledata\xa2Dargs\xa4Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x83HlinknodeGparentsHrevisionKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolEnodes\xa2Hrequired\xf5DtypeDlistDpath\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullIfilesdata\xa3Dargs\xa4Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x84NfirstchangesetHlinknodeGparentsHrevisionKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolJpathfilter\xa3Gdefault\xf6Hrequired\xf4DtypeDdictIrevisions\xa2Hrequired\xf5DtypeDlistKpermissions\x81DpullTrecommendedbatchsize\x19\xc3PEheads\xa2Dargs\xa1Jpubliconly\xa3Gdefault\xf4Hrequired\xf4DtypeDboolKpermissions\x81DpullEknown\xa2Dargs\xa1Enodes\xa3Gdefault\x80Hrequired\xf4DtypeDlistKpermissions\x81DpullHlistkeys\xa2Dargs\xa1Inamespace\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullFlookup\xa2Dargs\xa1Ckey\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullLmanifestdata\xa3Dargs\xa4Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x82GparentsHrevisionKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolEnodes\xa2Hrequired\xf5DtypeDlistDtree\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullTrecommendedbatchsize\x1a\x00\x01\x86\xa0Gpushkey\xa2Dargs\xa4Ckey\xa2Hrequired\xf5DtypeEbytesInamespace\xa2Hrequired\xf5DtypeEbytesCnew\xa2Hrequired\xf5DtypeEbytesCold\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpushPrawstorefiledata\xa2Dargs\xa2Efiles\xa2Hrequired\xf5DtypeDlistJpathfilter\xa3Gdefault\xf6Hrequired\xf4DtypeDlistKpermissions\x81DpullQframingmediatypes\x81X&application/mercurial-exp-framing-0006Rpathfilterprefixes\xd9\x01\x02\x82Epath:Lrootfilesin:Nrawrepoformats\x83LgeneraldeltaHrevlogv1LsparserevlogHredirect\xa2Fhashes\x82Fsha256Dsha1Gtargets\x81\xa4DnameNtarget-bad-tlsHprotocolEhttpsKtlsversions\x82B42B39Duris\x81Thttps://example.com/ | |
434 | s> \r\n |
|
1103 | s> \r\n | |
435 |
received frame(size=17 |
|
1104 | received frame(size=1743; request=1; stream=2; streamflags=encoded; type=command-response; flags=continuation) | |
436 | s> 8\r\n |
|
1105 | s> 8\r\n | |
437 | s> \x00\x00\x00\x01\x00\x02\x002 |
|
1106 | s> \x00\x00\x00\x01\x00\x02\x002 | |
438 | s> \r\n |
|
1107 | s> \r\n | |
439 | s> 0\r\n |
|
1108 | s> 0\r\n | |
440 | s> \r\n |
|
1109 | s> \r\n | |
441 | received frame(size=0; request=1; stream=2; streamflags=; type=command-response; flags=eos) |
|
1110 | received frame(size=0; request=1; stream=2; streamflags=; type=command-response; flags=eos) | |
442 | response: gen[ |
|
1111 | response: gen[ | |
443 | { |
|
1112 | { | |
444 | b'commands': { |
|
1113 | b'commands': { | |
445 | b'branchmap': { |
|
1114 | b'branchmap': { | |
446 | b'args': {}, |
|
1115 | b'args': {}, | |
447 | b'permissions': [ |
|
1116 | b'permissions': [ | |
448 | b'pull' |
|
1117 | b'pull' | |
449 | ] |
|
1118 | ] | |
450 | }, |
|
1119 | }, | |
451 | b'capabilities': { |
|
1120 | b'capabilities': { | |
452 | b'args': {}, |
|
1121 | b'args': {}, | |
453 | b'permissions': [ |
|
1122 | b'permissions': [ | |
454 | b'pull' |
|
1123 | b'pull' | |
455 | ] |
|
1124 | ] | |
456 | }, |
|
1125 | }, | |
457 | b'changesetdata': { |
|
1126 | b'changesetdata': { | |
458 | b'args': { |
|
1127 | b'args': { | |
459 | b'fields': { |
|
1128 | b'fields': { | |
460 | b'default': set([]), |
|
1129 | b'default': set([]), | |
461 | b'required': False, |
|
1130 | b'required': False, | |
462 | b'type': b'set', |
|
1131 | b'type': b'set', | |
463 | b'validvalues': set([ |
|
1132 | b'validvalues': set([ | |
464 | b'bookmarks', |
|
1133 | b'bookmarks', | |
465 | b'parents', |
|
1134 | b'parents', | |
466 | b'phase', |
|
1135 | b'phase', | |
467 | b'revision' |
|
1136 | b'revision' | |
468 | ]) |
|
1137 | ]) | |
469 | }, |
|
1138 | }, | |
470 | b'revisions': { |
|
1139 | b'revisions': { | |
471 | b'required': True, |
|
1140 | b'required': True, | |
472 | b'type': b'list' |
|
1141 | b'type': b'list' | |
473 | } |
|
1142 | } | |
474 | }, |
|
1143 | }, | |
475 | b'permissions': [ |
|
1144 | b'permissions': [ | |
476 | b'pull' |
|
1145 | b'pull' | |
477 | ] |
|
1146 | ] | |
478 | }, |
|
1147 | }, | |
479 | b'filedata': { |
|
1148 | b'filedata': { | |
480 | b'args': { |
|
1149 | b'args': { | |
481 | b'fields': { |
|
1150 | b'fields': { | |
482 | b'default': set([]), |
|
1151 | b'default': set([]), | |
483 | b'required': False, |
|
1152 | b'required': False, | |
484 | b'type': b'set', |
|
1153 | b'type': b'set', | |
485 | b'validvalues': set([ |
|
1154 | b'validvalues': set([ | |
486 | b'linknode', |
|
1155 | b'linknode', | |
487 | b'parents', |
|
1156 | b'parents', | |
488 | b'revision' |
|
1157 | b'revision' | |
489 | ]) |
|
1158 | ]) | |
490 | }, |
|
1159 | }, | |
491 | b'haveparents': { |
|
1160 | b'haveparents': { | |
492 | b'default': False, |
|
1161 | b'default': False, | |
493 | b'required': False, |
|
1162 | b'required': False, | |
494 | b'type': b'bool' |
|
1163 | b'type': b'bool' | |
495 | }, |
|
1164 | }, | |
496 | b'nodes': { |
|
1165 | b'nodes': { | |
497 | b'required': True, |
|
1166 | b'required': True, | |
498 | b'type': b'list' |
|
1167 | b'type': b'list' | |
499 | }, |
|
1168 | }, | |
500 | b'path': { |
|
1169 | b'path': { | |
501 | b'required': True, |
|
1170 | b'required': True, | |
502 | b'type': b'bytes' |
|
1171 | b'type': b'bytes' | |
503 | } |
|
1172 | } | |
504 | }, |
|
1173 | }, | |
505 | b'permissions': [ |
|
1174 | b'permissions': [ | |
506 | b'pull' |
|
1175 | b'pull' | |
507 | ] |
|
1176 | ] | |
508 | }, |
|
1177 | }, | |
509 | b'filesdata': { |
|
1178 | b'filesdata': { | |
510 | b'args': { |
|
1179 | b'args': { | |
511 | b'fields': { |
|
1180 | b'fields': { | |
512 | b'default': set([]), |
|
1181 | b'default': set([]), | |
513 | b'required': False, |
|
1182 | b'required': False, | |
514 | b'type': b'set', |
|
1183 | b'type': b'set', | |
515 | b'validvalues': set([ |
|
1184 | b'validvalues': set([ | |
516 | b'firstchangeset', |
|
1185 | b'firstchangeset', | |
517 | b'linknode', |
|
1186 | b'linknode', | |
518 | b'parents', |
|
1187 | b'parents', | |
519 | b'revision' |
|
1188 | b'revision' | |
520 | ]) |
|
1189 | ]) | |
521 | }, |
|
1190 | }, | |
522 | b'haveparents': { |
|
1191 | b'haveparents': { | |
523 | b'default': False, |
|
1192 | b'default': False, | |
524 | b'required': False, |
|
1193 | b'required': False, | |
525 | b'type': b'bool' |
|
1194 | b'type': b'bool' | |
526 | }, |
|
1195 | }, | |
527 | b'pathfilter': { |
|
1196 | b'pathfilter': { | |
528 | b'default': None, |
|
1197 | b'default': None, | |
529 | b'required': False, |
|
1198 | b'required': False, | |
530 | b'type': b'dict' |
|
1199 | b'type': b'dict' | |
531 | }, |
|
1200 | }, | |
532 | b'revisions': { |
|
1201 | b'revisions': { | |
533 | b'required': True, |
|
1202 | b'required': True, | |
534 | b'type': b'list' |
|
1203 | b'type': b'list' | |
535 | } |
|
1204 | } | |
536 | }, |
|
1205 | }, | |
537 | b'permissions': [ |
|
1206 | b'permissions': [ | |
538 | b'pull' |
|
1207 | b'pull' | |
539 | ], |
|
1208 | ], | |
540 | b'recommendedbatchsize': 50000 |
|
1209 | b'recommendedbatchsize': 50000 | |
541 | }, |
|
1210 | }, | |
542 | b'heads': { |
|
1211 | b'heads': { | |
543 | b'args': { |
|
1212 | b'args': { | |
544 | b'publiconly': { |
|
1213 | b'publiconly': { | |
545 | b'default': False, |
|
1214 | b'default': False, | |
546 | b'required': False, |
|
1215 | b'required': False, | |
547 | b'type': b'bool' |
|
1216 | b'type': b'bool' | |
548 | } |
|
1217 | } | |
549 | }, |
|
1218 | }, | |
550 | b'permissions': [ |
|
1219 | b'permissions': [ | |
551 | b'pull' |
|
1220 | b'pull' | |
552 | ] |
|
1221 | ] | |
553 | }, |
|
1222 | }, | |
554 | b'known': { |
|
1223 | b'known': { | |
555 | b'args': { |
|
1224 | b'args': { | |
556 | b'nodes': { |
|
1225 | b'nodes': { | |
557 | b'default': [], |
|
1226 | b'default': [], | |
558 | b'required': False, |
|
1227 | b'required': False, | |
559 | b'type': b'list' |
|
1228 | b'type': b'list' | |
560 | } |
|
1229 | } | |
561 | }, |
|
1230 | }, | |
562 | b'permissions': [ |
|
1231 | b'permissions': [ | |
563 | b'pull' |
|
1232 | b'pull' | |
564 | ] |
|
1233 | ] | |
565 | }, |
|
1234 | }, | |
566 | b'listkeys': { |
|
1235 | b'listkeys': { | |
567 | b'args': { |
|
1236 | b'args': { | |
568 | b'namespace': { |
|
1237 | b'namespace': { | |
569 | b'required': True, |
|
1238 | b'required': True, | |
570 | b'type': b'bytes' |
|
1239 | b'type': b'bytes' | |
571 | } |
|
1240 | } | |
572 | }, |
|
1241 | }, | |
573 | b'permissions': [ |
|
1242 | b'permissions': [ | |
574 | b'pull' |
|
1243 | b'pull' | |
575 | ] |
|
1244 | ] | |
576 | }, |
|
1245 | }, | |
577 | b'lookup': { |
|
1246 | b'lookup': { | |
578 | b'args': { |
|
1247 | b'args': { | |
579 | b'key': { |
|
1248 | b'key': { | |
580 | b'required': True, |
|
1249 | b'required': True, | |
581 | b'type': b'bytes' |
|
1250 | b'type': b'bytes' | |
582 | } |
|
1251 | } | |
583 | }, |
|
1252 | }, | |
584 | b'permissions': [ |
|
1253 | b'permissions': [ | |
585 | b'pull' |
|
1254 | b'pull' | |
586 | ] |
|
1255 | ] | |
587 | }, |
|
1256 | }, | |
588 | b'manifestdata': { |
|
1257 | b'manifestdata': { | |
589 | b'args': { |
|
1258 | b'args': { | |
590 | b'fields': { |
|
1259 | b'fields': { | |
591 | b'default': set([]), |
|
1260 | b'default': set([]), | |
592 | b'required': False, |
|
1261 | b'required': False, | |
593 | b'type': b'set', |
|
1262 | b'type': b'set', | |
594 | b'validvalues': set([ |
|
1263 | b'validvalues': set([ | |
595 | b'parents', |
|
1264 | b'parents', | |
596 | b'revision' |
|
1265 | b'revision' | |
597 | ]) |
|
1266 | ]) | |
598 | }, |
|
1267 | }, | |
599 | b'haveparents': { |
|
1268 | b'haveparents': { | |
600 | b'default': False, |
|
1269 | b'default': False, | |
601 | b'required': False, |
|
1270 | b'required': False, | |
602 | b'type': b'bool' |
|
1271 | b'type': b'bool' | |
603 | }, |
|
1272 | }, | |
604 | b'nodes': { |
|
1273 | b'nodes': { | |
605 | b'required': True, |
|
1274 | b'required': True, | |
606 | b'type': b'list' |
|
1275 | b'type': b'list' | |
607 | }, |
|
1276 | }, | |
608 | b'tree': { |
|
1277 | b'tree': { | |
609 | b'required': True, |
|
1278 | b'required': True, | |
610 | b'type': b'bytes' |
|
1279 | b'type': b'bytes' | |
611 | } |
|
1280 | } | |
612 | }, |
|
1281 | }, | |
613 | b'permissions': [ |
|
1282 | b'permissions': [ | |
614 | b'pull' |
|
1283 | b'pull' | |
615 | ], |
|
1284 | ], | |
616 | b'recommendedbatchsize': 100000 |
|
1285 | b'recommendedbatchsize': 100000 | |
617 | }, |
|
1286 | }, | |
618 | b'pushkey': { |
|
1287 | b'pushkey': { | |
619 | b'args': { |
|
1288 | b'args': { | |
620 | b'key': { |
|
1289 | b'key': { | |
621 | b'required': True, |
|
1290 | b'required': True, | |
622 | b'type': b'bytes' |
|
1291 | b'type': b'bytes' | |
623 | }, |
|
1292 | }, | |
624 | b'namespace': { |
|
1293 | b'namespace': { | |
625 | b'required': True, |
|
1294 | b'required': True, | |
626 | b'type': b'bytes' |
|
1295 | b'type': b'bytes' | |
627 | }, |
|
1296 | }, | |
628 | b'new': { |
|
1297 | b'new': { | |
629 | b'required': True, |
|
1298 | b'required': True, | |
630 | b'type': b'bytes' |
|
1299 | b'type': b'bytes' | |
631 | }, |
|
1300 | }, | |
632 | b'old': { |
|
1301 | b'old': { | |
633 | b'required': True, |
|
1302 | b'required': True, | |
634 | b'type': b'bytes' |
|
1303 | b'type': b'bytes' | |
635 | } |
|
1304 | } | |
636 | }, |
|
1305 | }, | |
637 | b'permissions': [ |
|
1306 | b'permissions': [ | |
638 | b'push' |
|
1307 | b'push' | |
639 | ] |
|
1308 | ] | |
640 | }, |
|
1309 | }, | |
641 | b'rawstorefiledata': { |
|
1310 | b'rawstorefiledata': { | |
642 | b'args': { |
|
1311 | b'args': { | |
643 | b'files': { |
|
1312 | b'files': { | |
644 | b'required': True, |
|
1313 | b'required': True, | |
645 | b'type': b'list' |
|
1314 | b'type': b'list' | |
646 | }, |
|
1315 | }, | |
647 | b'pathfilter': { |
|
1316 | b'pathfilter': { | |
648 | b'default': None, |
|
1317 | b'default': None, | |
649 | b'required': False, |
|
1318 | b'required': False, | |
650 | b'type': b'list' |
|
1319 | b'type': b'list' | |
651 | } |
|
1320 | } | |
652 | }, |
|
1321 | }, | |
653 | b'permissions': [ |
|
1322 | b'permissions': [ | |
654 | b'pull' |
|
1323 | b'pull' | |
655 | ] |
|
1324 | ] | |
656 | } |
|
1325 | } | |
657 | }, |
|
1326 | }, | |
658 | b'framingmediatypes': [ |
|
1327 | b'framingmediatypes': [ | |
659 | b'application/mercurial-exp-framing-0006' |
|
1328 | b'application/mercurial-exp-framing-0006' | |
660 | ], |
|
1329 | ], | |
661 | b'pathfilterprefixes': set([ |
|
1330 | b'pathfilterprefixes': set([ | |
662 | b'path:', |
|
1331 | b'path:', | |
663 | b'rootfilesin:' |
|
1332 | b'rootfilesin:' | |
664 | ]), |
|
1333 | ]), | |
665 | b'rawrepoformats': [ |
|
1334 | b'rawrepoformats': [ | |
666 | b'generaldelta', |
|
1335 | b'generaldelta', | |
667 | b'revlogv1' |
|
1336 | b'revlogv1', | |
668 | ], |
|
1337 | b'sparserevlog' | |
669 | b'redirect': { |
|
|||
670 | b'hashes': [ |
|
|||
671 | b'sha256', |
|
|||
672 | b'sha1' |
|
|||
673 | ], |
|
|||
674 | b'targets': [ |
|
|||
675 | { |
|
|||
676 | b'name': b'target-a', |
|
|||
677 | b'protocol': b'http', |
|
|||
678 | b'uris': [ |
|
|||
679 | b'http://example.com/' |
|
|||
680 | ] |
|
|||
681 | }, |
|
|||
682 | { |
|
|||
683 | b'name': b'target-b', |
|
|||
684 | b'protocol': b'unknown', |
|
|||
685 | b'uris': [ |
|
|||
686 | b'unknown://example.com/' |
|
|||
687 | ] |
|
|||
688 | } |
|
|||
689 | ] |
|
|||
690 | } |
|
|||
691 | } |
|
|||
692 | ] |
|
|||
693 | (sent 2 HTTP requests and * bytes; received * bytes in responses) (glob) |
|
|||
694 |
|
||||
695 | Missing SNI support filters targets that require SNI |
|
|||
696 |
|
||||
697 | $ cat > nosni.py << EOF |
|
|||
698 | > from mercurial import sslutil |
|
|||
699 | > sslutil.hassni = False |
|
|||
700 | > EOF |
|
|||
701 | $ cat >> $HGRCPATH << EOF |
|
|||
702 | > [extensions] |
|
|||
703 | > nosni=`pwd`/nosni.py |
|
|||
704 | > EOF |
|
|||
705 |
|
||||
706 | $ cat > redirects.py << EOF |
|
|||
707 | > [ |
|
|||
708 | > { |
|
|||
709 | > b'name': b'target-bad-tls', |
|
|||
710 | > b'protocol': b'https', |
|
|||
711 | > b'uris': [b'https://example.com/'], |
|
|||
712 | > b'snirequired': True, |
|
|||
713 | > }, |
|
|||
714 | > ] |
|
|||
715 | > EOF |
|
|||
716 |
|
||||
717 | $ sendhttpv2peerhandshake << EOF |
|
|||
718 | > command capabilities |
|
|||
719 | > EOF |
|
|||
720 | creating http peer for wire protocol version 2 |
|
|||
721 | s> GET /?cmd=capabilities HTTP/1.1\r\n |
|
|||
722 | s> Accept-Encoding: identity\r\n |
|
|||
723 | s> vary: X-HgProto-1,X-HgUpgrade-1\r\n |
|
|||
724 | s> x-hgproto-1: cbor\r\n |
|
|||
725 | s> x-hgupgrade-1: exp-http-v2-0003\r\n |
|
|||
726 | s> accept: application/mercurial-0.1\r\n |
|
|||
727 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
|||
728 | s> user-agent: Mercurial debugwireproto\r\n |
|
|||
729 | s> \r\n |
|
|||
730 | s> makefile('rb', None) |
|
|||
731 | s> HTTP/1.1 200 OK\r\n |
|
|||
732 | s> Server: testing stub value\r\n |
|
|||
733 | s> Date: $HTTP_DATE$\r\n |
|
|||
734 | s> Content-Type: application/mercurial-cbor\r\n |
|
|||
735 | s> Content-Length: 2246\r\n |
|
|||
736 | s> \r\n |
|
|||
737 | s> \xa3GapibaseDapi/Dapis\xa1Pexp-http-v2-0003\xa5Hcommands\xacIbranchmap\xa2Dargs\xa0Kpermissions\x81DpullLcapabilities\xa2Dargs\xa0Kpermissions\x81DpullMchangesetdata\xa2Dargs\xa2Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x84IbookmarksGparentsEphaseHrevisionIrevisions\xa2Hrequired\xf5DtypeDlistKpermissions\x81DpullHfiledata\xa2Dargs\xa4Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x83HlinknodeGparentsHrevisionKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolEnodes\xa2Hrequired\xf5DtypeDlistDpath\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullIfilesdata\xa3Dargs\xa4Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x84NfirstchangesetHlinknodeGparentsHrevisionKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolJpathfilter\xa3Gdefault\xf6Hrequired\xf4DtypeDdictIrevisions\xa2Hrequired\xf5DtypeDlistKpermissions\x81DpullTrecommendedbatchsize\x19\xc3PEheads\xa2Dargs\xa1Jpubliconly\xa3Gdefault\xf4Hrequired\xf4DtypeDboolKpermissions\x81DpullEknown\xa2Dargs\xa1Enodes\xa3Gdefault\x80Hrequired\xf4DtypeDlistKpermissions\x81DpullHlistkeys\xa2Dargs\xa1Inamespace\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullFlookup\xa2Dargs\xa1Ckey\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullLmanifestdata\xa3Dargs\xa4Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x82GparentsHrevisionKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolEnodes\xa2Hrequired\xf5DtypeDlistDtree\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullTrecommendedbatchsize\x1a\x00\x01\x86\xa0Gpushkey\xa2Dargs\xa4Ckey\xa2Hrequired\xf5DtypeEbytesInamespace\xa2Hrequired\xf5DtypeEbytesCnew\xa2Hrequired\xf5DtypeEbytesCold\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpushPrawstorefiledata\xa2Dargs\xa2Efiles\xa2Hrequired\xf5DtypeDlistJpathfilter\xa3Gdefault\xf6Hrequired\xf4DtypeDlistKpermissions\x81DpullQframingmediatypes\x81X&application/mercurial-exp-framing-0006Rpathfilterprefixes\xd9\x01\x02\x82Epath:Lrootfilesin:Nrawrepoformats\x82LgeneraldeltaHrevlogv1Hredirect\xa2Fhashes\x82Fsha256Dsha1Gtargets\x81\xa4DnameNtarget-bad-tlsHprotocolEhttpsKsnirequired\xf5Duris\x81Thttps://example.com/Nv1capabilitiesY\x01\xd3batch branchmap $USUAL_BUNDLE2_CAPS$ 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 |
|
|||
738 | (redirect target target-bad-tls requires SNI, which is unsupported) |
|
|||
739 | sending capabilities command |
|
|||
740 | s> POST /api/exp-http-v2-0003/ro/capabilities HTTP/1.1\r\n |
|
|||
741 | s> Accept-Encoding: identity\r\n |
|
|||
742 | s> accept: application/mercurial-exp-framing-0006\r\n |
|
|||
743 | s> content-type: application/mercurial-exp-framing-0006\r\n |
|
|||
744 | s> content-length: 102\r\n |
|
|||
745 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
|||
746 | s> user-agent: Mercurial debugwireproto\r\n |
|
|||
747 | s> \r\n |
|
|||
748 | s> \x1c\x00\x00\x01\x00\x01\x01\x82\xa1Pcontentencodings\x81Hidentity:\x00\x00\x01\x00\x01\x00\x11\xa2DnameLcapabilitiesHredirect\xa2Fhashes\x82Fsha256Dsha1Gtargets\x80 |
|
|||
749 | s> makefile('rb', None) |
|
|||
750 | s> HTTP/1.1 200 OK\r\n |
|
|||
751 | s> Server: testing stub value\r\n |
|
|||
752 | s> Date: $HTTP_DATE$\r\n |
|
|||
753 | s> Content-Type: application/mercurial-exp-framing-0006\r\n |
|
|||
754 | s> Transfer-Encoding: chunked\r\n |
|
|||
755 | s> \r\n |
|
|||
756 | s> 11\r\n |
|
|||
757 | s> \t\x00\x00\x01\x00\x02\x01\x92 |
|
|||
758 | s> Hidentity |
|
|||
759 | s> \r\n |
|
|||
760 | received frame(size=9; request=1; stream=2; streamflags=stream-begin; type=stream-settings; flags=eos) |
|
|||
761 | s> 13\r\n |
|
|||
762 | s> \x0b\x00\x00\x01\x00\x02\x041 |
|
|||
763 | s> \xa1FstatusBok |
|
|||
764 | s> \r\n |
|
|||
765 | received frame(size=11; request=1; stream=2; streamflags=encoded; type=command-response; flags=continuation) |
|
|||
766 | s> 6c4\r\n |
|
|||
767 | s> \xbc\x06\x00\x01\x00\x02\x041 |
|
|||
768 | s> \xa5Hcommands\xacIbranchmap\xa2Dargs\xa0Kpermissions\x81DpullLcapabilities\xa2Dargs\xa0Kpermissions\x81DpullMchangesetdata\xa2Dargs\xa2Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x84IbookmarksGparentsEphaseHrevisionIrevisions\xa2Hrequired\xf5DtypeDlistKpermissions\x81DpullHfiledata\xa2Dargs\xa4Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x83HlinknodeGparentsHrevisionKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolEnodes\xa2Hrequired\xf5DtypeDlistDpath\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullIfilesdata\xa3Dargs\xa4Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x84NfirstchangesetHlinknodeGparentsHrevisionKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolJpathfilter\xa3Gdefault\xf6Hrequired\xf4DtypeDdictIrevisions\xa2Hrequired\xf5DtypeDlistKpermissions\x81DpullTrecommendedbatchsize\x19\xc3PEheads\xa2Dargs\xa1Jpubliconly\xa3Gdefault\xf4Hrequired\xf4DtypeDboolKpermissions\x81DpullEknown\xa2Dargs\xa1Enodes\xa3Gdefault\x80Hrequired\xf4DtypeDlistKpermissions\x81DpullHlistkeys\xa2Dargs\xa1Inamespace\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullFlookup\xa2Dargs\xa1Ckey\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullLmanifestdata\xa3Dargs\xa4Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x82GparentsHrevisionKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolEnodes\xa2Hrequired\xf5DtypeDlistDtree\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullTrecommendedbatchsize\x1a\x00\x01\x86\xa0Gpushkey\xa2Dargs\xa4Ckey\xa2Hrequired\xf5DtypeEbytesInamespace\xa2Hrequired\xf5DtypeEbytesCnew\xa2Hrequired\xf5DtypeEbytesCold\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpushPrawstorefiledata\xa2Dargs\xa2Efiles\xa2Hrequired\xf5DtypeDlistJpathfilter\xa3Gdefault\xf6Hrequired\xf4DtypeDlistKpermissions\x81DpullQframingmediatypes\x81X&application/mercurial-exp-framing-0006Rpathfilterprefixes\xd9\x01\x02\x82Epath:Lrootfilesin:Nrawrepoformats\x82LgeneraldeltaHrevlogv1Hredirect\xa2Fhashes\x82Fsha256Dsha1Gtargets\x81\xa4DnameNtarget-bad-tlsHprotocolEhttpsKsnirequired\xf5Duris\x81Thttps://example.com/ |
|
|||
769 | s> \r\n |
|
|||
770 | received frame(size=1724; request=1; stream=2; streamflags=encoded; type=command-response; flags=continuation) |
|
|||
771 | s> 8\r\n |
|
|||
772 | s> \x00\x00\x00\x01\x00\x02\x002 |
|
|||
773 | s> \r\n |
|
|||
774 | s> 0\r\n |
|
|||
775 | s> \r\n |
|
|||
776 | received frame(size=0; request=1; stream=2; streamflags=; type=command-response; flags=eos) |
|
|||
777 | response: gen[ |
|
|||
778 | { |
|
|||
779 | b'commands': { |
|
|||
780 | b'branchmap': { |
|
|||
781 | b'args': {}, |
|
|||
782 | b'permissions': [ |
|
|||
783 | b'pull' |
|
|||
784 | ] |
|
|||
785 | }, |
|
|||
786 | b'capabilities': { |
|
|||
787 | b'args': {}, |
|
|||
788 | b'permissions': [ |
|
|||
789 | b'pull' |
|
|||
790 | ] |
|
|||
791 | }, |
|
|||
792 | b'changesetdata': { |
|
|||
793 | b'args': { |
|
|||
794 | b'fields': { |
|
|||
795 | b'default': set([]), |
|
|||
796 | b'required': False, |
|
|||
797 | b'type': b'set', |
|
|||
798 | b'validvalues': set([ |
|
|||
799 | b'bookmarks', |
|
|||
800 | b'parents', |
|
|||
801 | b'phase', |
|
|||
802 | b'revision' |
|
|||
803 | ]) |
|
|||
804 | }, |
|
|||
805 | b'revisions': { |
|
|||
806 | b'required': True, |
|
|||
807 | b'type': b'list' |
|
|||
808 | } |
|
|||
809 | }, |
|
|||
810 | b'permissions': [ |
|
|||
811 | b'pull' |
|
|||
812 | ] |
|
|||
813 | }, |
|
|||
814 | b'filedata': { |
|
|||
815 | b'args': { |
|
|||
816 | b'fields': { |
|
|||
817 | b'default': set([]), |
|
|||
818 | b'required': False, |
|
|||
819 | b'type': b'set', |
|
|||
820 | b'validvalues': set([ |
|
|||
821 | b'linknode', |
|
|||
822 | b'parents', |
|
|||
823 | b'revision' |
|
|||
824 | ]) |
|
|||
825 | }, |
|
|||
826 | b'haveparents': { |
|
|||
827 | b'default': False, |
|
|||
828 | b'required': False, |
|
|||
829 | b'type': b'bool' |
|
|||
830 | }, |
|
|||
831 | b'nodes': { |
|
|||
832 | b'required': True, |
|
|||
833 | b'type': b'list' |
|
|||
834 | }, |
|
|||
835 | b'path': { |
|
|||
836 | b'required': True, |
|
|||
837 | b'type': b'bytes' |
|
|||
838 | } |
|
|||
839 | }, |
|
|||
840 | b'permissions': [ |
|
|||
841 | b'pull' |
|
|||
842 | ] |
|
|||
843 | }, |
|
|||
844 | b'filesdata': { |
|
|||
845 | b'args': { |
|
|||
846 | b'fields': { |
|
|||
847 | b'default': set([]), |
|
|||
848 | b'required': False, |
|
|||
849 | b'type': b'set', |
|
|||
850 | b'validvalues': set([ |
|
|||
851 | b'firstchangeset', |
|
|||
852 | b'linknode', |
|
|||
853 | b'parents', |
|
|||
854 | b'revision' |
|
|||
855 | ]) |
|
|||
856 | }, |
|
|||
857 | b'haveparents': { |
|
|||
858 | b'default': False, |
|
|||
859 | b'required': False, |
|
|||
860 | b'type': b'bool' |
|
|||
861 | }, |
|
|||
862 | b'pathfilter': { |
|
|||
863 | b'default': None, |
|
|||
864 | b'required': False, |
|
|||
865 | b'type': b'dict' |
|
|||
866 | }, |
|
|||
867 | b'revisions': { |
|
|||
868 | b'required': True, |
|
|||
869 | b'type': b'list' |
|
|||
870 | } |
|
|||
871 | }, |
|
|||
872 | b'permissions': [ |
|
|||
873 | b'pull' |
|
|||
874 | ], |
|
|||
875 | b'recommendedbatchsize': 50000 |
|
|||
876 | }, |
|
|||
877 | b'heads': { |
|
|||
878 | b'args': { |
|
|||
879 | b'publiconly': { |
|
|||
880 | b'default': False, |
|
|||
881 | b'required': False, |
|
|||
882 | b'type': b'bool' |
|
|||
883 | } |
|
|||
884 | }, |
|
|||
885 | b'permissions': [ |
|
|||
886 | b'pull' |
|
|||
887 | ] |
|
|||
888 | }, |
|
|||
889 | b'known': { |
|
|||
890 | b'args': { |
|
|||
891 | b'nodes': { |
|
|||
892 | b'default': [], |
|
|||
893 | b'required': False, |
|
|||
894 | b'type': b'list' |
|
|||
895 | } |
|
|||
896 | }, |
|
|||
897 | b'permissions': [ |
|
|||
898 | b'pull' |
|
|||
899 | ] |
|
|||
900 | }, |
|
|||
901 | b'listkeys': { |
|
|||
902 | b'args': { |
|
|||
903 | b'namespace': { |
|
|||
904 | b'required': True, |
|
|||
905 | b'type': b'bytes' |
|
|||
906 | } |
|
|||
907 | }, |
|
|||
908 | b'permissions': [ |
|
|||
909 | b'pull' |
|
|||
910 | ] |
|
|||
911 | }, |
|
|||
912 | b'lookup': { |
|
|||
913 | b'args': { |
|
|||
914 | b'key': { |
|
|||
915 | b'required': True, |
|
|||
916 | b'type': b'bytes' |
|
|||
917 | } |
|
|||
918 | }, |
|
|||
919 | b'permissions': [ |
|
|||
920 | b'pull' |
|
|||
921 | ] |
|
|||
922 | }, |
|
|||
923 | b'manifestdata': { |
|
|||
924 | b'args': { |
|
|||
925 | b'fields': { |
|
|||
926 | b'default': set([]), |
|
|||
927 | b'required': False, |
|
|||
928 | b'type': b'set', |
|
|||
929 | b'validvalues': set([ |
|
|||
930 | b'parents', |
|
|||
931 | b'revision' |
|
|||
932 | ]) |
|
|||
933 | }, |
|
|||
934 | b'haveparents': { |
|
|||
935 | b'default': False, |
|
|||
936 | b'required': False, |
|
|||
937 | b'type': b'bool' |
|
|||
938 | }, |
|
|||
939 | b'nodes': { |
|
|||
940 | b'required': True, |
|
|||
941 | b'type': b'list' |
|
|||
942 | }, |
|
|||
943 | b'tree': { |
|
|||
944 | b'required': True, |
|
|||
945 | b'type': b'bytes' |
|
|||
946 | } |
|
|||
947 | }, |
|
|||
948 | b'permissions': [ |
|
|||
949 | b'pull' |
|
|||
950 | ], |
|
|||
951 | b'recommendedbatchsize': 100000 |
|
|||
952 | }, |
|
|||
953 | b'pushkey': { |
|
|||
954 | b'args': { |
|
|||
955 | b'key': { |
|
|||
956 | b'required': True, |
|
|||
957 | b'type': b'bytes' |
|
|||
958 | }, |
|
|||
959 | b'namespace': { |
|
|||
960 | b'required': True, |
|
|||
961 | b'type': b'bytes' |
|
|||
962 | }, |
|
|||
963 | b'new': { |
|
|||
964 | b'required': True, |
|
|||
965 | b'type': b'bytes' |
|
|||
966 | }, |
|
|||
967 | b'old': { |
|
|||
968 | b'required': True, |
|
|||
969 | b'type': b'bytes' |
|
|||
970 | } |
|
|||
971 | }, |
|
|||
972 | b'permissions': [ |
|
|||
973 | b'push' |
|
|||
974 | ] |
|
|||
975 | }, |
|
|||
976 | b'rawstorefiledata': { |
|
|||
977 | b'args': { |
|
|||
978 | b'files': { |
|
|||
979 | b'required': True, |
|
|||
980 | b'type': b'list' |
|
|||
981 | }, |
|
|||
982 | b'pathfilter': { |
|
|||
983 | b'default': None, |
|
|||
984 | b'required': False, |
|
|||
985 | b'type': b'list' |
|
|||
986 | } |
|
|||
987 | }, |
|
|||
988 | b'permissions': [ |
|
|||
989 | b'pull' |
|
|||
990 | ] |
|
|||
991 | } |
|
|||
992 | }, |
|
|||
993 | b'framingmediatypes': [ |
|
|||
994 | b'application/mercurial-exp-framing-0006' |
|
|||
995 | ], |
|
|||
996 | b'pathfilterprefixes': set([ |
|
|||
997 | b'path:', |
|
|||
998 | b'rootfilesin:' |
|
|||
999 | ]), |
|
|||
1000 | b'rawrepoformats': [ |
|
|||
1001 | b'generaldelta', |
|
|||
1002 | b'revlogv1' |
|
|||
1003 | ], |
|
|||
1004 | b'redirect': { |
|
|||
1005 | b'hashes': [ |
|
|||
1006 | b'sha256', |
|
|||
1007 | b'sha1' |
|
|||
1008 | ], |
|
|||
1009 | b'targets': [ |
|
|||
1010 | { |
|
|||
1011 | b'name': b'target-bad-tls', |
|
|||
1012 | b'protocol': b'https', |
|
|||
1013 | b'snirequired': True, |
|
|||
1014 | b'uris': [ |
|
|||
1015 | b'https://example.com/' |
|
|||
1016 | ] |
|
|||
1017 | } |
|
|||
1018 | ] |
|
|||
1019 | } |
|
|||
1020 | } |
|
|||
1021 | ] |
|
|||
1022 | (sent 2 HTTP requests and * bytes; received * bytes in responses) (glob) |
|
|||
1023 |
|
||||
1024 | $ cat >> $HGRCPATH << EOF |
|
|||
1025 | > [extensions] |
|
|||
1026 | > nosni=! |
|
|||
1027 | > EOF |
|
|||
1028 |
|
||||
1029 | Unknown tls value is filtered from compatible targets |
|
|||
1030 |
|
||||
1031 | $ cat > redirects.py << EOF |
|
|||
1032 | > [ |
|
|||
1033 | > { |
|
|||
1034 | > b'name': b'target-bad-tls', |
|
|||
1035 | > b'protocol': b'https', |
|
|||
1036 | > b'uris': [b'https://example.com/'], |
|
|||
1037 | > b'tlsversions': [b'42', b'39'], |
|
|||
1038 | > }, |
|
|||
1039 | > ] |
|
|||
1040 | > EOF |
|
|||
1041 |
|
||||
1042 | $ sendhttpv2peerhandshake << EOF |
|
|||
1043 | > command capabilities |
|
|||
1044 | > EOF |
|
|||
1045 | creating http peer for wire protocol version 2 |
|
|||
1046 | s> GET /?cmd=capabilities HTTP/1.1\r\n |
|
|||
1047 | s> Accept-Encoding: identity\r\n |
|
|||
1048 | s> vary: X-HgProto-1,X-HgUpgrade-1\r\n |
|
|||
1049 | s> x-hgproto-1: cbor\r\n |
|
|||
1050 | s> x-hgupgrade-1: exp-http-v2-0003\r\n |
|
|||
1051 | s> accept: application/mercurial-0.1\r\n |
|
|||
1052 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
|||
1053 | s> user-agent: Mercurial debugwireproto\r\n |
|
|||
1054 | s> \r\n |
|
|||
1055 | s> makefile('rb', None) |
|
|||
1056 | s> HTTP/1.1 200 OK\r\n |
|
|||
1057 | s> Server: testing stub value\r\n |
|
|||
1058 | s> Date: $HTTP_DATE$\r\n |
|
|||
1059 | s> Content-Type: application/mercurial-cbor\r\n |
|
|||
1060 | s> Content-Length: 2252\r\n |
|
|||
1061 | s> \r\n |
|
|||
1062 | s> \xa3GapibaseDapi/Dapis\xa1Pexp-http-v2-0003\xa5Hcommands\xacIbranchmap\xa2Dargs\xa0Kpermissions\x81DpullLcapabilities\xa2Dargs\xa0Kpermissions\x81DpullMchangesetdata\xa2Dargs\xa2Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x84IbookmarksGparentsEphaseHrevisionIrevisions\xa2Hrequired\xf5DtypeDlistKpermissions\x81DpullHfiledata\xa2Dargs\xa4Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x83HlinknodeGparentsHrevisionKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolEnodes\xa2Hrequired\xf5DtypeDlistDpath\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullIfilesdata\xa3Dargs\xa4Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x84NfirstchangesetHlinknodeGparentsHrevisionKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolJpathfilter\xa3Gdefault\xf6Hrequired\xf4DtypeDdictIrevisions\xa2Hrequired\xf5DtypeDlistKpermissions\x81DpullTrecommendedbatchsize\x19\xc3PEheads\xa2Dargs\xa1Jpubliconly\xa3Gdefault\xf4Hrequired\xf4DtypeDboolKpermissions\x81DpullEknown\xa2Dargs\xa1Enodes\xa3Gdefault\x80Hrequired\xf4DtypeDlistKpermissions\x81DpullHlistkeys\xa2Dargs\xa1Inamespace\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullFlookup\xa2Dargs\xa1Ckey\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullLmanifestdata\xa3Dargs\xa4Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x82GparentsHrevisionKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolEnodes\xa2Hrequired\xf5DtypeDlistDtree\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullTrecommendedbatchsize\x1a\x00\x01\x86\xa0Gpushkey\xa2Dargs\xa4Ckey\xa2Hrequired\xf5DtypeEbytesInamespace\xa2Hrequired\xf5DtypeEbytesCnew\xa2Hrequired\xf5DtypeEbytesCold\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpushPrawstorefiledata\xa2Dargs\xa2Efiles\xa2Hrequired\xf5DtypeDlistJpathfilter\xa3Gdefault\xf6Hrequired\xf4DtypeDlistKpermissions\x81DpullQframingmediatypes\x81X&application/mercurial-exp-framing-0006Rpathfilterprefixes\xd9\x01\x02\x82Epath:Lrootfilesin:Nrawrepoformats\x82LgeneraldeltaHrevlogv1Hredirect\xa2Fhashes\x82Fsha256Dsha1Gtargets\x81\xa4DnameNtarget-bad-tlsHprotocolEhttpsKtlsversions\x82B42B39Duris\x81Thttps://example.com/Nv1capabilitiesY\x01\xd3batch branchmap $USUAL_BUNDLE2_CAPS$ 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 |
|
|||
1063 | (remote redirect target target-bad-tls requires unsupported TLS versions: 39, 42) |
|
|||
1064 | sending capabilities command |
|
|||
1065 | s> POST /api/exp-http-v2-0003/ro/capabilities HTTP/1.1\r\n |
|
|||
1066 | s> Accept-Encoding: identity\r\n |
|
|||
1067 | s> accept: application/mercurial-exp-framing-0006\r\n |
|
|||
1068 | s> content-type: application/mercurial-exp-framing-0006\r\n |
|
|||
1069 | s> content-length: 102\r\n |
|
|||
1070 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
|||
1071 | s> user-agent: Mercurial debugwireproto\r\n |
|
|||
1072 | s> \r\n |
|
|||
1073 | s> \x1c\x00\x00\x01\x00\x01\x01\x82\xa1Pcontentencodings\x81Hidentity:\x00\x00\x01\x00\x01\x00\x11\xa2DnameLcapabilitiesHredirect\xa2Fhashes\x82Fsha256Dsha1Gtargets\x80 |
|
|||
1074 | s> makefile('rb', None) |
|
|||
1075 | s> HTTP/1.1 200 OK\r\n |
|
|||
1076 | s> Server: testing stub value\r\n |
|
|||
1077 | s> Date: $HTTP_DATE$\r\n |
|
|||
1078 | s> Content-Type: application/mercurial-exp-framing-0006\r\n |
|
|||
1079 | s> Transfer-Encoding: chunked\r\n |
|
|||
1080 | s> \r\n |
|
|||
1081 | s> 11\r\n |
|
|||
1082 | s> \t\x00\x00\x01\x00\x02\x01\x92 |
|
|||
1083 | s> Hidentity |
|
|||
1084 | s> \r\n |
|
|||
1085 | received frame(size=9; request=1; stream=2; streamflags=stream-begin; type=stream-settings; flags=eos) |
|
|||
1086 | s> 13\r\n |
|
|||
1087 | s> \x0b\x00\x00\x01\x00\x02\x041 |
|
|||
1088 | s> \xa1FstatusBok |
|
|||
1089 | s> \r\n |
|
|||
1090 | received frame(size=11; request=1; stream=2; streamflags=encoded; type=command-response; flags=continuation) |
|
|||
1091 | s> 6ca\r\n |
|
|||
1092 | s> \xc2\x06\x00\x01\x00\x02\x041 |
|
|||
1093 | s> \xa5Hcommands\xacIbranchmap\xa2Dargs\xa0Kpermissions\x81DpullLcapabilities\xa2Dargs\xa0Kpermissions\x81DpullMchangesetdata\xa2Dargs\xa2Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x84IbookmarksGparentsEphaseHrevisionIrevisions\xa2Hrequired\xf5DtypeDlistKpermissions\x81DpullHfiledata\xa2Dargs\xa4Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x83HlinknodeGparentsHrevisionKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolEnodes\xa2Hrequired\xf5DtypeDlistDpath\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullIfilesdata\xa3Dargs\xa4Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x84NfirstchangesetHlinknodeGparentsHrevisionKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolJpathfilter\xa3Gdefault\xf6Hrequired\xf4DtypeDdictIrevisions\xa2Hrequired\xf5DtypeDlistKpermissions\x81DpullTrecommendedbatchsize\x19\xc3PEheads\xa2Dargs\xa1Jpubliconly\xa3Gdefault\xf4Hrequired\xf4DtypeDboolKpermissions\x81DpullEknown\xa2Dargs\xa1Enodes\xa3Gdefault\x80Hrequired\xf4DtypeDlistKpermissions\x81DpullHlistkeys\xa2Dargs\xa1Inamespace\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullFlookup\xa2Dargs\xa1Ckey\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullLmanifestdata\xa3Dargs\xa4Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x82GparentsHrevisionKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolEnodes\xa2Hrequired\xf5DtypeDlistDtree\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullTrecommendedbatchsize\x1a\x00\x01\x86\xa0Gpushkey\xa2Dargs\xa4Ckey\xa2Hrequired\xf5DtypeEbytesInamespace\xa2Hrequired\xf5DtypeEbytesCnew\xa2Hrequired\xf5DtypeEbytesCold\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpushPrawstorefiledata\xa2Dargs\xa2Efiles\xa2Hrequired\xf5DtypeDlistJpathfilter\xa3Gdefault\xf6Hrequired\xf4DtypeDlistKpermissions\x81DpullQframingmediatypes\x81X&application/mercurial-exp-framing-0006Rpathfilterprefixes\xd9\x01\x02\x82Epath:Lrootfilesin:Nrawrepoformats\x82LgeneraldeltaHrevlogv1Hredirect\xa2Fhashes\x82Fsha256Dsha1Gtargets\x81\xa4DnameNtarget-bad-tlsHprotocolEhttpsKtlsversions\x82B42B39Duris\x81Thttps://example.com/ |
|
|||
1094 | s> \r\n |
|
|||
1095 | received frame(size=1730; request=1; stream=2; streamflags=encoded; type=command-response; flags=continuation) |
|
|||
1096 | s> 8\r\n |
|
|||
1097 | s> \x00\x00\x00\x01\x00\x02\x002 |
|
|||
1098 | s> \r\n |
|
|||
1099 | s> 0\r\n |
|
|||
1100 | s> \r\n |
|
|||
1101 | received frame(size=0; request=1; stream=2; streamflags=; type=command-response; flags=eos) |
|
|||
1102 | response: gen[ |
|
|||
1103 | { |
|
|||
1104 | b'commands': { |
|
|||
1105 | b'branchmap': { |
|
|||
1106 | b'args': {}, |
|
|||
1107 | b'permissions': [ |
|
|||
1108 | b'pull' |
|
|||
1109 | ] |
|
|||
1110 | }, |
|
|||
1111 | b'capabilities': { |
|
|||
1112 | b'args': {}, |
|
|||
1113 | b'permissions': [ |
|
|||
1114 | b'pull' |
|
|||
1115 | ] |
|
|||
1116 | }, |
|
|||
1117 | b'changesetdata': { |
|
|||
1118 | b'args': { |
|
|||
1119 | b'fields': { |
|
|||
1120 | b'default': set([]), |
|
|||
1121 | b'required': False, |
|
|||
1122 | b'type': b'set', |
|
|||
1123 | b'validvalues': set([ |
|
|||
1124 | b'bookmarks', |
|
|||
1125 | b'parents', |
|
|||
1126 | b'phase', |
|
|||
1127 | b'revision' |
|
|||
1128 | ]) |
|
|||
1129 | }, |
|
|||
1130 | b'revisions': { |
|
|||
1131 | b'required': True, |
|
|||
1132 | b'type': b'list' |
|
|||
1133 | } |
|
|||
1134 | }, |
|
|||
1135 | b'permissions': [ |
|
|||
1136 | b'pull' |
|
|||
1137 | ] |
|
|||
1138 | }, |
|
|||
1139 | b'filedata': { |
|
|||
1140 | b'args': { |
|
|||
1141 | b'fields': { |
|
|||
1142 | b'default': set([]), |
|
|||
1143 | b'required': False, |
|
|||
1144 | b'type': b'set', |
|
|||
1145 | b'validvalues': set([ |
|
|||
1146 | b'linknode', |
|
|||
1147 | b'parents', |
|
|||
1148 | b'revision' |
|
|||
1149 | ]) |
|
|||
1150 | }, |
|
|||
1151 | b'haveparents': { |
|
|||
1152 | b'default': False, |
|
|||
1153 | b'required': False, |
|
|||
1154 | b'type': b'bool' |
|
|||
1155 | }, |
|
|||
1156 | b'nodes': { |
|
|||
1157 | b'required': True, |
|
|||
1158 | b'type': b'list' |
|
|||
1159 | }, |
|
|||
1160 | b'path': { |
|
|||
1161 | b'required': True, |
|
|||
1162 | b'type': b'bytes' |
|
|||
1163 | } |
|
|||
1164 | }, |
|
|||
1165 | b'permissions': [ |
|
|||
1166 | b'pull' |
|
|||
1167 | ] |
|
|||
1168 | }, |
|
|||
1169 | b'filesdata': { |
|
|||
1170 | b'args': { |
|
|||
1171 | b'fields': { |
|
|||
1172 | b'default': set([]), |
|
|||
1173 | b'required': False, |
|
|||
1174 | b'type': b'set', |
|
|||
1175 | b'validvalues': set([ |
|
|||
1176 | b'firstchangeset', |
|
|||
1177 | b'linknode', |
|
|||
1178 | b'parents', |
|
|||
1179 | b'revision' |
|
|||
1180 | ]) |
|
|||
1181 | }, |
|
|||
1182 | b'haveparents': { |
|
|||
1183 | b'default': False, |
|
|||
1184 | b'required': False, |
|
|||
1185 | b'type': b'bool' |
|
|||
1186 | }, |
|
|||
1187 | b'pathfilter': { |
|
|||
1188 | b'default': None, |
|
|||
1189 | b'required': False, |
|
|||
1190 | b'type': b'dict' |
|
|||
1191 | }, |
|
|||
1192 | b'revisions': { |
|
|||
1193 | b'required': True, |
|
|||
1194 | b'type': b'list' |
|
|||
1195 | } |
|
|||
1196 | }, |
|
|||
1197 | b'permissions': [ |
|
|||
1198 | b'pull' |
|
|||
1199 | ], |
|
|||
1200 | b'recommendedbatchsize': 50000 |
|
|||
1201 | }, |
|
|||
1202 | b'heads': { |
|
|||
1203 | b'args': { |
|
|||
1204 | b'publiconly': { |
|
|||
1205 | b'default': False, |
|
|||
1206 | b'required': False, |
|
|||
1207 | b'type': b'bool' |
|
|||
1208 | } |
|
|||
1209 | }, |
|
|||
1210 | b'permissions': [ |
|
|||
1211 | b'pull' |
|
|||
1212 | ] |
|
|||
1213 | }, |
|
|||
1214 | b'known': { |
|
|||
1215 | b'args': { |
|
|||
1216 | b'nodes': { |
|
|||
1217 | b'default': [], |
|
|||
1218 | b'required': False, |
|
|||
1219 | b'type': b'list' |
|
|||
1220 | } |
|
|||
1221 | }, |
|
|||
1222 | b'permissions': [ |
|
|||
1223 | b'pull' |
|
|||
1224 | ] |
|
|||
1225 | }, |
|
|||
1226 | b'listkeys': { |
|
|||
1227 | b'args': { |
|
|||
1228 | b'namespace': { |
|
|||
1229 | b'required': True, |
|
|||
1230 | b'type': b'bytes' |
|
|||
1231 | } |
|
|||
1232 | }, |
|
|||
1233 | b'permissions': [ |
|
|||
1234 | b'pull' |
|
|||
1235 | ] |
|
|||
1236 | }, |
|
|||
1237 | b'lookup': { |
|
|||
1238 | b'args': { |
|
|||
1239 | b'key': { |
|
|||
1240 | b'required': True, |
|
|||
1241 | b'type': b'bytes' |
|
|||
1242 | } |
|
|||
1243 | }, |
|
|||
1244 | b'permissions': [ |
|
|||
1245 | b'pull' |
|
|||
1246 | ] |
|
|||
1247 | }, |
|
|||
1248 | b'manifestdata': { |
|
|||
1249 | b'args': { |
|
|||
1250 | b'fields': { |
|
|||
1251 | b'default': set([]), |
|
|||
1252 | b'required': False, |
|
|||
1253 | b'type': b'set', |
|
|||
1254 | b'validvalues': set([ |
|
|||
1255 | b'parents', |
|
|||
1256 | b'revision' |
|
|||
1257 | ]) |
|
|||
1258 | }, |
|
|||
1259 | b'haveparents': { |
|
|||
1260 | b'default': False, |
|
|||
1261 | b'required': False, |
|
|||
1262 | b'type': b'bool' |
|
|||
1263 | }, |
|
|||
1264 | b'nodes': { |
|
|||
1265 | b'required': True, |
|
|||
1266 | b'type': b'list' |
|
|||
1267 | }, |
|
|||
1268 | b'tree': { |
|
|||
1269 | b'required': True, |
|
|||
1270 | b'type': b'bytes' |
|
|||
1271 | } |
|
|||
1272 | }, |
|
|||
1273 | b'permissions': [ |
|
|||
1274 | b'pull' |
|
|||
1275 | ], |
|
|||
1276 | b'recommendedbatchsize': 100000 |
|
|||
1277 | }, |
|
|||
1278 | b'pushkey': { |
|
|||
1279 | b'args': { |
|
|||
1280 | b'key': { |
|
|||
1281 | b'required': True, |
|
|||
1282 | b'type': b'bytes' |
|
|||
1283 | }, |
|
|||
1284 | b'namespace': { |
|
|||
1285 | b'required': True, |
|
|||
1286 | b'type': b'bytes' |
|
|||
1287 | }, |
|
|||
1288 | b'new': { |
|
|||
1289 | b'required': True, |
|
|||
1290 | b'type': b'bytes' |
|
|||
1291 | }, |
|
|||
1292 | b'old': { |
|
|||
1293 | b'required': True, |
|
|||
1294 | b'type': b'bytes' |
|
|||
1295 | } |
|
|||
1296 | }, |
|
|||
1297 | b'permissions': [ |
|
|||
1298 | b'push' |
|
|||
1299 | ] |
|
|||
1300 | }, |
|
|||
1301 | b'rawstorefiledata': { |
|
|||
1302 | b'args': { |
|
|||
1303 | b'files': { |
|
|||
1304 | b'required': True, |
|
|||
1305 | b'type': b'list' |
|
|||
1306 | }, |
|
|||
1307 | b'pathfilter': { |
|
|||
1308 | b'default': None, |
|
|||
1309 | b'required': False, |
|
|||
1310 | b'type': b'list' |
|
|||
1311 | } |
|
|||
1312 | }, |
|
|||
1313 | b'permissions': [ |
|
|||
1314 | b'pull' |
|
|||
1315 | ] |
|
|||
1316 | } |
|
|||
1317 | }, |
|
|||
1318 | b'framingmediatypes': [ |
|
|||
1319 | b'application/mercurial-exp-framing-0006' |
|
|||
1320 | ], |
|
|||
1321 | b'pathfilterprefixes': set([ |
|
|||
1322 | b'path:', |
|
|||
1323 | b'rootfilesin:' |
|
|||
1324 | ]), |
|
|||
1325 | b'rawrepoformats': [ |
|
|||
1326 | b'generaldelta', |
|
|||
1327 | b'revlogv1' |
|
|||
1328 | ], |
|
1338 | ], | |
1329 | b'redirect': { |
|
1339 | b'redirect': { | |
1330 | b'hashes': [ |
|
1340 | b'hashes': [ | |
1331 | b'sha256', |
|
1341 | b'sha256', | |
1332 | b'sha1' |
|
1342 | b'sha1' | |
1333 | ], |
|
1343 | ], | |
1334 | b'targets': [ |
|
1344 | b'targets': [ | |
1335 | { |
|
1345 | { | |
1336 | b'name': b'target-bad-tls', |
|
1346 | b'name': b'target-bad-tls', | |
1337 | b'protocol': b'https', |
|
1347 | b'protocol': b'https', | |
1338 | b'tlsversions': [ |
|
1348 | b'tlsversions': [ | |
1339 | b'42', |
|
1349 | b'42', | |
1340 | b'39' |
|
1350 | b'39' | |
1341 | ], |
|
1351 | ], | |
1342 | b'uris': [ |
|
1352 | b'uris': [ | |
1343 | b'https://example.com/' |
|
1353 | b'https://example.com/' | |
1344 | ] |
|
1354 | ] | |
1345 | } |
|
1355 | } | |
1346 | ] |
|
1356 | ] | |
1347 | } |
|
1357 | } | |
1348 | } |
|
1358 | } | |
1349 | ] |
|
1359 | ] | |
1350 | (sent 2 HTTP requests and * bytes; received * bytes in responses) (glob) |
|
1360 | (sent 2 HTTP requests and * bytes; received * bytes in responses) (glob) | |
1351 |
|
1361 | |||
1352 | Set up the server to issue content redirects to its built-in API server. |
|
1362 | Set up the server to issue content redirects to its built-in API server. | |
1353 |
|
1363 | |||
1354 | $ cat > redirects.py << EOF |
|
1364 | $ cat > redirects.py << EOF | |
1355 | > [ |
|
1365 | > [ | |
1356 | > { |
|
1366 | > { | |
1357 | > b'name': b'local', |
|
1367 | > b'name': b'local', | |
1358 | > b'protocol': b'http', |
|
1368 | > b'protocol': b'http', | |
1359 | > b'uris': [b'http://example.com/'], |
|
1369 | > b'uris': [b'http://example.com/'], | |
1360 | > }, |
|
1370 | > }, | |
1361 | > ] |
|
1371 | > ] | |
1362 | > EOF |
|
1372 | > EOF | |
1363 |
|
1373 | |||
1364 | Request to eventual cache URL should return 404 (validating the cache server works) |
|
1374 | Request to eventual cache URL should return 404 (validating the cache server works) | |
1365 |
|
1375 | |||
1366 | $ sendhttpraw << EOF |
|
1376 | $ sendhttpraw << EOF | |
1367 | > httprequest GET api/simplecache/missingkey |
|
1377 | > httprequest GET api/simplecache/missingkey | |
1368 | > user-agent: test |
|
1378 | > user-agent: test | |
1369 | > EOF |
|
1379 | > EOF | |
1370 | using raw connection to peer |
|
1380 | using raw connection to peer | |
1371 | s> GET /api/simplecache/missingkey HTTP/1.1\r\n |
|
1381 | s> GET /api/simplecache/missingkey HTTP/1.1\r\n | |
1372 | s> Accept-Encoding: identity\r\n |
|
1382 | s> Accept-Encoding: identity\r\n | |
1373 | s> user-agent: test\r\n |
|
1383 | s> user-agent: test\r\n | |
1374 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
1384 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
1375 | s> \r\n |
|
1385 | s> \r\n | |
1376 | s> makefile('rb', None) |
|
1386 | s> makefile('rb', None) | |
1377 | s> HTTP/1.1 404 Not Found\r\n |
|
1387 | s> HTTP/1.1 404 Not Found\r\n | |
1378 | s> Server: testing stub value\r\n |
|
1388 | s> Server: testing stub value\r\n | |
1379 | s> Date: $HTTP_DATE$\r\n |
|
1389 | s> Date: $HTTP_DATE$\r\n | |
1380 | s> Content-Type: text/plain\r\n |
|
1390 | s> Content-Type: text/plain\r\n | |
1381 | s> Content-Length: 22\r\n |
|
1391 | s> Content-Length: 22\r\n | |
1382 | s> \r\n |
|
1392 | s> \r\n | |
1383 | s> key not found in cache |
|
1393 | s> key not found in cache | |
1384 |
|
1394 | |||
1385 | Send a cacheable request |
|
1395 | Send a cacheable request | |
1386 |
|
1396 | |||
1387 | $ sendhttpv2peer << EOF |
|
1397 | $ sendhttpv2peer << EOF | |
1388 | > command manifestdata |
|
1398 | > command manifestdata | |
1389 | > nodes eval:[b'\x99\x2f\x47\x79\x02\x9a\x3d\xf8\xd0\x66\x6d\x00\xbb\x92\x4f\x69\x63\x4e\x26\x41'] |
|
1399 | > nodes eval:[b'\x99\x2f\x47\x79\x02\x9a\x3d\xf8\xd0\x66\x6d\x00\xbb\x92\x4f\x69\x63\x4e\x26\x41'] | |
1390 | > tree eval:b'' |
|
1400 | > tree eval:b'' | |
1391 | > fields eval:[b'parents'] |
|
1401 | > fields eval:[b'parents'] | |
1392 | > EOF |
|
1402 | > EOF | |
1393 | creating http peer for wire protocol version 2 |
|
1403 | creating http peer for wire protocol version 2 | |
1394 | sending manifestdata command |
|
1404 | sending manifestdata command | |
1395 | response: gen[ |
|
1405 | response: gen[ | |
1396 | { |
|
1406 | { | |
1397 | b'totalitems': 1 |
|
1407 | b'totalitems': 1 | |
1398 | }, |
|
1408 | }, | |
1399 | { |
|
1409 | { | |
1400 | b'node': b'\x99/Gy\x02\x9a=\xf8\xd0fm\x00\xbb\x92OicN&A', |
|
1410 | b'node': b'\x99/Gy\x02\x9a=\xf8\xd0fm\x00\xbb\x92OicN&A', | |
1401 | b'parents': [ |
|
1411 | b'parents': [ | |
1402 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00', |
|
1412 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00', | |
1403 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' |
|
1413 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' | |
1404 | ] |
|
1414 | ] | |
1405 | } |
|
1415 | } | |
1406 | ] |
|
1416 | ] | |
1407 |
|
1417 | |||
1408 | Cached entry should be available on server |
|
1418 | Cached entry should be available on server | |
1409 |
|
1419 | |||
1410 | $ sendhttpraw << EOF |
|
1420 | $ sendhttpraw << EOF | |
1411 | > httprequest GET api/simplecache/47abb8efa5f01b8964d74917793ad2464db0fa2c |
|
1421 | > httprequest GET api/simplecache/47abb8efa5f01b8964d74917793ad2464db0fa2c | |
1412 | > user-agent: test |
|
1422 | > user-agent: test | |
1413 | > EOF |
|
1423 | > EOF | |
1414 | using raw connection to peer |
|
1424 | using raw connection to peer | |
1415 | s> GET /api/simplecache/47abb8efa5f01b8964d74917793ad2464db0fa2c HTTP/1.1\r\n |
|
1425 | s> GET /api/simplecache/47abb8efa5f01b8964d74917793ad2464db0fa2c HTTP/1.1\r\n | |
1416 | s> Accept-Encoding: identity\r\n |
|
1426 | s> Accept-Encoding: identity\r\n | |
1417 | s> user-agent: test\r\n |
|
1427 | s> user-agent: test\r\n | |
1418 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
1428 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
1419 | s> \r\n |
|
1429 | s> \r\n | |
1420 | s> makefile('rb', None) |
|
1430 | s> makefile('rb', None) | |
1421 | s> HTTP/1.1 200 OK\r\n |
|
1431 | s> HTTP/1.1 200 OK\r\n | |
1422 | s> Server: testing stub value\r\n |
|
1432 | s> Server: testing stub value\r\n | |
1423 | s> Date: $HTTP_DATE$\r\n |
|
1433 | s> Date: $HTTP_DATE$\r\n | |
1424 | s> Content-Type: application/mercurial-cbor\r\n |
|
1434 | s> Content-Type: application/mercurial-cbor\r\n | |
1425 | s> Content-Length: 91\r\n |
|
1435 | s> Content-Length: 91\r\n | |
1426 | s> \r\n |
|
1436 | s> \r\n | |
1427 | s> \xa1Jtotalitems\x01\xa2DnodeT\x99/Gy\x02\x9a=\xf8\xd0fm\x00\xbb\x92OicN&AGparents\x82T\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00T\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00 |
|
1437 | s> \xa1Jtotalitems\x01\xa2DnodeT\x99/Gy\x02\x9a=\xf8\xd0fm\x00\xbb\x92OicN&AGparents\x82T\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00T\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00 | |
1428 | cbor> [ |
|
1438 | cbor> [ | |
1429 | { |
|
1439 | { | |
1430 | b'totalitems': 1 |
|
1440 | b'totalitems': 1 | |
1431 | }, |
|
1441 | }, | |
1432 | { |
|
1442 | { | |
1433 | b'node': b'\x99/Gy\x02\x9a=\xf8\xd0fm\x00\xbb\x92OicN&A', |
|
1443 | b'node': b'\x99/Gy\x02\x9a=\xf8\xd0fm\x00\xbb\x92OicN&A', | |
1434 | b'parents': [ |
|
1444 | b'parents': [ | |
1435 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00', |
|
1445 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00', | |
1436 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' |
|
1446 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' | |
1437 | ] |
|
1447 | ] | |
1438 | } |
|
1448 | } | |
1439 | ] |
|
1449 | ] | |
1440 |
|
1450 | |||
1441 | 2nd request should result in content redirect response |
|
1451 | 2nd request should result in content redirect response | |
1442 |
|
1452 | |||
1443 | $ sendhttpv2peer << EOF |
|
1453 | $ sendhttpv2peer << EOF | |
1444 | > command manifestdata |
|
1454 | > command manifestdata | |
1445 | > nodes eval:[b'\x99\x2f\x47\x79\x02\x9a\x3d\xf8\xd0\x66\x6d\x00\xbb\x92\x4f\x69\x63\x4e\x26\x41'] |
|
1455 | > nodes eval:[b'\x99\x2f\x47\x79\x02\x9a\x3d\xf8\xd0\x66\x6d\x00\xbb\x92\x4f\x69\x63\x4e\x26\x41'] | |
1446 | > tree eval:b'' |
|
1456 | > tree eval:b'' | |
1447 | > fields eval:[b'parents'] |
|
1457 | > fields eval:[b'parents'] | |
1448 | > EOF |
|
1458 | > EOF | |
1449 | creating http peer for wire protocol version 2 |
|
1459 | creating http peer for wire protocol version 2 | |
1450 | sending manifestdata command |
|
1460 | sending manifestdata command | |
1451 | response: gen[ |
|
1461 | response: gen[ | |
1452 | { |
|
1462 | { | |
1453 | b'totalitems': 1 |
|
1463 | b'totalitems': 1 | |
1454 | }, |
|
1464 | }, | |
1455 | { |
|
1465 | { | |
1456 | b'node': b'\x99/Gy\x02\x9a=\xf8\xd0fm\x00\xbb\x92OicN&A', |
|
1466 | b'node': b'\x99/Gy\x02\x9a=\xf8\xd0fm\x00\xbb\x92OicN&A', | |
1457 | b'parents': [ |
|
1467 | b'parents': [ | |
1458 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00', |
|
1468 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00', | |
1459 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' |
|
1469 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' | |
1460 | ] |
|
1470 | ] | |
1461 | } |
|
1471 | } | |
1462 | ] |
|
1472 | ] | |
1463 |
|
1473 | |||
1464 | $ cat error.log |
|
1474 | $ cat error.log | |
1465 | $ killdaemons.py |
|
1475 | $ killdaemons.py | |
1466 |
|
1476 | |||
1467 | $ cat .hg/blackbox.log |
|
1477 | $ cat .hg/blackbox.log | |
1468 | *> cacher constructed for manifestdata (glob) |
|
1478 | *> cacher constructed for manifestdata (glob) | |
1469 | *> cache miss for 47abb8efa5f01b8964d74917793ad2464db0fa2c (glob) |
|
1479 | *> cache miss for 47abb8efa5f01b8964d74917793ad2464db0fa2c (glob) | |
1470 | *> storing cache entry for 47abb8efa5f01b8964d74917793ad2464db0fa2c (glob) |
|
1480 | *> storing cache entry for 47abb8efa5f01b8964d74917793ad2464db0fa2c (glob) | |
1471 | *> cacher constructed for manifestdata (glob) |
|
1481 | *> cacher constructed for manifestdata (glob) | |
1472 | *> cache hit for 47abb8efa5f01b8964d74917793ad2464db0fa2c (glob) |
|
1482 | *> cache hit for 47abb8efa5f01b8964d74917793ad2464db0fa2c (glob) | |
1473 | *> sending content redirect for 47abb8efa5f01b8964d74917793ad2464db0fa2c to http://*:$HGPORT/api/simplecache/47abb8efa5f01b8964d74917793ad2464db0fa2c (glob) |
|
1483 | *> sending content redirect for 47abb8efa5f01b8964d74917793ad2464db0fa2c to http://*:$HGPORT/api/simplecache/47abb8efa5f01b8964d74917793ad2464db0fa2c (glob) |
General Comments 0
You need to be logged in to leave comments.
Login now