Show More
@@ -1,743 +1,743 b'' | |||||
1 | #require no-chg |
|
1 | #require no-chg | |
2 |
|
2 | |||
3 | $ . $TESTDIR/wireprotohelpers.sh |
|
3 | $ . $TESTDIR/wireprotohelpers.sh | |
4 | $ enabledummycommands |
|
4 | $ enabledummycommands | |
5 |
|
5 | |||
6 | $ hg init server |
|
6 | $ hg init server | |
7 | $ cat > server/.hg/hgrc << EOF |
|
7 | $ cat > server/.hg/hgrc << EOF | |
8 | > [experimental] |
|
8 | > [experimental] | |
9 | > web.apiserver = true |
|
9 | > web.apiserver = true | |
10 | > EOF |
|
10 | > EOF | |
11 | $ hg -R server serve -p $HGPORT -d --pid-file hg.pid |
|
11 | $ hg -R server serve -p $HGPORT -d --pid-file hg.pid | |
12 | $ cat hg.pid > $DAEMON_PIDS |
|
12 | $ cat hg.pid > $DAEMON_PIDS | |
13 |
|
13 | |||
14 | HTTP v2 protocol not enabled by default |
|
14 | HTTP v2 protocol not enabled by default | |
15 |
|
15 | |||
16 | $ sendhttpraw << EOF |
|
16 | $ sendhttpraw << EOF | |
17 | > httprequest GET api/$HTTPV2 |
|
17 | > httprequest GET api/$HTTPV2 | |
18 | > user-agent: test |
|
18 | > user-agent: test | |
19 | > EOF |
|
19 | > EOF | |
20 | using raw connection to peer |
|
20 | using raw connection to peer | |
21 |
s> setsockopt(6, 1, 1) -> None ( |
|
21 | s> setsockopt(6, 1, 1) -> None (?) | |
22 | s> GET /api/exp-http-v2-0003 HTTP/1.1\r\n |
|
22 | s> GET /api/exp-http-v2-0003 HTTP/1.1\r\n | |
23 | s> Accept-Encoding: identity\r\n |
|
23 | s> Accept-Encoding: identity\r\n | |
24 | s> user-agent: test\r\n |
|
24 | s> user-agent: test\r\n | |
25 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
25 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
26 | s> \r\n |
|
26 | s> \r\n | |
27 | s> makefile('rb', None) |
|
27 | s> makefile('rb', None) | |
28 | s> HTTP/1.1 404 Not Found\r\n |
|
28 | s> HTTP/1.1 404 Not Found\r\n | |
29 | s> Server: testing stub value\r\n |
|
29 | s> Server: testing stub value\r\n | |
30 | s> Date: $HTTP_DATE$\r\n |
|
30 | s> Date: $HTTP_DATE$\r\n | |
31 | s> Content-Type: text/plain\r\n |
|
31 | s> Content-Type: text/plain\r\n | |
32 | s> Content-Length: 33\r\n |
|
32 | s> Content-Length: 33\r\n | |
33 | s> \r\n |
|
33 | s> \r\n | |
34 | s> API exp-http-v2-0003 not enabled\n |
|
34 | s> API exp-http-v2-0003 not enabled\n | |
35 |
|
35 | |||
36 | Restart server with support for HTTP v2 API |
|
36 | Restart server with support for HTTP v2 API | |
37 |
|
37 | |||
38 | $ killdaemons.py |
|
38 | $ killdaemons.py | |
39 | $ enablehttpv2 server |
|
39 | $ enablehttpv2 server | |
40 | $ hg -R server serve -p $HGPORT -d --pid-file hg.pid |
|
40 | $ hg -R server serve -p $HGPORT -d --pid-file hg.pid | |
41 | $ cat hg.pid > $DAEMON_PIDS |
|
41 | $ cat hg.pid > $DAEMON_PIDS | |
42 |
|
42 | |||
43 | Request to unknown command yields 404 |
|
43 | Request to unknown command yields 404 | |
44 |
|
44 | |||
45 | $ sendhttpraw << EOF |
|
45 | $ sendhttpraw << EOF | |
46 | > httprequest POST api/$HTTPV2/ro/badcommand |
|
46 | > httprequest POST api/$HTTPV2/ro/badcommand | |
47 | > user-agent: test |
|
47 | > user-agent: test | |
48 | > EOF |
|
48 | > EOF | |
49 | using raw connection to peer |
|
49 | using raw connection to peer | |
50 |
s> setsockopt(6, 1, 1) -> None ( |
|
50 | s> setsockopt(6, 1, 1) -> None (?) | |
51 | s> POST /api/exp-http-v2-0003/ro/badcommand HTTP/1.1\r\n |
|
51 | s> POST /api/exp-http-v2-0003/ro/badcommand HTTP/1.1\r\n | |
52 | s> Accept-Encoding: identity\r\n |
|
52 | s> Accept-Encoding: identity\r\n | |
53 | s> user-agent: test\r\n |
|
53 | s> user-agent: test\r\n | |
54 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
54 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
55 | s> \r\n |
|
55 | s> \r\n | |
56 | s> makefile('rb', None) |
|
56 | s> makefile('rb', None) | |
57 | s> HTTP/1.1 404 Not Found\r\n |
|
57 | s> HTTP/1.1 404 Not Found\r\n | |
58 | s> Server: testing stub value\r\n |
|
58 | s> Server: testing stub value\r\n | |
59 | s> Date: $HTTP_DATE$\r\n |
|
59 | s> Date: $HTTP_DATE$\r\n | |
60 | s> Content-Type: text/plain\r\n |
|
60 | s> Content-Type: text/plain\r\n | |
61 | s> Content-Length: 42\r\n |
|
61 | s> Content-Length: 42\r\n | |
62 | s> \r\n |
|
62 | s> \r\n | |
63 | s> unknown wire protocol command: badcommand\n |
|
63 | s> unknown wire protocol command: badcommand\n | |
64 |
|
64 | |||
65 | GET to read-only command yields a 405 |
|
65 | GET to read-only command yields a 405 | |
66 |
|
66 | |||
67 | $ sendhttpraw << EOF |
|
67 | $ sendhttpraw << EOF | |
68 | > httprequest GET api/$HTTPV2/ro/customreadonly |
|
68 | > httprequest GET api/$HTTPV2/ro/customreadonly | |
69 | > user-agent: test |
|
69 | > user-agent: test | |
70 | > EOF |
|
70 | > EOF | |
71 | using raw connection to peer |
|
71 | using raw connection to peer | |
72 |
s> setsockopt(6, 1, 1) -> None ( |
|
72 | s> setsockopt(6, 1, 1) -> None (?) | |
73 | s> GET /api/exp-http-v2-0003/ro/customreadonly HTTP/1.1\r\n |
|
73 | s> GET /api/exp-http-v2-0003/ro/customreadonly HTTP/1.1\r\n | |
74 | s> Accept-Encoding: identity\r\n |
|
74 | s> Accept-Encoding: identity\r\n | |
75 | s> user-agent: test\r\n |
|
75 | s> user-agent: test\r\n | |
76 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
76 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
77 | s> \r\n |
|
77 | s> \r\n | |
78 | s> makefile('rb', None) |
|
78 | s> makefile('rb', None) | |
79 | s> HTTP/1.1 405 Method Not Allowed\r\n |
|
79 | s> HTTP/1.1 405 Method Not Allowed\r\n | |
80 | s> Server: testing stub value\r\n |
|
80 | s> Server: testing stub value\r\n | |
81 | s> Date: $HTTP_DATE$\r\n |
|
81 | s> Date: $HTTP_DATE$\r\n | |
82 | s> Allow: POST\r\n |
|
82 | s> Allow: POST\r\n | |
83 | s> Content-Length: 30\r\n |
|
83 | s> Content-Length: 30\r\n | |
84 | s> \r\n |
|
84 | s> \r\n | |
85 | s> commands require POST requests |
|
85 | s> commands require POST requests | |
86 |
|
86 | |||
87 | Missing Accept header results in 406 |
|
87 | Missing Accept header results in 406 | |
88 |
|
88 | |||
89 | $ sendhttpraw << EOF |
|
89 | $ sendhttpraw << EOF | |
90 | > httprequest POST api/$HTTPV2/ro/customreadonly |
|
90 | > httprequest POST api/$HTTPV2/ro/customreadonly | |
91 | > user-agent: test |
|
91 | > user-agent: test | |
92 | > EOF |
|
92 | > EOF | |
93 | using raw connection to peer |
|
93 | using raw connection to peer | |
94 |
s> setsockopt(6, 1, 1) -> None ( |
|
94 | s> setsockopt(6, 1, 1) -> None (?) | |
95 | s> POST /api/exp-http-v2-0003/ro/customreadonly HTTP/1.1\r\n |
|
95 | s> POST /api/exp-http-v2-0003/ro/customreadonly HTTP/1.1\r\n | |
96 | s> Accept-Encoding: identity\r\n |
|
96 | s> Accept-Encoding: identity\r\n | |
97 | s> user-agent: test\r\n |
|
97 | s> user-agent: test\r\n | |
98 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
98 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
99 | s> \r\n |
|
99 | s> \r\n | |
100 | s> makefile('rb', None) |
|
100 | s> makefile('rb', None) | |
101 | s> HTTP/1.1 406 Not Acceptable\r\n |
|
101 | s> HTTP/1.1 406 Not Acceptable\r\n | |
102 | s> Server: testing stub value\r\n |
|
102 | s> Server: testing stub value\r\n | |
103 | s> Date: $HTTP_DATE$\r\n |
|
103 | s> Date: $HTTP_DATE$\r\n | |
104 | s> Content-Type: text/plain\r\n |
|
104 | s> Content-Type: text/plain\r\n | |
105 | s> Content-Length: 85\r\n |
|
105 | s> Content-Length: 85\r\n | |
106 | s> \r\n |
|
106 | s> \r\n | |
107 | s> client MUST specify Accept header with value: application/mercurial-exp-framing-0006\n |
|
107 | s> client MUST specify Accept header with value: application/mercurial-exp-framing-0006\n | |
108 |
|
108 | |||
109 | Bad Accept header results in 406 |
|
109 | Bad Accept header results in 406 | |
110 |
|
110 | |||
111 | $ sendhttpraw << EOF |
|
111 | $ sendhttpraw << EOF | |
112 | > httprequest POST api/$HTTPV2/ro/customreadonly |
|
112 | > httprequest POST api/$HTTPV2/ro/customreadonly | |
113 | > accept: invalid |
|
113 | > accept: invalid | |
114 | > user-agent: test |
|
114 | > user-agent: test | |
115 | > EOF |
|
115 | > EOF | |
116 | using raw connection to peer |
|
116 | using raw connection to peer | |
117 |
s> setsockopt(6, 1, 1) -> None ( |
|
117 | s> setsockopt(6, 1, 1) -> None (?) | |
118 | s> POST /api/exp-http-v2-0003/ro/customreadonly HTTP/1.1\r\n |
|
118 | s> POST /api/exp-http-v2-0003/ro/customreadonly HTTP/1.1\r\n | |
119 | s> Accept-Encoding: identity\r\n |
|
119 | s> Accept-Encoding: identity\r\n | |
120 | s> accept: invalid\r\n |
|
120 | s> accept: invalid\r\n | |
121 | s> user-agent: test\r\n |
|
121 | s> user-agent: test\r\n | |
122 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
122 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
123 | s> \r\n |
|
123 | s> \r\n | |
124 | s> makefile('rb', None) |
|
124 | s> makefile('rb', None) | |
125 | s> HTTP/1.1 406 Not Acceptable\r\n |
|
125 | s> HTTP/1.1 406 Not Acceptable\r\n | |
126 | s> Server: testing stub value\r\n |
|
126 | s> Server: testing stub value\r\n | |
127 | s> Date: $HTTP_DATE$\r\n |
|
127 | s> Date: $HTTP_DATE$\r\n | |
128 | s> Content-Type: text/plain\r\n |
|
128 | s> Content-Type: text/plain\r\n | |
129 | s> Content-Length: 85\r\n |
|
129 | s> Content-Length: 85\r\n | |
130 | s> \r\n |
|
130 | s> \r\n | |
131 | s> client MUST specify Accept header with value: application/mercurial-exp-framing-0006\n |
|
131 | s> client MUST specify Accept header with value: application/mercurial-exp-framing-0006\n | |
132 |
|
132 | |||
133 | Bad Content-Type header results in 415 |
|
133 | Bad Content-Type header results in 415 | |
134 |
|
134 | |||
135 | $ sendhttpraw << EOF |
|
135 | $ sendhttpraw << EOF | |
136 | > httprequest POST api/$HTTPV2/ro/customreadonly |
|
136 | > httprequest POST api/$HTTPV2/ro/customreadonly | |
137 | > accept: $MEDIATYPE |
|
137 | > accept: $MEDIATYPE | |
138 | > user-agent: test |
|
138 | > user-agent: test | |
139 | > content-type: badmedia |
|
139 | > content-type: badmedia | |
140 | > EOF |
|
140 | > EOF | |
141 | using raw connection to peer |
|
141 | using raw connection to peer | |
142 |
s> setsockopt(6, 1, 1) -> None ( |
|
142 | s> setsockopt(6, 1, 1) -> None (?) | |
143 | s> POST /api/exp-http-v2-0003/ro/customreadonly HTTP/1.1\r\n |
|
143 | s> POST /api/exp-http-v2-0003/ro/customreadonly HTTP/1.1\r\n | |
144 | s> Accept-Encoding: identity\r\n |
|
144 | s> Accept-Encoding: identity\r\n | |
145 | s> accept: application/mercurial-exp-framing-0006\r\n |
|
145 | s> accept: application/mercurial-exp-framing-0006\r\n | |
146 | s> content-type: badmedia\r\n |
|
146 | s> content-type: badmedia\r\n | |
147 | s> user-agent: test\r\n |
|
147 | s> user-agent: test\r\n | |
148 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
148 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
149 | s> \r\n |
|
149 | s> \r\n | |
150 | s> makefile('rb', None) |
|
150 | s> makefile('rb', None) | |
151 | s> HTTP/1.1 415 Unsupported Media Type\r\n |
|
151 | s> HTTP/1.1 415 Unsupported Media Type\r\n | |
152 | s> Server: testing stub value\r\n |
|
152 | s> Server: testing stub value\r\n | |
153 | s> Date: $HTTP_DATE$\r\n |
|
153 | s> Date: $HTTP_DATE$\r\n | |
154 | s> Content-Type: text/plain\r\n |
|
154 | s> Content-Type: text/plain\r\n | |
155 | s> Content-Length: 88\r\n |
|
155 | s> Content-Length: 88\r\n | |
156 | s> \r\n |
|
156 | s> \r\n | |
157 | s> client MUST send Content-Type header with value: application/mercurial-exp-framing-0006\n |
|
157 | s> client MUST send Content-Type header with value: application/mercurial-exp-framing-0006\n | |
158 |
|
158 | |||
159 | Request to read-only command works out of the box |
|
159 | Request to read-only command works out of the box | |
160 |
|
160 | |||
161 | $ sendhttpraw << EOF |
|
161 | $ sendhttpraw << EOF | |
162 | > httprequest POST api/$HTTPV2/ro/customreadonly |
|
162 | > httprequest POST api/$HTTPV2/ro/customreadonly | |
163 | > accept: $MEDIATYPE |
|
163 | > accept: $MEDIATYPE | |
164 | > content-type: $MEDIATYPE |
|
164 | > content-type: $MEDIATYPE | |
165 | > user-agent: test |
|
165 | > user-agent: test | |
166 | > frame 1 1 stream-begin command-request new cbor:{b'name': b'customreadonly'} |
|
166 | > frame 1 1 stream-begin command-request new cbor:{b'name': b'customreadonly'} | |
167 | > EOF |
|
167 | > EOF | |
168 | using raw connection to peer |
|
168 | using raw connection to peer | |
169 |
s> setsockopt(6, 1, 1) -> None ( |
|
169 | s> setsockopt(6, 1, 1) -> None (?) | |
170 | s> POST /api/exp-http-v2-0003/ro/customreadonly HTTP/1.1\r\n |
|
170 | s> POST /api/exp-http-v2-0003/ro/customreadonly HTTP/1.1\r\n | |
171 | s> Accept-Encoding: identity\r\n |
|
171 | s> Accept-Encoding: identity\r\n | |
172 | s> *\r\n (glob) |
|
172 | s> *\r\n (glob) | |
173 | s> content-type: application/mercurial-exp-framing-0006\r\n |
|
173 | s> content-type: application/mercurial-exp-framing-0006\r\n | |
174 | s> user-agent: test\r\n |
|
174 | s> user-agent: test\r\n | |
175 | s> content-length: 29\r\n |
|
175 | s> content-length: 29\r\n | |
176 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
176 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
177 | s> \r\n |
|
177 | s> \r\n | |
178 | s> \x15\x00\x00\x01\x00\x01\x01\x11\xa1DnameNcustomreadonly |
|
178 | s> \x15\x00\x00\x01\x00\x01\x01\x11\xa1DnameNcustomreadonly | |
179 | s> makefile('rb', None) |
|
179 | s> makefile('rb', None) | |
180 | s> HTTP/1.1 200 OK\r\n |
|
180 | s> HTTP/1.1 200 OK\r\n | |
181 | s> Server: testing stub value\r\n |
|
181 | s> Server: testing stub value\r\n | |
182 | s> Date: $HTTP_DATE$\r\n |
|
182 | s> Date: $HTTP_DATE$\r\n | |
183 | s> Content-Type: application/mercurial-exp-framing-0006\r\n |
|
183 | s> Content-Type: application/mercurial-exp-framing-0006\r\n | |
184 | s> Transfer-Encoding: chunked\r\n |
|
184 | s> Transfer-Encoding: chunked\r\n | |
185 | s> \r\n |
|
185 | s> \r\n | |
186 | s> 11\r\n |
|
186 | s> 11\r\n | |
187 | s> \t\x00\x00\x01\x00\x02\x01\x92Hidentity |
|
187 | s> \t\x00\x00\x01\x00\x02\x01\x92Hidentity | |
188 | s> \r\n |
|
188 | s> \r\n | |
189 | s> 13\r\n |
|
189 | s> 13\r\n | |
190 | s> \x0b\x00\x00\x01\x00\x02\x041\xa1FstatusBok |
|
190 | s> \x0b\x00\x00\x01\x00\x02\x041\xa1FstatusBok | |
191 | s> \r\n |
|
191 | s> \r\n | |
192 | s> 27\r\n |
|
192 | s> 27\r\n | |
193 | s> \x1f\x00\x00\x01\x00\x02\x041X\x1dcustomreadonly bytes response |
|
193 | s> \x1f\x00\x00\x01\x00\x02\x041X\x1dcustomreadonly bytes response | |
194 | s> \r\n |
|
194 | s> \r\n | |
195 | s> 8\r\n |
|
195 | s> 8\r\n | |
196 | s> \x00\x00\x00\x01\x00\x02\x002 |
|
196 | s> \x00\x00\x00\x01\x00\x02\x002 | |
197 | s> \r\n |
|
197 | s> \r\n | |
198 | s> 0\r\n |
|
198 | s> 0\r\n | |
199 | s> \r\n |
|
199 | s> \r\n | |
200 |
|
200 | |||
201 | $ sendhttpv2peerverbose << EOF |
|
201 | $ sendhttpv2peerverbose << EOF | |
202 | > command customreadonly |
|
202 | > command customreadonly | |
203 | > EOF |
|
203 | > EOF | |
204 | creating http peer for wire protocol version 2 |
|
204 | creating http peer for wire protocol version 2 | |
205 | sending customreadonly command |
|
205 | sending customreadonly command | |
206 |
s> setsockopt(6, 1, 1) -> None ( |
|
206 | s> setsockopt(6, 1, 1) -> None (?) | |
207 | s> POST /api/exp-http-v2-0003/ro/customreadonly HTTP/1.1\r\n |
|
207 | s> POST /api/exp-http-v2-0003/ro/customreadonly HTTP/1.1\r\n | |
208 | s> Accept-Encoding: identity\r\n |
|
208 | s> Accept-Encoding: identity\r\n | |
209 | s> accept: application/mercurial-exp-framing-0006\r\n |
|
209 | s> accept: application/mercurial-exp-framing-0006\r\n | |
210 | s> content-type: application/mercurial-exp-framing-0006\r\n |
|
210 | s> content-type: application/mercurial-exp-framing-0006\r\n | |
211 | s> content-length: 65\r\n |
|
211 | s> content-length: 65\r\n | |
212 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
212 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
213 | s> user-agent: Mercurial debugwireproto\r\n |
|
213 | s> user-agent: Mercurial debugwireproto\r\n | |
214 | s> \r\n |
|
214 | s> \r\n | |
215 | s> \x1c\x00\x00\x01\x00\x01\x01\x82\xa1Pcontentencodings\x81Hidentity\x15\x00\x00\x01\x00\x01\x00\x11\xa1DnameNcustomreadonly |
|
215 | s> \x1c\x00\x00\x01\x00\x01\x01\x82\xa1Pcontentencodings\x81Hidentity\x15\x00\x00\x01\x00\x01\x00\x11\xa1DnameNcustomreadonly | |
216 | s> makefile('rb', None) |
|
216 | s> makefile('rb', None) | |
217 | s> HTTP/1.1 200 OK\r\n |
|
217 | s> HTTP/1.1 200 OK\r\n | |
218 | s> Server: testing stub value\r\n |
|
218 | s> Server: testing stub value\r\n | |
219 | s> Date: $HTTP_DATE$\r\n |
|
219 | s> Date: $HTTP_DATE$\r\n | |
220 | s> Content-Type: application/mercurial-exp-framing-0006\r\n |
|
220 | s> Content-Type: application/mercurial-exp-framing-0006\r\n | |
221 | s> Transfer-Encoding: chunked\r\n |
|
221 | s> Transfer-Encoding: chunked\r\n | |
222 | s> \r\n |
|
222 | s> \r\n | |
223 | s> 11\r\n |
|
223 | s> 11\r\n | |
224 | s> \t\x00\x00\x01\x00\x02\x01\x92 |
|
224 | s> \t\x00\x00\x01\x00\x02\x01\x92 | |
225 | s> Hidentity |
|
225 | s> Hidentity | |
226 | s> \r\n |
|
226 | s> \r\n | |
227 | s> 13\r\n |
|
227 | s> 13\r\n | |
228 | s> \x0b\x00\x00\x01\x00\x02\x041 |
|
228 | s> \x0b\x00\x00\x01\x00\x02\x041 | |
229 | s> \xa1FstatusBok |
|
229 | s> \xa1FstatusBok | |
230 | s> \r\n |
|
230 | s> \r\n | |
231 | s> 27\r\n |
|
231 | s> 27\r\n | |
232 | s> \x1f\x00\x00\x01\x00\x02\x041 |
|
232 | s> \x1f\x00\x00\x01\x00\x02\x041 | |
233 | s> X\x1dcustomreadonly bytes response |
|
233 | s> X\x1dcustomreadonly bytes response | |
234 | s> \r\n |
|
234 | s> \r\n | |
235 | s> 8\r\n |
|
235 | s> 8\r\n | |
236 | s> \x00\x00\x00\x01\x00\x02\x002 |
|
236 | s> \x00\x00\x00\x01\x00\x02\x002 | |
237 | s> \r\n |
|
237 | s> \r\n | |
238 | s> 0\r\n |
|
238 | s> 0\r\n | |
239 | s> \r\n |
|
239 | s> \r\n | |
240 | response: gen[ |
|
240 | response: gen[ | |
241 | b'customreadonly bytes response' |
|
241 | b'customreadonly bytes response' | |
242 | ] |
|
242 | ] | |
243 | (sent 2 HTTP requests and * bytes; received * bytes in responses) (glob) |
|
243 | (sent 2 HTTP requests and * bytes; received * bytes in responses) (glob) | |
244 |
|
244 | |||
245 | Request to read-write command fails because server is read-only by default |
|
245 | Request to read-write command fails because server is read-only by default | |
246 |
|
246 | |||
247 | GET to read-write request yields 405 |
|
247 | GET to read-write request yields 405 | |
248 |
|
248 | |||
249 | $ sendhttpraw << EOF |
|
249 | $ sendhttpraw << EOF | |
250 | > httprequest GET api/$HTTPV2/rw/customreadonly |
|
250 | > httprequest GET api/$HTTPV2/rw/customreadonly | |
251 | > user-agent: test |
|
251 | > user-agent: test | |
252 | > EOF |
|
252 | > EOF | |
253 | using raw connection to peer |
|
253 | using raw connection to peer | |
254 |
s> setsockopt(6, 1, 1) -> None ( |
|
254 | s> setsockopt(6, 1, 1) -> None (?) | |
255 | s> GET /api/exp-http-v2-0003/rw/customreadonly HTTP/1.1\r\n |
|
255 | s> GET /api/exp-http-v2-0003/rw/customreadonly HTTP/1.1\r\n | |
256 | s> Accept-Encoding: identity\r\n |
|
256 | s> Accept-Encoding: identity\r\n | |
257 | s> user-agent: test\r\n |
|
257 | s> user-agent: test\r\n | |
258 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
258 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
259 | s> \r\n |
|
259 | s> \r\n | |
260 | s> makefile('rb', None) |
|
260 | s> makefile('rb', None) | |
261 | s> HTTP/1.1 405 Method Not Allowed\r\n |
|
261 | s> HTTP/1.1 405 Method Not Allowed\r\n | |
262 | s> Server: testing stub value\r\n |
|
262 | s> Server: testing stub value\r\n | |
263 | s> Date: $HTTP_DATE$\r\n |
|
263 | s> Date: $HTTP_DATE$\r\n | |
264 | s> Allow: POST\r\n |
|
264 | s> Allow: POST\r\n | |
265 | s> Content-Length: 30\r\n |
|
265 | s> Content-Length: 30\r\n | |
266 | s> \r\n |
|
266 | s> \r\n | |
267 | s> commands require POST requests |
|
267 | s> commands require POST requests | |
268 |
|
268 | |||
269 | Even for unknown commands |
|
269 | Even for unknown commands | |
270 |
|
270 | |||
271 | $ sendhttpraw << EOF |
|
271 | $ sendhttpraw << EOF | |
272 | > httprequest GET api/$HTTPV2/rw/badcommand |
|
272 | > httprequest GET api/$HTTPV2/rw/badcommand | |
273 | > user-agent: test |
|
273 | > user-agent: test | |
274 | > EOF |
|
274 | > EOF | |
275 | using raw connection to peer |
|
275 | using raw connection to peer | |
276 |
s> setsockopt(6, 1, 1) -> None ( |
|
276 | s> setsockopt(6, 1, 1) -> None (?) | |
277 | s> GET /api/exp-http-v2-0003/rw/badcommand HTTP/1.1\r\n |
|
277 | s> GET /api/exp-http-v2-0003/rw/badcommand HTTP/1.1\r\n | |
278 | s> Accept-Encoding: identity\r\n |
|
278 | s> Accept-Encoding: identity\r\n | |
279 | s> user-agent: test\r\n |
|
279 | s> user-agent: test\r\n | |
280 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
280 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
281 | s> \r\n |
|
281 | s> \r\n | |
282 | s> makefile('rb', None) |
|
282 | s> makefile('rb', None) | |
283 | s> HTTP/1.1 405 Method Not Allowed\r\n |
|
283 | s> HTTP/1.1 405 Method Not Allowed\r\n | |
284 | s> Server: testing stub value\r\n |
|
284 | s> Server: testing stub value\r\n | |
285 | s> Date: $HTTP_DATE$\r\n |
|
285 | s> Date: $HTTP_DATE$\r\n | |
286 | s> Allow: POST\r\n |
|
286 | s> Allow: POST\r\n | |
287 | s> Content-Length: 30\r\n |
|
287 | s> Content-Length: 30\r\n | |
288 | s> \r\n |
|
288 | s> \r\n | |
289 | s> commands require POST requests |
|
289 | s> commands require POST requests | |
290 |
|
290 | |||
291 | SSL required by default |
|
291 | SSL required by default | |
292 |
|
292 | |||
293 | $ sendhttpraw << EOF |
|
293 | $ sendhttpraw << EOF | |
294 | > httprequest POST api/$HTTPV2/rw/customreadonly |
|
294 | > httprequest POST api/$HTTPV2/rw/customreadonly | |
295 | > user-agent: test |
|
295 | > user-agent: test | |
296 | > EOF |
|
296 | > EOF | |
297 | using raw connection to peer |
|
297 | using raw connection to peer | |
298 |
s> setsockopt(6, 1, 1) -> None ( |
|
298 | s> setsockopt(6, 1, 1) -> None (?) | |
299 | s> POST /api/exp-http-v2-0003/rw/customreadonly HTTP/1.1\r\n |
|
299 | s> POST /api/exp-http-v2-0003/rw/customreadonly HTTP/1.1\r\n | |
300 | s> Accept-Encoding: identity\r\n |
|
300 | s> Accept-Encoding: identity\r\n | |
301 | s> user-agent: test\r\n |
|
301 | s> user-agent: test\r\n | |
302 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
302 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
303 | s> \r\n |
|
303 | s> \r\n | |
304 | s> makefile('rb', None) |
|
304 | s> makefile('rb', None) | |
305 | s> HTTP/1.1 403 ssl required\r\n |
|
305 | s> HTTP/1.1 403 ssl required\r\n | |
306 | s> Server: testing stub value\r\n |
|
306 | s> Server: testing stub value\r\n | |
307 | s> Date: $HTTP_DATE$\r\n |
|
307 | s> Date: $HTTP_DATE$\r\n | |
308 | s> Content-Length: 17\r\n |
|
308 | s> Content-Length: 17\r\n | |
309 | s> \r\n |
|
309 | s> \r\n | |
310 | s> permission denied |
|
310 | s> permission denied | |
311 |
|
311 | |||
312 | Restart server to allow non-ssl read-write operations |
|
312 | Restart server to allow non-ssl read-write operations | |
313 |
|
313 | |||
314 | $ killdaemons.py |
|
314 | $ killdaemons.py | |
315 | $ cat > server/.hg/hgrc << EOF |
|
315 | $ cat > server/.hg/hgrc << EOF | |
316 | > [experimental] |
|
316 | > [experimental] | |
317 | > web.apiserver = true |
|
317 | > web.apiserver = true | |
318 | > web.api.http-v2 = true |
|
318 | > web.api.http-v2 = true | |
319 | > [web] |
|
319 | > [web] | |
320 | > push_ssl = false |
|
320 | > push_ssl = false | |
321 | > allow-push = * |
|
321 | > allow-push = * | |
322 | > EOF |
|
322 | > EOF | |
323 |
|
323 | |||
324 | $ hg -R server serve -p $HGPORT -d --pid-file hg.pid -E error.log |
|
324 | $ hg -R server serve -p $HGPORT -d --pid-file hg.pid -E error.log | |
325 | $ cat hg.pid > $DAEMON_PIDS |
|
325 | $ cat hg.pid > $DAEMON_PIDS | |
326 |
|
326 | |||
327 | Authorized request for valid read-write command works |
|
327 | Authorized request for valid read-write command works | |
328 |
|
328 | |||
329 | $ sendhttpraw << EOF |
|
329 | $ sendhttpraw << EOF | |
330 | > httprequest POST api/$HTTPV2/rw/customreadonly |
|
330 | > httprequest POST api/$HTTPV2/rw/customreadonly | |
331 | > user-agent: test |
|
331 | > user-agent: test | |
332 | > accept: $MEDIATYPE |
|
332 | > accept: $MEDIATYPE | |
333 | > content-type: $MEDIATYPE |
|
333 | > content-type: $MEDIATYPE | |
334 | > frame 1 1 stream-begin command-request new cbor:{b'name': b'customreadonly'} |
|
334 | > frame 1 1 stream-begin command-request new cbor:{b'name': b'customreadonly'} | |
335 | > EOF |
|
335 | > EOF | |
336 | using raw connection to peer |
|
336 | using raw connection to peer | |
337 |
s> setsockopt(6, 1, 1) -> None ( |
|
337 | s> setsockopt(6, 1, 1) -> None (?) | |
338 | s> POST /api/exp-http-v2-0003/rw/customreadonly HTTP/1.1\r\n |
|
338 | s> POST /api/exp-http-v2-0003/rw/customreadonly HTTP/1.1\r\n | |
339 | s> Accept-Encoding: identity\r\n |
|
339 | s> Accept-Encoding: identity\r\n | |
340 | s> accept: application/mercurial-exp-framing-0006\r\n |
|
340 | s> accept: application/mercurial-exp-framing-0006\r\n | |
341 | s> content-type: application/mercurial-exp-framing-0006\r\n |
|
341 | s> content-type: application/mercurial-exp-framing-0006\r\n | |
342 | s> user-agent: test\r\n |
|
342 | s> user-agent: test\r\n | |
343 | s> content-length: 29\r\n |
|
343 | s> content-length: 29\r\n | |
344 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
344 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
345 | s> \r\n |
|
345 | s> \r\n | |
346 | s> \x15\x00\x00\x01\x00\x01\x01\x11\xa1DnameNcustomreadonly |
|
346 | s> \x15\x00\x00\x01\x00\x01\x01\x11\xa1DnameNcustomreadonly | |
347 | s> makefile('rb', None) |
|
347 | s> makefile('rb', None) | |
348 | s> HTTP/1.1 200 OK\r\n |
|
348 | s> HTTP/1.1 200 OK\r\n | |
349 | s> Server: testing stub value\r\n |
|
349 | s> Server: testing stub value\r\n | |
350 | s> Date: $HTTP_DATE$\r\n |
|
350 | s> Date: $HTTP_DATE$\r\n | |
351 | s> Content-Type: application/mercurial-exp-framing-0006\r\n |
|
351 | s> Content-Type: application/mercurial-exp-framing-0006\r\n | |
352 | s> Transfer-Encoding: chunked\r\n |
|
352 | s> Transfer-Encoding: chunked\r\n | |
353 | s> \r\n |
|
353 | s> \r\n | |
354 | s> 11\r\n |
|
354 | s> 11\r\n | |
355 | s> \t\x00\x00\x01\x00\x02\x01\x92Hidentity |
|
355 | s> \t\x00\x00\x01\x00\x02\x01\x92Hidentity | |
356 | s> \r\n |
|
356 | s> \r\n | |
357 | s> 13\r\n |
|
357 | s> 13\r\n | |
358 | s> \x0b\x00\x00\x01\x00\x02\x041\xa1FstatusBok |
|
358 | s> \x0b\x00\x00\x01\x00\x02\x041\xa1FstatusBok | |
359 | s> \r\n |
|
359 | s> \r\n | |
360 | s> 27\r\n |
|
360 | s> 27\r\n | |
361 | s> \x1f\x00\x00\x01\x00\x02\x041X\x1dcustomreadonly bytes response |
|
361 | s> \x1f\x00\x00\x01\x00\x02\x041X\x1dcustomreadonly bytes response | |
362 | s> \r\n |
|
362 | s> \r\n | |
363 | s> 8\r\n |
|
363 | s> 8\r\n | |
364 | s> \x00\x00\x00\x01\x00\x02\x002 |
|
364 | s> \x00\x00\x00\x01\x00\x02\x002 | |
365 | s> \r\n |
|
365 | s> \r\n | |
366 | s> 0\r\n |
|
366 | s> 0\r\n | |
367 | s> \r\n |
|
367 | s> \r\n | |
368 |
|
368 | |||
369 | Authorized request for unknown command is rejected |
|
369 | Authorized request for unknown command is rejected | |
370 |
|
370 | |||
371 | $ sendhttpraw << EOF |
|
371 | $ sendhttpraw << EOF | |
372 | > httprequest POST api/$HTTPV2/rw/badcommand |
|
372 | > httprequest POST api/$HTTPV2/rw/badcommand | |
373 | > user-agent: test |
|
373 | > user-agent: test | |
374 | > accept: $MEDIATYPE |
|
374 | > accept: $MEDIATYPE | |
375 | > EOF |
|
375 | > EOF | |
376 | using raw connection to peer |
|
376 | using raw connection to peer | |
377 |
s> setsockopt(6, 1, 1) -> None ( |
|
377 | s> setsockopt(6, 1, 1) -> None (?) | |
378 | s> POST /api/exp-http-v2-0003/rw/badcommand HTTP/1.1\r\n |
|
378 | s> POST /api/exp-http-v2-0003/rw/badcommand HTTP/1.1\r\n | |
379 | s> Accept-Encoding: identity\r\n |
|
379 | s> Accept-Encoding: identity\r\n | |
380 | s> accept: application/mercurial-exp-framing-0006\r\n |
|
380 | s> accept: application/mercurial-exp-framing-0006\r\n | |
381 | s> user-agent: test\r\n |
|
381 | s> user-agent: test\r\n | |
382 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
382 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
383 | s> \r\n |
|
383 | s> \r\n | |
384 | s> makefile('rb', None) |
|
384 | s> makefile('rb', None) | |
385 | s> HTTP/1.1 404 Not Found\r\n |
|
385 | s> HTTP/1.1 404 Not Found\r\n | |
386 | s> Server: testing stub value\r\n |
|
386 | s> Server: testing stub value\r\n | |
387 | s> Date: $HTTP_DATE$\r\n |
|
387 | s> Date: $HTTP_DATE$\r\n | |
388 | s> Content-Type: text/plain\r\n |
|
388 | s> Content-Type: text/plain\r\n | |
389 | s> Content-Length: 42\r\n |
|
389 | s> Content-Length: 42\r\n | |
390 | s> \r\n |
|
390 | s> \r\n | |
391 | s> unknown wire protocol command: badcommand\n |
|
391 | s> unknown wire protocol command: badcommand\n | |
392 |
|
392 | |||
393 | debugreflect isn't enabled by default |
|
393 | debugreflect isn't enabled by default | |
394 |
|
394 | |||
395 | $ sendhttpraw << EOF |
|
395 | $ sendhttpraw << EOF | |
396 | > httprequest POST api/$HTTPV2/ro/debugreflect |
|
396 | > httprequest POST api/$HTTPV2/ro/debugreflect | |
397 | > user-agent: test |
|
397 | > user-agent: test | |
398 | > EOF |
|
398 | > EOF | |
399 | using raw connection to peer |
|
399 | using raw connection to peer | |
400 |
s> setsockopt(6, 1, 1) -> None ( |
|
400 | s> setsockopt(6, 1, 1) -> None (?) | |
401 |
|
|
401 | s> POST /api/exp-http-v2-0003/ro/debugreflect HTTP/1.1\r\n | |
402 | s> Accept-Encoding: identity\r\n |
|
402 | s> Accept-Encoding: identity\r\n | |
403 | s> user-agent: test\r\n |
|
403 | s> user-agent: test\r\n | |
404 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
404 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
405 | s> \r\n |
|
405 | s> \r\n | |
406 | s> makefile('rb', None) |
|
406 | s> makefile('rb', None) | |
407 | s> HTTP/1.1 404 Not Found\r\n |
|
407 | s> HTTP/1.1 404 Not Found\r\n | |
408 | s> Server: testing stub value\r\n |
|
408 | s> Server: testing stub value\r\n | |
409 | s> Date: $HTTP_DATE$\r\n |
|
409 | s> Date: $HTTP_DATE$\r\n | |
410 | s> Content-Type: text/plain\r\n |
|
410 | s> Content-Type: text/plain\r\n | |
411 | s> Content-Length: 34\r\n |
|
411 | s> Content-Length: 34\r\n | |
412 | s> \r\n |
|
412 | s> \r\n | |
413 | s> debugreflect service not available |
|
413 | s> debugreflect service not available | |
414 |
|
414 | |||
415 | Restart server to get debugreflect endpoint |
|
415 | Restart server to get debugreflect endpoint | |
416 |
|
416 | |||
417 | $ killdaemons.py |
|
417 | $ killdaemons.py | |
418 | $ cat > server/.hg/hgrc << EOF |
|
418 | $ cat > server/.hg/hgrc << EOF | |
419 | > [experimental] |
|
419 | > [experimental] | |
420 | > web.apiserver = true |
|
420 | > web.apiserver = true | |
421 | > web.api.debugreflect = true |
|
421 | > web.api.debugreflect = true | |
422 | > web.api.http-v2 = true |
|
422 | > web.api.http-v2 = true | |
423 | > [web] |
|
423 | > [web] | |
424 | > push_ssl = false |
|
424 | > push_ssl = false | |
425 | > allow-push = * |
|
425 | > allow-push = * | |
426 | > EOF |
|
426 | > EOF | |
427 |
|
427 | |||
428 | $ hg -R server serve -p $HGPORT -d --pid-file hg.pid -E error.log |
|
428 | $ hg -R server serve -p $HGPORT -d --pid-file hg.pid -E error.log | |
429 | $ cat hg.pid > $DAEMON_PIDS |
|
429 | $ cat hg.pid > $DAEMON_PIDS | |
430 |
|
430 | |||
431 | Command frames can be reflected via debugreflect |
|
431 | Command frames can be reflected via debugreflect | |
432 |
|
432 | |||
433 | $ sendhttpraw << EOF |
|
433 | $ sendhttpraw << EOF | |
434 | > httprequest POST api/$HTTPV2/ro/debugreflect |
|
434 | > httprequest POST api/$HTTPV2/ro/debugreflect | |
435 | > accept: $MEDIATYPE |
|
435 | > accept: $MEDIATYPE | |
436 | > content-type: $MEDIATYPE |
|
436 | > content-type: $MEDIATYPE | |
437 | > user-agent: test |
|
437 | > user-agent: test | |
438 | > frame 1 1 stream-begin command-request new cbor:{b'name': b'command1', b'args': {b'foo': b'val1', b'bar1': b'val'}} |
|
438 | > frame 1 1 stream-begin command-request new cbor:{b'name': b'command1', b'args': {b'foo': b'val1', b'bar1': b'val'}} | |
439 | > EOF |
|
439 | > EOF | |
440 | using raw connection to peer |
|
440 | using raw connection to peer | |
441 |
s> setsockopt(6, 1, 1) -> None ( |
|
441 | s> setsockopt(6, 1, 1) -> None (?) | |
442 |
|
|
442 | s> POST /api/exp-http-v2-0003/ro/debugreflect HTTP/1.1\r\n | |
443 | s> Accept-Encoding: identity\r\n |
|
443 | s> Accept-Encoding: identity\r\n | |
444 | s> accept: application/mercurial-exp-framing-0006\r\n |
|
444 | s> accept: application/mercurial-exp-framing-0006\r\n | |
445 | s> content-type: application/mercurial-exp-framing-0006\r\n |
|
445 | s> content-type: application/mercurial-exp-framing-0006\r\n | |
446 | s> user-agent: test\r\n |
|
446 | s> user-agent: test\r\n | |
447 | s> content-length: 47\r\n |
|
447 | s> content-length: 47\r\n | |
448 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
448 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
449 | s> \r\n |
|
449 | s> \r\n | |
450 | s> \'\x00\x00\x01\x00\x01\x01\x11\xa2Dargs\xa2Dbar1CvalCfooDval1DnameHcommand1 |
|
450 | s> \'\x00\x00\x01\x00\x01\x01\x11\xa2Dargs\xa2Dbar1CvalCfooDval1DnameHcommand1 | |
451 | s> makefile('rb', None) |
|
451 | s> makefile('rb', None) | |
452 | s> HTTP/1.1 200 OK\r\n |
|
452 | s> HTTP/1.1 200 OK\r\n | |
453 | s> Server: testing stub value\r\n |
|
453 | s> Server: testing stub value\r\n | |
454 | s> Date: $HTTP_DATE$\r\n |
|
454 | s> Date: $HTTP_DATE$\r\n | |
455 | s> Content-Type: text/plain\r\n |
|
455 | s> Content-Type: text/plain\r\n | |
456 | s> Content-Length: 223\r\n |
|
456 | s> Content-Length: 223\r\n | |
457 | s> \r\n |
|
457 | s> \r\n | |
458 | s> received: 1 1 1 \xa2Dargs\xa2Dbar1CvalCfooDval1DnameHcommand1\n |
|
458 | s> received: 1 1 1 \xa2Dargs\xa2Dbar1CvalCfooDval1DnameHcommand1\n | |
459 | s> ["runcommand", {"args": {"bar1": "val", "foo": "val1"}, "command": "command1", "data": null, "redirect": null, "requestid": 1}]\n |
|
459 | s> ["runcommand", {"args": {"bar1": "val", "foo": "val1"}, "command": "command1", "data": null, "redirect": null, "requestid": 1}]\n | |
460 | s> received: <no frame>\n |
|
460 | s> received: <no frame>\n | |
461 | s> {"action": "noop"} |
|
461 | s> {"action": "noop"} | |
462 |
|
462 | |||
463 | Multiple requests to regular command URL are not allowed |
|
463 | Multiple requests to regular command URL are not allowed | |
464 |
|
464 | |||
465 | $ sendhttpraw << EOF |
|
465 | $ sendhttpraw << EOF | |
466 | > httprequest POST api/$HTTPV2/ro/customreadonly |
|
466 | > httprequest POST api/$HTTPV2/ro/customreadonly | |
467 | > accept: $MEDIATYPE |
|
467 | > accept: $MEDIATYPE | |
468 | > content-type: $MEDIATYPE |
|
468 | > content-type: $MEDIATYPE | |
469 | > user-agent: test |
|
469 | > user-agent: test | |
470 | > frame 1 1 stream-begin command-request new cbor:{b'name': b'customreadonly'} |
|
470 | > frame 1 1 stream-begin command-request new cbor:{b'name': b'customreadonly'} | |
471 | > EOF |
|
471 | > EOF | |
472 | using raw connection to peer |
|
472 | using raw connection to peer | |
473 |
s> setsockopt(6, 1, 1) -> None ( |
|
473 | s> setsockopt(6, 1, 1) -> None (?) | |
474 |
|
|
474 | s> POST /api/exp-http-v2-0003/ro/customreadonly HTTP/1.1\r\n | |
475 | s> Accept-Encoding: identity\r\n |
|
475 | s> Accept-Encoding: identity\r\n | |
476 | s> accept: application/mercurial-exp-framing-0006\r\n |
|
476 | s> accept: application/mercurial-exp-framing-0006\r\n | |
477 | s> content-type: application/mercurial-exp-framing-0006\r\n |
|
477 | s> content-type: application/mercurial-exp-framing-0006\r\n | |
478 | s> user-agent: test\r\n |
|
478 | s> user-agent: test\r\n | |
479 | s> content-length: 29\r\n |
|
479 | s> content-length: 29\r\n | |
480 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
480 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
481 | s> \r\n |
|
481 | s> \r\n | |
482 | s> \x15\x00\x00\x01\x00\x01\x01\x11\xa1DnameNcustomreadonly |
|
482 | s> \x15\x00\x00\x01\x00\x01\x01\x11\xa1DnameNcustomreadonly | |
483 | s> makefile('rb', None) |
|
483 | s> makefile('rb', None) | |
484 | s> HTTP/1.1 200 OK\r\n |
|
484 | s> HTTP/1.1 200 OK\r\n | |
485 | s> Server: testing stub value\r\n |
|
485 | s> Server: testing stub value\r\n | |
486 | s> Date: $HTTP_DATE$\r\n |
|
486 | s> Date: $HTTP_DATE$\r\n | |
487 | s> Content-Type: application/mercurial-exp-framing-0006\r\n |
|
487 | s> Content-Type: application/mercurial-exp-framing-0006\r\n | |
488 | s> Transfer-Encoding: chunked\r\n |
|
488 | s> Transfer-Encoding: chunked\r\n | |
489 | s> \r\n |
|
489 | s> \r\n | |
490 | s> 11\r\n |
|
490 | s> 11\r\n | |
491 | s> \t\x00\x00\x01\x00\x02\x01\x92Hidentity |
|
491 | s> \t\x00\x00\x01\x00\x02\x01\x92Hidentity | |
492 | s> \r\n |
|
492 | s> \r\n | |
493 | s> 13\r\n |
|
493 | s> 13\r\n | |
494 | s> \x0b\x00\x00\x01\x00\x02\x041\xa1FstatusBok |
|
494 | s> \x0b\x00\x00\x01\x00\x02\x041\xa1FstatusBok | |
495 | s> \r\n |
|
495 | s> \r\n | |
496 | s> 27\r\n |
|
496 | s> 27\r\n | |
497 | s> \x1f\x00\x00\x01\x00\x02\x041X\x1dcustomreadonly bytes response |
|
497 | s> \x1f\x00\x00\x01\x00\x02\x041X\x1dcustomreadonly bytes response | |
498 | s> \r\n |
|
498 | s> \r\n | |
499 | s> 8\r\n |
|
499 | s> 8\r\n | |
500 | s> \x00\x00\x00\x01\x00\x02\x002 |
|
500 | s> \x00\x00\x00\x01\x00\x02\x002 | |
501 | s> \r\n |
|
501 | s> \r\n | |
502 | s> 0\r\n |
|
502 | s> 0\r\n | |
503 | s> \r\n |
|
503 | s> \r\n | |
504 |
|
504 | |||
505 | Multiple requests to "multirequest" URL are allowed |
|
505 | Multiple requests to "multirequest" URL are allowed | |
506 |
|
506 | |||
507 | $ sendhttpraw << EOF |
|
507 | $ sendhttpraw << EOF | |
508 | > httprequest POST api/$HTTPV2/ro/multirequest |
|
508 | > httprequest POST api/$HTTPV2/ro/multirequest | |
509 | > accept: $MEDIATYPE |
|
509 | > accept: $MEDIATYPE | |
510 | > content-type: $MEDIATYPE |
|
510 | > content-type: $MEDIATYPE | |
511 | > user-agent: test |
|
511 | > user-agent: test | |
512 | > frame 1 1 stream-begin command-request new cbor:{b'name': b'customreadonly'} |
|
512 | > frame 1 1 stream-begin command-request new cbor:{b'name': b'customreadonly'} | |
513 | > frame 3 1 0 command-request new cbor:{b'name': b'customreadonly'} |
|
513 | > frame 3 1 0 command-request new cbor:{b'name': b'customreadonly'} | |
514 | > EOF |
|
514 | > EOF | |
515 | using raw connection to peer |
|
515 | using raw connection to peer | |
516 |
s> setsockopt(6, 1, 1) -> None ( |
|
516 | s> setsockopt(6, 1, 1) -> None (?) | |
517 |
|
|
517 | s> POST /api/exp-http-v2-0003/ro/multirequest HTTP/1.1\r\n | |
518 | s> Accept-Encoding: identity\r\n |
|
518 | s> Accept-Encoding: identity\r\n | |
519 | s> *\r\n (glob) |
|
519 | s> *\r\n (glob) | |
520 | s> *\r\n (glob) |
|
520 | s> *\r\n (glob) | |
521 | s> user-agent: test\r\n |
|
521 | s> user-agent: test\r\n | |
522 | s> content-length: 58\r\n |
|
522 | s> content-length: 58\r\n | |
523 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
523 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
524 | s> \r\n |
|
524 | s> \r\n | |
525 | s> \x15\x00\x00\x01\x00\x01\x01\x11\xa1DnameNcustomreadonly\x15\x00\x00\x03\x00\x01\x00\x11\xa1DnameNcustomreadonly |
|
525 | s> \x15\x00\x00\x01\x00\x01\x01\x11\xa1DnameNcustomreadonly\x15\x00\x00\x03\x00\x01\x00\x11\xa1DnameNcustomreadonly | |
526 | s> makefile('rb', None) |
|
526 | s> makefile('rb', None) | |
527 | s> HTTP/1.1 200 OK\r\n |
|
527 | s> HTTP/1.1 200 OK\r\n | |
528 | s> Server: testing stub value\r\n |
|
528 | s> Server: testing stub value\r\n | |
529 | s> Date: $HTTP_DATE$\r\n |
|
529 | s> Date: $HTTP_DATE$\r\n | |
530 | s> Content-Type: application/mercurial-exp-framing-0006\r\n |
|
530 | s> Content-Type: application/mercurial-exp-framing-0006\r\n | |
531 | s> Transfer-Encoding: chunked\r\n |
|
531 | s> Transfer-Encoding: chunked\r\n | |
532 | s> \r\n |
|
532 | s> \r\n | |
533 | s> 11\r\n |
|
533 | s> 11\r\n | |
534 | s> \t\x00\x00\x01\x00\x02\x01\x92Hidentity |
|
534 | s> \t\x00\x00\x01\x00\x02\x01\x92Hidentity | |
535 | s> \r\n |
|
535 | s> \r\n | |
536 | s> 13\r\n |
|
536 | s> 13\r\n | |
537 | s> \x0b\x00\x00\x01\x00\x02\x041\xa1FstatusBok |
|
537 | s> \x0b\x00\x00\x01\x00\x02\x041\xa1FstatusBok | |
538 | s> \r\n |
|
538 | s> \r\n | |
539 | s> 27\r\n |
|
539 | s> 27\r\n | |
540 | s> \x1f\x00\x00\x01\x00\x02\x041X\x1dcustomreadonly bytes response |
|
540 | s> \x1f\x00\x00\x01\x00\x02\x041X\x1dcustomreadonly bytes response | |
541 | s> \r\n |
|
541 | s> \r\n | |
542 | s> 8\r\n |
|
542 | s> 8\r\n | |
543 | s> \x00\x00\x00\x01\x00\x02\x002 |
|
543 | s> \x00\x00\x00\x01\x00\x02\x002 | |
544 | s> \r\n |
|
544 | s> \r\n | |
545 | s> 13\r\n |
|
545 | s> 13\r\n | |
546 | s> \x0b\x00\x00\x03\x00\x02\x041\xa1FstatusBok |
|
546 | s> \x0b\x00\x00\x03\x00\x02\x041\xa1FstatusBok | |
547 | s> \r\n |
|
547 | s> \r\n | |
548 | s> 27\r\n |
|
548 | s> 27\r\n | |
549 | s> \x1f\x00\x00\x03\x00\x02\x041X\x1dcustomreadonly bytes response |
|
549 | s> \x1f\x00\x00\x03\x00\x02\x041X\x1dcustomreadonly bytes response | |
550 | s> \r\n |
|
550 | s> \r\n | |
551 | s> 8\r\n |
|
551 | s> 8\r\n | |
552 | s> \x00\x00\x00\x03\x00\x02\x002 |
|
552 | s> \x00\x00\x00\x03\x00\x02\x002 | |
553 | s> \r\n |
|
553 | s> \r\n | |
554 | s> 0\r\n |
|
554 | s> 0\r\n | |
555 | s> \r\n |
|
555 | s> \r\n | |
556 |
|
556 | |||
557 | Interleaved requests to "multirequest" are processed |
|
557 | Interleaved requests to "multirequest" are processed | |
558 |
|
558 | |||
559 | $ sendhttpraw << EOF |
|
559 | $ sendhttpraw << EOF | |
560 | > httprequest POST api/$HTTPV2/ro/multirequest |
|
560 | > httprequest POST api/$HTTPV2/ro/multirequest | |
561 | > accept: $MEDIATYPE |
|
561 | > accept: $MEDIATYPE | |
562 | > content-type: $MEDIATYPE |
|
562 | > content-type: $MEDIATYPE | |
563 | > user-agent: test |
|
563 | > user-agent: test | |
564 | > frame 1 1 stream-begin command-request new|more \xa2Dargs\xa1Inamespace |
|
564 | > frame 1 1 stream-begin command-request new|more \xa2Dargs\xa1Inamespace | |
565 | > frame 3 1 0 command-request new|more \xa2Dargs\xa1Inamespace |
|
565 | > frame 3 1 0 command-request new|more \xa2Dargs\xa1Inamespace | |
566 | > frame 3 1 0 command-request continuation JnamespacesDnameHlistkeys |
|
566 | > frame 3 1 0 command-request continuation JnamespacesDnameHlistkeys | |
567 | > frame 1 1 0 command-request continuation IbookmarksDnameHlistkeys |
|
567 | > frame 1 1 0 command-request continuation IbookmarksDnameHlistkeys | |
568 | > EOF |
|
568 | > EOF | |
569 | using raw connection to peer |
|
569 | using raw connection to peer | |
570 |
s> setsockopt(6, 1, 1) -> None ( |
|
570 | s> setsockopt(6, 1, 1) -> None (?) | |
571 |
|
|
571 | s> POST /api/exp-http-v2-0003/ro/multirequest HTTP/1.1\r\n | |
572 | s> Accept-Encoding: identity\r\n |
|
572 | s> Accept-Encoding: identity\r\n | |
573 | s> accept: application/mercurial-exp-framing-0006\r\n |
|
573 | s> accept: application/mercurial-exp-framing-0006\r\n | |
574 | s> content-type: application/mercurial-exp-framing-0006\r\n |
|
574 | s> content-type: application/mercurial-exp-framing-0006\r\n | |
575 | s> user-agent: test\r\n |
|
575 | s> user-agent: test\r\n | |
576 | s> content-length: 115\r\n |
|
576 | s> content-length: 115\r\n | |
577 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
577 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
578 | s> \r\n |
|
578 | s> \r\n | |
579 | s> \x11\x00\x00\x01\x00\x01\x01\x15\xa2Dargs\xa1Inamespace\x11\x00\x00\x03\x00\x01\x00\x15\xa2Dargs\xa1Inamespace\x19\x00\x00\x03\x00\x01\x00\x12JnamespacesDnameHlistkeys\x18\x00\x00\x01\x00\x01\x00\x12IbookmarksDnameHlistkeys |
|
579 | s> \x11\x00\x00\x01\x00\x01\x01\x15\xa2Dargs\xa1Inamespace\x11\x00\x00\x03\x00\x01\x00\x15\xa2Dargs\xa1Inamespace\x19\x00\x00\x03\x00\x01\x00\x12JnamespacesDnameHlistkeys\x18\x00\x00\x01\x00\x01\x00\x12IbookmarksDnameHlistkeys | |
580 | s> makefile('rb', None) |
|
580 | s> makefile('rb', None) | |
581 | s> HTTP/1.1 200 OK\r\n |
|
581 | s> HTTP/1.1 200 OK\r\n | |
582 | s> Server: testing stub value\r\n |
|
582 | s> Server: testing stub value\r\n | |
583 | s> Date: $HTTP_DATE$\r\n |
|
583 | s> Date: $HTTP_DATE$\r\n | |
584 | s> Content-Type: application/mercurial-exp-framing-0006\r\n |
|
584 | s> Content-Type: application/mercurial-exp-framing-0006\r\n | |
585 | s> Transfer-Encoding: chunked\r\n |
|
585 | s> Transfer-Encoding: chunked\r\n | |
586 | s> \r\n |
|
586 | s> \r\n | |
587 | s> 11\r\n |
|
587 | s> 11\r\n | |
588 | s> \t\x00\x00\x03\x00\x02\x01\x92Hidentity |
|
588 | s> \t\x00\x00\x03\x00\x02\x01\x92Hidentity | |
589 | s> \r\n |
|
589 | s> \r\n | |
590 | s> 13\r\n |
|
590 | s> 13\r\n | |
591 | s> \x0b\x00\x00\x03\x00\x02\x041\xa1FstatusBok |
|
591 | s> \x0b\x00\x00\x03\x00\x02\x041\xa1FstatusBok | |
592 | s> \r\n |
|
592 | s> \r\n | |
593 | s> 28\r\n |
|
593 | s> 28\r\n | |
594 | s> \x00\x00\x03\x00\x02\x041\xa3Ibookmarks@Jnamespaces@Fphases@ |
|
594 | s> \x00\x00\x03\x00\x02\x041\xa3Ibookmarks@Jnamespaces@Fphases@ | |
595 | s> \r\n |
|
595 | s> \r\n | |
596 | s> 8\r\n |
|
596 | s> 8\r\n | |
597 | s> \x00\x00\x00\x03\x00\x02\x002 |
|
597 | s> \x00\x00\x00\x03\x00\x02\x002 | |
598 | s> \r\n |
|
598 | s> \r\n | |
599 | s> 13\r\n |
|
599 | s> 13\r\n | |
600 | s> \x0b\x00\x00\x01\x00\x02\x041\xa1FstatusBok |
|
600 | s> \x0b\x00\x00\x01\x00\x02\x041\xa1FstatusBok | |
601 | s> \r\n |
|
601 | s> \r\n | |
602 | s> 9\r\n |
|
602 | s> 9\r\n | |
603 | s> \x01\x00\x00\x01\x00\x02\x041\xa0 |
|
603 | s> \x01\x00\x00\x01\x00\x02\x041\xa0 | |
604 | s> \r\n |
|
604 | s> \r\n | |
605 | s> 8\r\n |
|
605 | s> 8\r\n | |
606 | s> \x00\x00\x00\x01\x00\x02\x002 |
|
606 | s> \x00\x00\x00\x01\x00\x02\x002 | |
607 | s> \r\n |
|
607 | s> \r\n | |
608 | s> 0\r\n |
|
608 | s> 0\r\n | |
609 | s> \r\n |
|
609 | s> \r\n | |
610 |
|
610 | |||
611 | Restart server to disable read-write access |
|
611 | Restart server to disable read-write access | |
612 |
|
612 | |||
613 | $ killdaemons.py |
|
613 | $ killdaemons.py | |
614 | $ cat > server/.hg/hgrc << EOF |
|
614 | $ cat > server/.hg/hgrc << EOF | |
615 | > [experimental] |
|
615 | > [experimental] | |
616 | > web.apiserver = true |
|
616 | > web.apiserver = true | |
617 | > web.api.debugreflect = true |
|
617 | > web.api.debugreflect = true | |
618 | > web.api.http-v2 = true |
|
618 | > web.api.http-v2 = true | |
619 | > [web] |
|
619 | > [web] | |
620 | > push_ssl = false |
|
620 | > push_ssl = false | |
621 | > EOF |
|
621 | > EOF | |
622 |
|
622 | |||
623 | $ hg -R server serve -p $HGPORT -d --pid-file hg.pid -E error.log |
|
623 | $ hg -R server serve -p $HGPORT -d --pid-file hg.pid -E error.log | |
624 | $ cat hg.pid > $DAEMON_PIDS |
|
624 | $ cat hg.pid > $DAEMON_PIDS | |
625 |
|
625 | |||
626 | Attempting to run a read-write command via multirequest on read-only URL is not allowed |
|
626 | Attempting to run a read-write command via multirequest on read-only URL is not allowed | |
627 |
|
627 | |||
628 | $ sendhttpraw << EOF |
|
628 | $ sendhttpraw << EOF | |
629 | > httprequest POST api/$HTTPV2/ro/multirequest |
|
629 | > httprequest POST api/$HTTPV2/ro/multirequest | |
630 | > accept: $MEDIATYPE |
|
630 | > accept: $MEDIATYPE | |
631 | > content-type: $MEDIATYPE |
|
631 | > content-type: $MEDIATYPE | |
632 | > user-agent: test |
|
632 | > user-agent: test | |
633 | > frame 1 1 stream-begin command-request new cbor:{b'name': b'pushkey'} |
|
633 | > frame 1 1 stream-begin command-request new cbor:{b'name': b'pushkey'} | |
634 | > EOF |
|
634 | > EOF | |
635 | using raw connection to peer |
|
635 | using raw connection to peer | |
636 |
s> setsockopt(6, 1, 1) -> None ( |
|
636 | s> setsockopt(6, 1, 1) -> None (?) | |
637 |
|
|
637 | s> POST /api/exp-http-v2-0003/ro/multirequest HTTP/1.1\r\n | |
638 | s> Accept-Encoding: identity\r\n |
|
638 | s> Accept-Encoding: identity\r\n | |
639 | s> accept: application/mercurial-exp-framing-0006\r\n |
|
639 | s> accept: application/mercurial-exp-framing-0006\r\n | |
640 | s> content-type: application/mercurial-exp-framing-0006\r\n |
|
640 | s> content-type: application/mercurial-exp-framing-0006\r\n | |
641 | s> user-agent: test\r\n |
|
641 | s> user-agent: test\r\n | |
642 | s> content-length: 22\r\n |
|
642 | s> content-length: 22\r\n | |
643 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
643 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
644 | s> \r\n |
|
644 | s> \r\n | |
645 | s> \x0e\x00\x00\x01\x00\x01\x01\x11\xa1DnameGpushkey |
|
645 | s> \x0e\x00\x00\x01\x00\x01\x01\x11\xa1DnameGpushkey | |
646 | s> makefile('rb', None) |
|
646 | s> makefile('rb', None) | |
647 | s> HTTP/1.1 403 Forbidden\r\n |
|
647 | s> HTTP/1.1 403 Forbidden\r\n | |
648 | s> Server: testing stub value\r\n |
|
648 | s> Server: testing stub value\r\n | |
649 | s> Date: $HTTP_DATE$\r\n |
|
649 | s> Date: $HTTP_DATE$\r\n | |
650 | s> Content-Type: text/plain\r\n |
|
650 | s> Content-Type: text/plain\r\n | |
651 | s> Content-Length: 52\r\n |
|
651 | s> Content-Length: 52\r\n | |
652 | s> \r\n |
|
652 | s> \r\n | |
653 | s> insufficient permissions to execute command: pushkey |
|
653 | s> insufficient permissions to execute command: pushkey | |
654 |
|
654 | |||
655 | Defining an invalid content encoding results in warning |
|
655 | Defining an invalid content encoding results in warning | |
656 |
|
656 | |||
657 | $ hg --config experimental.httppeer.v2-encoder-order=identity,badencoder --verbose debugwireproto --nologhandshake --peer http2 http://$LOCALIP:$HGPORT/ << EOF |
|
657 | $ hg --config experimental.httppeer.v2-encoder-order=identity,badencoder --verbose debugwireproto --nologhandshake --peer http2 http://$LOCALIP:$HGPORT/ << EOF | |
658 | > command heads |
|
658 | > command heads | |
659 | > EOF |
|
659 | > EOF | |
660 | creating http peer for wire protocol version 2 |
|
660 | creating http peer for wire protocol version 2 | |
661 | sending heads command |
|
661 | sending heads command | |
662 | wire protocol version 2 encoder referenced in config (badencoder) is not known; ignoring |
|
662 | wire protocol version 2 encoder referenced in config (badencoder) is not known; ignoring | |
663 |
s> setsockopt(6, 1, 1) -> None ( |
|
663 | s> setsockopt(6, 1, 1) -> None (?) | |
664 |
|
|
664 | s> POST /api/exp-http-v2-0003/ro/heads HTTP/1.1\r\n | |
665 | s> Accept-Encoding: identity\r\n |
|
665 | s> Accept-Encoding: identity\r\n | |
666 | s> accept: application/mercurial-exp-framing-0006\r\n |
|
666 | s> accept: application/mercurial-exp-framing-0006\r\n | |
667 | s> content-type: application/mercurial-exp-framing-0006\r\n |
|
667 | s> content-type: application/mercurial-exp-framing-0006\r\n | |
668 | s> content-length: 56\r\n |
|
668 | s> content-length: 56\r\n | |
669 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
669 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
670 | s> user-agent: Mercurial debugwireproto\r\n |
|
670 | s> user-agent: Mercurial debugwireproto\r\n | |
671 | s> \r\n |
|
671 | s> \r\n | |
672 | s> \x1c\x00\x00\x01\x00\x01\x01\x82\xa1Pcontentencodings\x81Hidentity\x0c\x00\x00\x01\x00\x01\x00\x11\xa1DnameEheads |
|
672 | s> \x1c\x00\x00\x01\x00\x01\x01\x82\xa1Pcontentencodings\x81Hidentity\x0c\x00\x00\x01\x00\x01\x00\x11\xa1DnameEheads | |
673 | s> makefile('rb', None) |
|
673 | s> makefile('rb', None) | |
674 | s> HTTP/1.1 200 OK\r\n |
|
674 | s> HTTP/1.1 200 OK\r\n | |
675 | s> Server: testing stub value\r\n |
|
675 | s> Server: testing stub value\r\n | |
676 | s> Date: $HTTP_DATE$\r\n |
|
676 | s> Date: $HTTP_DATE$\r\n | |
677 | s> Content-Type: application/mercurial-exp-framing-0006\r\n |
|
677 | s> Content-Type: application/mercurial-exp-framing-0006\r\n | |
678 | s> Transfer-Encoding: chunked\r\n |
|
678 | s> Transfer-Encoding: chunked\r\n | |
679 | s> \r\n |
|
679 | s> \r\n | |
680 | s> 11\r\n |
|
680 | s> 11\r\n | |
681 | s> \t\x00\x00\x01\x00\x02\x01\x92 |
|
681 | s> \t\x00\x00\x01\x00\x02\x01\x92 | |
682 | s> Hidentity |
|
682 | s> Hidentity | |
683 | s> \r\n |
|
683 | s> \r\n | |
684 | s> 13\r\n |
|
684 | s> 13\r\n | |
685 | s> \x0b\x00\x00\x01\x00\x02\x041 |
|
685 | s> \x0b\x00\x00\x01\x00\x02\x041 | |
686 | s> \xa1FstatusBok |
|
686 | s> \xa1FstatusBok | |
687 | s> \r\n |
|
687 | s> \r\n | |
688 | s> 1e\r\n |
|
688 | s> 1e\r\n | |
689 | s> \x16\x00\x00\x01\x00\x02\x041 |
|
689 | s> \x16\x00\x00\x01\x00\x02\x041 | |
690 | s> \x81T\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00 |
|
690 | s> \x81T\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00 | |
691 | s> \r\n |
|
691 | s> \r\n | |
692 | s> 8\r\n |
|
692 | s> 8\r\n | |
693 | s> \x00\x00\x00\x01\x00\x02\x002 |
|
693 | s> \x00\x00\x00\x01\x00\x02\x002 | |
694 | s> \r\n |
|
694 | s> \r\n | |
695 | s> 0\r\n |
|
695 | s> 0\r\n | |
696 | s> \r\n |
|
696 | s> \r\n | |
697 | response: [ |
|
697 | response: [ | |
698 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' |
|
698 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' | |
699 | ] |
|
699 | ] | |
700 | (sent 2 HTTP requests and * bytes; received * bytes in responses) (glob) |
|
700 | (sent 2 HTTP requests and * bytes; received * bytes in responses) (glob) | |
701 |
|
701 | |||
702 | #if zstd |
|
702 | #if zstd | |
703 |
|
703 | |||
704 | $ hg --verbose debugwireproto --nologhandshake --peer http2 http://$LOCALIP:$HGPORT/ << EOF |
|
704 | $ hg --verbose debugwireproto --nologhandshake --peer http2 http://$LOCALIP:$HGPORT/ << EOF | |
705 | > command heads |
|
705 | > command heads | |
706 | > EOF |
|
706 | > EOF | |
707 | creating http peer for wire protocol version 2 |
|
707 | creating http peer for wire protocol version 2 | |
708 | sending heads command |
|
708 | sending heads command | |
709 |
s> setsockopt(6, 1, 1) -> None ( |
|
709 | s> setsockopt(6, 1, 1) -> None (?) | |
710 |
|
|
710 | s> POST /api/exp-http-v2-0003/ro/heads HTTP/1.1\r\n | |
711 | s> Accept-Encoding: identity\r\n |
|
711 | s> Accept-Encoding: identity\r\n | |
712 | s> accept: application/mercurial-exp-framing-0006\r\n |
|
712 | s> accept: application/mercurial-exp-framing-0006\r\n | |
713 | s> content-type: application/mercurial-exp-framing-0006\r\n |
|
713 | s> content-type: application/mercurial-exp-framing-0006\r\n | |
714 | s> content-length: 70\r\n |
|
714 | s> content-length: 70\r\n | |
715 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
715 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
716 | s> user-agent: Mercurial debugwireproto\r\n |
|
716 | s> user-agent: Mercurial debugwireproto\r\n | |
717 | s> \r\n |
|
717 | s> \r\n | |
718 | s> *\x00\x00\x01\x00\x01\x01\x82\xa1Pcontentencodings\x83Hzstd-8mbDzlibHidentity\x0c\x00\x00\x01\x00\x01\x00\x11\xa1DnameEheads |
|
718 | s> *\x00\x00\x01\x00\x01\x01\x82\xa1Pcontentencodings\x83Hzstd-8mbDzlibHidentity\x0c\x00\x00\x01\x00\x01\x00\x11\xa1DnameEheads | |
719 | s> makefile('rb', None) |
|
719 | s> makefile('rb', None) | |
720 | s> HTTP/1.1 200 OK\r\n |
|
720 | s> HTTP/1.1 200 OK\r\n | |
721 | s> Server: testing stub value\r\n |
|
721 | s> Server: testing stub value\r\n | |
722 | s> Date: $HTTP_DATE$\r\n |
|
722 | s> Date: $HTTP_DATE$\r\n | |
723 | s> Content-Type: application/mercurial-exp-framing-0006\r\n |
|
723 | s> Content-Type: application/mercurial-exp-framing-0006\r\n | |
724 | s> Transfer-Encoding: chunked\r\n |
|
724 | s> Transfer-Encoding: chunked\r\n | |
725 | s> \r\n |
|
725 | s> \r\n | |
726 | s> 11\r\n |
|
726 | s> 11\r\n | |
727 | s> \t\x00\x00\x01\x00\x02\x01\x92 |
|
727 | s> \t\x00\x00\x01\x00\x02\x01\x92 | |
728 | s> Hzstd-8mb |
|
728 | s> Hzstd-8mb | |
729 | s> \r\n |
|
729 | s> \r\n | |
730 | s> 25\r\n |
|
730 | s> 25\r\n | |
731 | s> \x1d\x00\x00\x01\x00\x02\x042 |
|
731 | s> \x1d\x00\x00\x01\x00\x02\x042 | |
732 | s> (\xb5/\xfd\x00P\xa4\x00\x00p\xa1FstatusBok\x81T\x00\x01\x00\tP\x02 |
|
732 | s> (\xb5/\xfd\x00P\xa4\x00\x00p\xa1FstatusBok\x81T\x00\x01\x00\tP\x02 | |
733 | s> \r\n |
|
733 | s> \r\n | |
734 | s> 0\r\n |
|
734 | s> 0\r\n | |
735 | s> \r\n |
|
735 | s> \r\n | |
736 | response: [ |
|
736 | response: [ | |
737 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' |
|
737 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' | |
738 | ] |
|
738 | ] | |
739 | (sent 2 HTTP requests and * bytes; received * bytes in responses) (glob) |
|
739 | (sent 2 HTTP requests and * bytes; received * bytes in responses) (glob) | |
740 |
|
740 | |||
741 | #endif |
|
741 | #endif | |
742 |
|
742 | |||
743 | $ cat error.log |
|
743 | $ cat error.log |
@@ -1,299 +1,299 b'' | |||||
1 | #require no-chg |
|
1 | #require no-chg | |
2 |
|
2 | |||
3 | $ send() { |
|
3 | $ send() { | |
4 | > hg --verbose debugwireproto --peer raw http://$LOCALIP:$HGPORT/ |
|
4 | > hg --verbose debugwireproto --peer raw http://$LOCALIP:$HGPORT/ | |
5 | > } |
|
5 | > } | |
6 |
|
6 | |||
7 | $ hg init server |
|
7 | $ hg init server | |
8 | $ hg -R server serve -p $HGPORT -d --pid-file hg.pid |
|
8 | $ hg -R server serve -p $HGPORT -d --pid-file hg.pid | |
9 | $ cat hg.pid > $DAEMON_PIDS |
|
9 | $ cat hg.pid > $DAEMON_PIDS | |
10 |
|
10 | |||
11 | Request to /api fails unless web.apiserver is enabled |
|
11 | Request to /api fails unless web.apiserver is enabled | |
12 |
|
12 | |||
13 | $ get-with-headers.py $LOCALIP:$HGPORT api |
|
13 | $ get-with-headers.py $LOCALIP:$HGPORT api | |
14 | 400 no such method: api |
|
14 | 400 no such method: api | |
15 |
|
15 | |||
16 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
|
16 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> | |
17 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> |
|
17 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> | |
18 | <head> |
|
18 | <head> | |
19 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> |
|
19 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> | |
20 | <meta name="robots" content="index, nofollow" /> |
|
20 | <meta name="robots" content="index, nofollow" /> | |
21 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> |
|
21 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> | |
22 | <script type="text/javascript" src="/static/mercurial.js"></script> |
|
22 | <script type="text/javascript" src="/static/mercurial.js"></script> | |
23 |
|
23 | |||
24 | <title>$TESTTMP/server: error</title> |
|
24 | <title>$TESTTMP/server: error</title> | |
25 | </head> |
|
25 | </head> | |
26 | <body> |
|
26 | <body> | |
27 |
|
27 | |||
28 | <div class="container"> |
|
28 | <div class="container"> | |
29 | <div class="menu"> |
|
29 | <div class="menu"> | |
30 | <div class="logo"> |
|
30 | <div class="logo"> | |
31 | <a href="https://mercurial-scm.org/"> |
|
31 | <a href="https://mercurial-scm.org/"> | |
32 | <img src="/static/hglogo.png" width=75 height=90 border=0 alt="mercurial" /></a> |
|
32 | <img src="/static/hglogo.png" width=75 height=90 border=0 alt="mercurial" /></a> | |
33 | </div> |
|
33 | </div> | |
34 | <ul> |
|
34 | <ul> | |
35 | <li><a href="/shortlog">log</a></li> |
|
35 | <li><a href="/shortlog">log</a></li> | |
36 | <li><a href="/graph">graph</a></li> |
|
36 | <li><a href="/graph">graph</a></li> | |
37 | <li><a href="/tags">tags</a></li> |
|
37 | <li><a href="/tags">tags</a></li> | |
38 | <li><a href="/bookmarks">bookmarks</a></li> |
|
38 | <li><a href="/bookmarks">bookmarks</a></li> | |
39 | <li><a href="/branches">branches</a></li> |
|
39 | <li><a href="/branches">branches</a></li> | |
40 | </ul> |
|
40 | </ul> | |
41 | <ul> |
|
41 | <ul> | |
42 | <li><a href="/help">help</a></li> |
|
42 | <li><a href="/help">help</a></li> | |
43 | </ul> |
|
43 | </ul> | |
44 | </div> |
|
44 | </div> | |
45 |
|
45 | |||
46 | <div class="main"> |
|
46 | <div class="main"> | |
47 |
|
47 | |||
48 | <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> |
|
48 | <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> | |
49 | <h3>error</h3> |
|
49 | <h3>error</h3> | |
50 |
|
50 | |||
51 |
|
51 | |||
52 | <form class="search" action="/log"> |
|
52 | <form class="search" action="/log"> | |
53 |
|
53 | |||
54 | <p><input name="rev" id="search1" type="text" size="30" value="" /></p> |
|
54 | <p><input name="rev" id="search1" type="text" size="30" value="" /></p> | |
55 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision |
|
55 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision | |
56 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> |
|
56 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> | |
57 | </form> |
|
57 | </form> | |
58 |
|
58 | |||
59 | <div class="description"> |
|
59 | <div class="description"> | |
60 | <p> |
|
60 | <p> | |
61 | An error occurred while processing your request: |
|
61 | An error occurred while processing your request: | |
62 | </p> |
|
62 | </p> | |
63 | <p> |
|
63 | <p> | |
64 | no such method: api |
|
64 | no such method: api | |
65 | </p> |
|
65 | </p> | |
66 | </div> |
|
66 | </div> | |
67 | </div> |
|
67 | </div> | |
68 | </div> |
|
68 | </div> | |
69 |
|
69 | |||
70 |
|
70 | |||
71 |
|
71 | |||
72 | </body> |
|
72 | </body> | |
73 | </html> |
|
73 | </html> | |
74 |
|
74 | |||
75 | [1] |
|
75 | [1] | |
76 |
|
76 | |||
77 | $ get-with-headers.py $LOCALIP:$HGPORT api/ |
|
77 | $ get-with-headers.py $LOCALIP:$HGPORT api/ | |
78 | 400 no such method: api |
|
78 | 400 no such method: api | |
79 |
|
79 | |||
80 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
|
80 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> | |
81 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> |
|
81 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> | |
82 | <head> |
|
82 | <head> | |
83 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> |
|
83 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> | |
84 | <meta name="robots" content="index, nofollow" /> |
|
84 | <meta name="robots" content="index, nofollow" /> | |
85 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> |
|
85 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> | |
86 | <script type="text/javascript" src="/static/mercurial.js"></script> |
|
86 | <script type="text/javascript" src="/static/mercurial.js"></script> | |
87 |
|
87 | |||
88 | <title>$TESTTMP/server: error</title> |
|
88 | <title>$TESTTMP/server: error</title> | |
89 | </head> |
|
89 | </head> | |
90 | <body> |
|
90 | <body> | |
91 |
|
91 | |||
92 | <div class="container"> |
|
92 | <div class="container"> | |
93 | <div class="menu"> |
|
93 | <div class="menu"> | |
94 | <div class="logo"> |
|
94 | <div class="logo"> | |
95 | <a href="https://mercurial-scm.org/"> |
|
95 | <a href="https://mercurial-scm.org/"> | |
96 | <img src="/static/hglogo.png" width=75 height=90 border=0 alt="mercurial" /></a> |
|
96 | <img src="/static/hglogo.png" width=75 height=90 border=0 alt="mercurial" /></a> | |
97 | </div> |
|
97 | </div> | |
98 | <ul> |
|
98 | <ul> | |
99 | <li><a href="/shortlog">log</a></li> |
|
99 | <li><a href="/shortlog">log</a></li> | |
100 | <li><a href="/graph">graph</a></li> |
|
100 | <li><a href="/graph">graph</a></li> | |
101 | <li><a href="/tags">tags</a></li> |
|
101 | <li><a href="/tags">tags</a></li> | |
102 | <li><a href="/bookmarks">bookmarks</a></li> |
|
102 | <li><a href="/bookmarks">bookmarks</a></li> | |
103 | <li><a href="/branches">branches</a></li> |
|
103 | <li><a href="/branches">branches</a></li> | |
104 | </ul> |
|
104 | </ul> | |
105 | <ul> |
|
105 | <ul> | |
106 | <li><a href="/help">help</a></li> |
|
106 | <li><a href="/help">help</a></li> | |
107 | </ul> |
|
107 | </ul> | |
108 | </div> |
|
108 | </div> | |
109 |
|
109 | |||
110 | <div class="main"> |
|
110 | <div class="main"> | |
111 |
|
111 | |||
112 | <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> |
|
112 | <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> | |
113 | <h3>error</h3> |
|
113 | <h3>error</h3> | |
114 |
|
114 | |||
115 |
|
115 | |||
116 | <form class="search" action="/log"> |
|
116 | <form class="search" action="/log"> | |
117 |
|
117 | |||
118 | <p><input name="rev" id="search1" type="text" size="30" value="" /></p> |
|
118 | <p><input name="rev" id="search1" type="text" size="30" value="" /></p> | |
119 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision |
|
119 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision | |
120 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> |
|
120 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> | |
121 | </form> |
|
121 | </form> | |
122 |
|
122 | |||
123 | <div class="description"> |
|
123 | <div class="description"> | |
124 | <p> |
|
124 | <p> | |
125 | An error occurred while processing your request: |
|
125 | An error occurred while processing your request: | |
126 | </p> |
|
126 | </p> | |
127 | <p> |
|
127 | <p> | |
128 | no such method: api |
|
128 | no such method: api | |
129 | </p> |
|
129 | </p> | |
130 | </div> |
|
130 | </div> | |
131 | </div> |
|
131 | </div> | |
132 | </div> |
|
132 | </div> | |
133 |
|
133 | |||
134 |
|
134 | |||
135 |
|
135 | |||
136 | </body> |
|
136 | </body> | |
137 | </html> |
|
137 | </html> | |
138 |
|
138 | |||
139 | [1] |
|
139 | [1] | |
140 |
|
140 | |||
141 | Restart server with support for API server |
|
141 | Restart server with support for API server | |
142 |
|
142 | |||
143 | $ killdaemons.py |
|
143 | $ killdaemons.py | |
144 | $ cat > server/.hg/hgrc << EOF |
|
144 | $ cat > server/.hg/hgrc << EOF | |
145 | > [experimental] |
|
145 | > [experimental] | |
146 | > web.apiserver = true |
|
146 | > web.apiserver = true | |
147 | > EOF |
|
147 | > EOF | |
148 |
|
148 | |||
149 | $ hg -R server serve -p $HGPORT -d --pid-file hg.pid |
|
149 | $ hg -R server serve -p $HGPORT -d --pid-file hg.pid | |
150 | $ cat hg.pid > $DAEMON_PIDS |
|
150 | $ cat hg.pid > $DAEMON_PIDS | |
151 |
|
151 | |||
152 | /api lists available APIs (empty since none are available by default) |
|
152 | /api lists available APIs (empty since none are available by default) | |
153 |
|
153 | |||
154 | $ send << EOF |
|
154 | $ send << EOF | |
155 | > httprequest GET api |
|
155 | > httprequest GET api | |
156 | > user-agent: test |
|
156 | > user-agent: test | |
157 | > EOF |
|
157 | > EOF | |
158 | using raw connection to peer |
|
158 | using raw connection to peer | |
159 |
s> setsockopt(6, 1, 1) -> None ( |
|
159 | s> setsockopt(6, 1, 1) -> None (?) | |
160 | s> GET /api HTTP/1.1\r\n |
|
160 | s> GET /api HTTP/1.1\r\n | |
161 | s> Accept-Encoding: identity\r\n |
|
161 | s> Accept-Encoding: identity\r\n | |
162 | s> user-agent: test\r\n |
|
162 | s> user-agent: test\r\n | |
163 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
163 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
164 | s> \r\n |
|
164 | s> \r\n | |
165 | s> makefile('rb', None) |
|
165 | s> makefile('rb', None) | |
166 | s> HTTP/1.1 200 OK\r\n |
|
166 | s> HTTP/1.1 200 OK\r\n | |
167 | s> Server: testing stub value\r\n |
|
167 | s> Server: testing stub value\r\n | |
168 | s> Date: $HTTP_DATE$\r\n |
|
168 | s> Date: $HTTP_DATE$\r\n | |
169 | s> Content-Type: text/plain\r\n |
|
169 | s> Content-Type: text/plain\r\n | |
170 | s> Content-Length: 100\r\n |
|
170 | s> Content-Length: 100\r\n | |
171 | s> \r\n |
|
171 | s> \r\n | |
172 | s> APIs can be accessed at /api/<name>, where <name> can be one of the following:\n |
|
172 | s> APIs can be accessed at /api/<name>, where <name> can be one of the following:\n | |
173 | s> \n |
|
173 | s> \n | |
174 | s> (no available APIs)\n |
|
174 | s> (no available APIs)\n | |
175 |
|
175 | |||
176 | $ send << EOF |
|
176 | $ send << EOF | |
177 | > httprequest GET api/ |
|
177 | > httprequest GET api/ | |
178 | > user-agent: test |
|
178 | > user-agent: test | |
179 | > EOF |
|
179 | > EOF | |
180 | using raw connection to peer |
|
180 | using raw connection to peer | |
181 |
s> setsockopt(6, 1, 1) -> None ( |
|
181 | s> setsockopt(6, 1, 1) -> None (?) | |
182 | s> GET /api/ HTTP/1.1\r\n |
|
182 | s> GET /api/ HTTP/1.1\r\n | |
183 | s> Accept-Encoding: identity\r\n |
|
183 | s> Accept-Encoding: identity\r\n | |
184 | s> user-agent: test\r\n |
|
184 | s> user-agent: test\r\n | |
185 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
185 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
186 | s> \r\n |
|
186 | s> \r\n | |
187 | s> makefile('rb', None) |
|
187 | s> makefile('rb', None) | |
188 | s> HTTP/1.1 200 OK\r\n |
|
188 | s> HTTP/1.1 200 OK\r\n | |
189 | s> Server: testing stub value\r\n |
|
189 | s> Server: testing stub value\r\n | |
190 | s> Date: $HTTP_DATE$\r\n |
|
190 | s> Date: $HTTP_DATE$\r\n | |
191 | s> Content-Type: text/plain\r\n |
|
191 | s> Content-Type: text/plain\r\n | |
192 | s> Content-Length: 100\r\n |
|
192 | s> Content-Length: 100\r\n | |
193 | s> \r\n |
|
193 | s> \r\n | |
194 | s> APIs can be accessed at /api/<name>, where <name> can be one of the following:\n |
|
194 | s> APIs can be accessed at /api/<name>, where <name> can be one of the following:\n | |
195 | s> \n |
|
195 | s> \n | |
196 | s> (no available APIs)\n |
|
196 | s> (no available APIs)\n | |
197 |
|
197 | |||
198 | Accessing an unknown API yields a 404 |
|
198 | Accessing an unknown API yields a 404 | |
199 |
|
199 | |||
200 | $ send << EOF |
|
200 | $ send << EOF | |
201 | > httprequest GET api/unknown |
|
201 | > httprequest GET api/unknown | |
202 | > user-agent: test |
|
202 | > user-agent: test | |
203 | > EOF |
|
203 | > EOF | |
204 | using raw connection to peer |
|
204 | using raw connection to peer | |
205 |
s> setsockopt(6, 1, 1) -> None ( |
|
205 | s> setsockopt(6, 1, 1) -> None (?) | |
206 | s> GET /api/unknown HTTP/1.1\r\n |
|
206 | s> GET /api/unknown HTTP/1.1\r\n | |
207 | s> Accept-Encoding: identity\r\n |
|
207 | s> Accept-Encoding: identity\r\n | |
208 | s> user-agent: test\r\n |
|
208 | s> user-agent: test\r\n | |
209 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
209 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
210 | s> \r\n |
|
210 | s> \r\n | |
211 | s> makefile('rb', None) |
|
211 | s> makefile('rb', None) | |
212 | s> HTTP/1.1 404 Not Found\r\n |
|
212 | s> HTTP/1.1 404 Not Found\r\n | |
213 | s> Server: testing stub value\r\n |
|
213 | s> Server: testing stub value\r\n | |
214 | s> Date: $HTTP_DATE$\r\n |
|
214 | s> Date: $HTTP_DATE$\r\n | |
215 | s> Content-Type: text/plain\r\n |
|
215 | s> Content-Type: text/plain\r\n | |
216 | s> Content-Length: 33\r\n |
|
216 | s> Content-Length: 33\r\n | |
217 | s> \r\n |
|
217 | s> \r\n | |
218 | s> Unknown API: unknown\n |
|
218 | s> Unknown API: unknown\n | |
219 | s> Known APIs: |
|
219 | s> Known APIs: | |
220 |
|
220 | |||
221 | Accessing a known but not enabled API yields a different error |
|
221 | Accessing a known but not enabled API yields a different error | |
222 |
|
222 | |||
223 | $ send << EOF |
|
223 | $ send << EOF | |
224 | > httprequest GET api/exp-http-v2-0003 |
|
224 | > httprequest GET api/exp-http-v2-0003 | |
225 | > user-agent: test |
|
225 | > user-agent: test | |
226 | > EOF |
|
226 | > EOF | |
227 | using raw connection to peer |
|
227 | using raw connection to peer | |
228 |
s> setsockopt(6, 1, 1) -> None ( |
|
228 | s> setsockopt(6, 1, 1) -> None (?) | |
229 | s> GET /api/exp-http-v2-0003 HTTP/1.1\r\n |
|
229 | s> GET /api/exp-http-v2-0003 HTTP/1.1\r\n | |
230 | s> Accept-Encoding: identity\r\n |
|
230 | s> Accept-Encoding: identity\r\n | |
231 | s> user-agent: test\r\n |
|
231 | s> user-agent: test\r\n | |
232 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
232 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
233 | s> \r\n |
|
233 | s> \r\n | |
234 | s> makefile('rb', None) |
|
234 | s> makefile('rb', None) | |
235 | s> HTTP/1.1 404 Not Found\r\n |
|
235 | s> HTTP/1.1 404 Not Found\r\n | |
236 | s> Server: testing stub value\r\n |
|
236 | s> Server: testing stub value\r\n | |
237 | s> Date: $HTTP_DATE$\r\n |
|
237 | s> Date: $HTTP_DATE$\r\n | |
238 | s> Content-Type: text/plain\r\n |
|
238 | s> Content-Type: text/plain\r\n | |
239 | s> Content-Length: 33\r\n |
|
239 | s> Content-Length: 33\r\n | |
240 | s> \r\n |
|
240 | s> \r\n | |
241 | s> API exp-http-v2-0003 not enabled\n |
|
241 | s> API exp-http-v2-0003 not enabled\n | |
242 |
|
242 | |||
243 | Restart server with support for HTTP v2 API |
|
243 | Restart server with support for HTTP v2 API | |
244 |
|
244 | |||
245 | $ killdaemons.py |
|
245 | $ killdaemons.py | |
246 | $ cat > server/.hg/hgrc << EOF |
|
246 | $ cat > server/.hg/hgrc << EOF | |
247 | > [experimental] |
|
247 | > [experimental] | |
248 | > web.apiserver = true |
|
248 | > web.apiserver = true | |
249 | > web.api.http-v2 = true |
|
249 | > web.api.http-v2 = true | |
250 | > EOF |
|
250 | > EOF | |
251 |
|
251 | |||
252 | $ hg -R server serve -p $HGPORT -d --pid-file hg.pid |
|
252 | $ hg -R server serve -p $HGPORT -d --pid-file hg.pid | |
253 | $ cat hg.pid > $DAEMON_PIDS |
|
253 | $ cat hg.pid > $DAEMON_PIDS | |
254 |
|
254 | |||
255 | /api lists the HTTP v2 protocol as available |
|
255 | /api lists the HTTP v2 protocol as available | |
256 |
|
256 | |||
257 | $ send << EOF |
|
257 | $ send << EOF | |
258 | > httprequest GET api |
|
258 | > httprequest GET api | |
259 | > user-agent: test |
|
259 | > user-agent: test | |
260 | > EOF |
|
260 | > EOF | |
261 | using raw connection to peer |
|
261 | using raw connection to peer | |
262 |
s> setsockopt(6, 1, 1) -> None ( |
|
262 | s> setsockopt(6, 1, 1) -> None (?) | |
263 | s> GET /api HTTP/1.1\r\n |
|
263 | s> GET /api HTTP/1.1\r\n | |
264 | s> Accept-Encoding: identity\r\n |
|
264 | s> Accept-Encoding: identity\r\n | |
265 | s> user-agent: test\r\n |
|
265 | s> user-agent: test\r\n | |
266 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
266 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
267 | s> \r\n |
|
267 | s> \r\n | |
268 | s> makefile('rb', None) |
|
268 | s> makefile('rb', None) | |
269 | s> HTTP/1.1 200 OK\r\n |
|
269 | s> HTTP/1.1 200 OK\r\n | |
270 | s> Server: testing stub value\r\n |
|
270 | s> Server: testing stub value\r\n | |
271 | s> Date: $HTTP_DATE$\r\n |
|
271 | s> Date: $HTTP_DATE$\r\n | |
272 | s> Content-Type: text/plain\r\n |
|
272 | s> Content-Type: text/plain\r\n | |
273 | s> Content-Length: 96\r\n |
|
273 | s> Content-Length: 96\r\n | |
274 | s> \r\n |
|
274 | s> \r\n | |
275 | s> APIs can be accessed at /api/<name>, where <name> can be one of the following:\n |
|
275 | s> APIs can be accessed at /api/<name>, where <name> can be one of the following:\n | |
276 | s> \n |
|
276 | s> \n | |
277 | s> exp-http-v2-0003 |
|
277 | s> exp-http-v2-0003 | |
278 |
|
278 | |||
279 | $ send << EOF |
|
279 | $ send << EOF | |
280 | > httprequest GET api/ |
|
280 | > httprequest GET api/ | |
281 | > user-agent: test |
|
281 | > user-agent: test | |
282 | > EOF |
|
282 | > EOF | |
283 | using raw connection to peer |
|
283 | using raw connection to peer | |
284 |
s> setsockopt(6, 1, 1) -> None ( |
|
284 | s> setsockopt(6, 1, 1) -> None (?) | |
285 | s> GET /api/ HTTP/1.1\r\n |
|
285 | s> GET /api/ HTTP/1.1\r\n | |
286 | s> Accept-Encoding: identity\r\n |
|
286 | s> Accept-Encoding: identity\r\n | |
287 | s> user-agent: test\r\n |
|
287 | s> user-agent: test\r\n | |
288 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
288 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
289 | s> \r\n |
|
289 | s> \r\n | |
290 | s> makefile('rb', None) |
|
290 | s> makefile('rb', None) | |
291 | s> HTTP/1.1 200 OK\r\n |
|
291 | s> HTTP/1.1 200 OK\r\n | |
292 | s> Server: testing stub value\r\n |
|
292 | s> Server: testing stub value\r\n | |
293 | s> Date: $HTTP_DATE$\r\n |
|
293 | s> Date: $HTTP_DATE$\r\n | |
294 | s> Content-Type: text/plain\r\n |
|
294 | s> Content-Type: text/plain\r\n | |
295 | s> Content-Length: 96\r\n |
|
295 | s> Content-Length: 96\r\n | |
296 | s> \r\n |
|
296 | s> \r\n | |
297 | s> APIs can be accessed at /api/<name>, where <name> can be one of the following:\n |
|
297 | s> APIs can be accessed at /api/<name>, where <name> can be one of the following:\n | |
298 | s> \n |
|
298 | s> \n | |
299 | s> exp-http-v2-0003 |
|
299 | s> exp-http-v2-0003 |
@@ -1,773 +1,773 b'' | |||||
1 | #require no-chg |
|
1 | #require no-chg | |
2 |
|
2 | |||
3 | $ . $TESTDIR/wireprotohelpers.sh |
|
3 | $ . $TESTDIR/wireprotohelpers.sh | |
4 |
|
4 | |||
5 | $ cat >> $HGRCPATH << EOF |
|
5 | $ cat >> $HGRCPATH << EOF | |
6 | > [web] |
|
6 | > [web] | |
7 | > push_ssl = false |
|
7 | > push_ssl = false | |
8 | > allow_push = * |
|
8 | > allow_push = * | |
9 | > EOF |
|
9 | > EOF | |
10 |
|
10 | |||
11 | $ hg init server |
|
11 | $ hg init server | |
12 | $ cd server |
|
12 | $ cd server | |
13 | $ touch a |
|
13 | $ touch a | |
14 | $ hg -q commit -A -m initial |
|
14 | $ hg -q commit -A -m initial | |
15 | $ cd .. |
|
15 | $ cd .. | |
16 |
|
16 | |||
17 | $ hg serve -R server -p $HGPORT -d --pid-file hg.pid |
|
17 | $ hg serve -R server -p $HGPORT -d --pid-file hg.pid | |
18 | $ cat hg.pid >> $DAEMON_PIDS |
|
18 | $ cat hg.pid >> $DAEMON_PIDS | |
19 |
|
19 | |||
20 | compression formats are advertised in compression capability |
|
20 | compression formats are advertised in compression capability | |
21 |
|
21 | |||
22 | #if zstd |
|
22 | #if zstd | |
23 | $ get-with-headers.py $LOCALIP:$HGPORT '?cmd=capabilities' | tr ' ' '\n' | grep '^compression=zstd,zlib$' > /dev/null |
|
23 | $ get-with-headers.py $LOCALIP:$HGPORT '?cmd=capabilities' | tr ' ' '\n' | grep '^compression=zstd,zlib$' > /dev/null | |
24 | #else |
|
24 | #else | |
25 | $ get-with-headers.py $LOCALIP:$HGPORT '?cmd=capabilities' | tr ' ' '\n' | grep '^compression=zlib$' > /dev/null |
|
25 | $ get-with-headers.py $LOCALIP:$HGPORT '?cmd=capabilities' | tr ' ' '\n' | grep '^compression=zlib$' > /dev/null | |
26 | #endif |
|
26 | #endif | |
27 |
|
27 | |||
28 | $ killdaemons.py |
|
28 | $ killdaemons.py | |
29 |
|
29 | |||
30 | server.compressionengines can replace engines list wholesale |
|
30 | server.compressionengines can replace engines list wholesale | |
31 |
|
31 | |||
32 | $ hg serve --config server.compressionengines=none -R server -p $HGPORT -d --pid-file hg.pid |
|
32 | $ hg serve --config server.compressionengines=none -R server -p $HGPORT -d --pid-file hg.pid | |
33 | $ cat hg.pid > $DAEMON_PIDS |
|
33 | $ cat hg.pid > $DAEMON_PIDS | |
34 | $ get-with-headers.py $LOCALIP:$HGPORT '?cmd=capabilities' | tr ' ' '\n' | grep '^compression=none$' > /dev/null |
|
34 | $ get-with-headers.py $LOCALIP:$HGPORT '?cmd=capabilities' | tr ' ' '\n' | grep '^compression=none$' > /dev/null | |
35 |
|
35 | |||
36 | $ killdaemons.py |
|
36 | $ killdaemons.py | |
37 |
|
37 | |||
38 | Order of engines can also change |
|
38 | Order of engines can also change | |
39 |
|
39 | |||
40 | $ hg serve --config server.compressionengines=none,zlib -R server -p $HGPORT -d --pid-file hg.pid |
|
40 | $ hg serve --config server.compressionengines=none,zlib -R server -p $HGPORT -d --pid-file hg.pid | |
41 | $ cat hg.pid > $DAEMON_PIDS |
|
41 | $ cat hg.pid > $DAEMON_PIDS | |
42 | $ get-with-headers.py $LOCALIP:$HGPORT '?cmd=capabilities' | tr ' ' '\n' | grep '^compression=none,zlib$' > /dev/null |
|
42 | $ get-with-headers.py $LOCALIP:$HGPORT '?cmd=capabilities' | tr ' ' '\n' | grep '^compression=none,zlib$' > /dev/null | |
43 |
|
43 | |||
44 | $ killdaemons.py |
|
44 | $ killdaemons.py | |
45 |
|
45 | |||
46 | Start a default server again |
|
46 | Start a default server again | |
47 |
|
47 | |||
48 | $ hg serve -R server -p $HGPORT -d --pid-file hg.pid |
|
48 | $ hg serve -R server -p $HGPORT -d --pid-file hg.pid | |
49 | $ cat hg.pid > $DAEMON_PIDS |
|
49 | $ cat hg.pid > $DAEMON_PIDS | |
50 |
|
50 | |||
51 | Server should send application/mercurial-0.1 to clients if no Accept is used |
|
51 | Server should send application/mercurial-0.1 to clients if no Accept is used | |
52 |
|
52 | |||
53 | $ get-with-headers.py --headeronly $LOCALIP:$HGPORT '?cmd=getbundle&heads=e93700bd72895c5addab234c56d4024b487a362f&common=0000000000000000000000000000000000000000' - |
|
53 | $ get-with-headers.py --headeronly $LOCALIP:$HGPORT '?cmd=getbundle&heads=e93700bd72895c5addab234c56d4024b487a362f&common=0000000000000000000000000000000000000000' - | |
54 | 200 Script output follows |
|
54 | 200 Script output follows | |
55 | content-type: application/mercurial-0.1 |
|
55 | content-type: application/mercurial-0.1 | |
56 | date: $HTTP_DATE$ |
|
56 | date: $HTTP_DATE$ | |
57 | server: testing stub value |
|
57 | server: testing stub value | |
58 | transfer-encoding: chunked |
|
58 | transfer-encoding: chunked | |
59 |
|
59 | |||
60 | Server should send application/mercurial-0.1 when client says it wants it |
|
60 | Server should send application/mercurial-0.1 when client says it wants it | |
61 |
|
61 | |||
62 | $ get-with-headers.py --hgproto '0.1' --headeronly $LOCALIP:$HGPORT '?cmd=getbundle&heads=e93700bd72895c5addab234c56d4024b487a362f&common=0000000000000000000000000000000000000000' - |
|
62 | $ get-with-headers.py --hgproto '0.1' --headeronly $LOCALIP:$HGPORT '?cmd=getbundle&heads=e93700bd72895c5addab234c56d4024b487a362f&common=0000000000000000000000000000000000000000' - | |
63 | 200 Script output follows |
|
63 | 200 Script output follows | |
64 | content-type: application/mercurial-0.1 |
|
64 | content-type: application/mercurial-0.1 | |
65 | date: $HTTP_DATE$ |
|
65 | date: $HTTP_DATE$ | |
66 | server: testing stub value |
|
66 | server: testing stub value | |
67 | transfer-encoding: chunked |
|
67 | transfer-encoding: chunked | |
68 |
|
68 | |||
69 | Server should send application/mercurial-0.2 when client says it wants it |
|
69 | Server should send application/mercurial-0.2 when client says it wants it | |
70 |
|
70 | |||
71 | $ get-with-headers.py --hgproto '0.2' --headeronly $LOCALIP:$HGPORT '?cmd=getbundle&heads=e93700bd72895c5addab234c56d4024b487a362f&common=0000000000000000000000000000000000000000' - |
|
71 | $ get-with-headers.py --hgproto '0.2' --headeronly $LOCALIP:$HGPORT '?cmd=getbundle&heads=e93700bd72895c5addab234c56d4024b487a362f&common=0000000000000000000000000000000000000000' - | |
72 | 200 Script output follows |
|
72 | 200 Script output follows | |
73 | content-type: application/mercurial-0.2 |
|
73 | content-type: application/mercurial-0.2 | |
74 | date: $HTTP_DATE$ |
|
74 | date: $HTTP_DATE$ | |
75 | server: testing stub value |
|
75 | server: testing stub value | |
76 | transfer-encoding: chunked |
|
76 | transfer-encoding: chunked | |
77 |
|
77 | |||
78 | $ get-with-headers.py --hgproto '0.1 0.2' --headeronly $LOCALIP:$HGPORT '?cmd=getbundle&heads=e93700bd72895c5addab234c56d4024b487a362f&common=0000000000000000000000000000000000000000' - |
|
78 | $ get-with-headers.py --hgproto '0.1 0.2' --headeronly $LOCALIP:$HGPORT '?cmd=getbundle&heads=e93700bd72895c5addab234c56d4024b487a362f&common=0000000000000000000000000000000000000000' - | |
79 | 200 Script output follows |
|
79 | 200 Script output follows | |
80 | content-type: application/mercurial-0.2 |
|
80 | content-type: application/mercurial-0.2 | |
81 | date: $HTTP_DATE$ |
|
81 | date: $HTTP_DATE$ | |
82 | server: testing stub value |
|
82 | server: testing stub value | |
83 | transfer-encoding: chunked |
|
83 | transfer-encoding: chunked | |
84 |
|
84 | |||
85 | Requesting a compression format that server doesn't support results will fall back to 0.1 |
|
85 | Requesting a compression format that server doesn't support results will fall back to 0.1 | |
86 |
|
86 | |||
87 | $ get-with-headers.py --hgproto '0.2 comp=aa' --headeronly $LOCALIP:$HGPORT '?cmd=getbundle&heads=e93700bd72895c5addab234c56d4024b487a362f&common=0000000000000000000000000000000000000000' - |
|
87 | $ get-with-headers.py --hgproto '0.2 comp=aa' --headeronly $LOCALIP:$HGPORT '?cmd=getbundle&heads=e93700bd72895c5addab234c56d4024b487a362f&common=0000000000000000000000000000000000000000' - | |
88 | 200 Script output follows |
|
88 | 200 Script output follows | |
89 | content-type: application/mercurial-0.1 |
|
89 | content-type: application/mercurial-0.1 | |
90 | date: $HTTP_DATE$ |
|
90 | date: $HTTP_DATE$ | |
91 | server: testing stub value |
|
91 | server: testing stub value | |
92 | transfer-encoding: chunked |
|
92 | transfer-encoding: chunked | |
93 |
|
93 | |||
94 | #if zstd |
|
94 | #if zstd | |
95 | zstd is used if available |
|
95 | zstd is used if available | |
96 |
|
96 | |||
97 | $ get-with-headers.py --hgproto '0.2 comp=zstd' $LOCALIP:$HGPORT '?cmd=getbundle&heads=e93700bd72895c5addab234c56d4024b487a362f&common=0000000000000000000000000000000000000000' > resp |
|
97 | $ get-with-headers.py --hgproto '0.2 comp=zstd' $LOCALIP:$HGPORT '?cmd=getbundle&heads=e93700bd72895c5addab234c56d4024b487a362f&common=0000000000000000000000000000000000000000' > resp | |
98 | $ f --size --hexdump --bytes 36 --sha1 resp |
|
98 | $ f --size --hexdump --bytes 36 --sha1 resp | |
99 | resp: size=248, sha1=4d8d8f87fb82bd542ce52881fdc94f850748 |
|
99 | resp: size=248, sha1=4d8d8f87fb82bd542ce52881fdc94f850748 | |
100 | 0000: 32 30 30 20 53 63 72 69 70 74 20 6f 75 74 70 75 |200 Script outpu| |
|
100 | 0000: 32 30 30 20 53 63 72 69 70 74 20 6f 75 74 70 75 |200 Script outpu| | |
101 | 0010: 74 20 66 6f 6c 6c 6f 77 73 0a 0a 04 7a 73 74 64 |t follows...zstd| |
|
101 | 0010: 74 20 66 6f 6c 6c 6f 77 73 0a 0a 04 7a 73 74 64 |t follows...zstd| | |
102 | 0020: 28 b5 2f fd |(./.| |
|
102 | 0020: 28 b5 2f fd |(./.| | |
103 |
|
103 | |||
104 | #endif |
|
104 | #endif | |
105 |
|
105 | |||
106 | application/mercurial-0.2 is not yet used on non-streaming responses |
|
106 | application/mercurial-0.2 is not yet used on non-streaming responses | |
107 |
|
107 | |||
108 | $ get-with-headers.py --hgproto '0.2' $LOCALIP:$HGPORT '?cmd=heads' - |
|
108 | $ get-with-headers.py --hgproto '0.2' $LOCALIP:$HGPORT '?cmd=heads' - | |
109 | 200 Script output follows |
|
109 | 200 Script output follows | |
110 | content-length: 41 |
|
110 | content-length: 41 | |
111 | content-type: application/mercurial-0.1 |
|
111 | content-type: application/mercurial-0.1 | |
112 | date: $HTTP_DATE$ |
|
112 | date: $HTTP_DATE$ | |
113 | server: testing stub value |
|
113 | server: testing stub value | |
114 |
|
114 | |||
115 | e93700bd72895c5addab234c56d4024b487a362f |
|
115 | e93700bd72895c5addab234c56d4024b487a362f | |
116 |
|
116 | |||
117 | Now test protocol preference usage |
|
117 | Now test protocol preference usage | |
118 |
|
118 | |||
119 | $ killdaemons.py |
|
119 | $ killdaemons.py | |
120 | $ hg serve --config server.compressionengines=none,zlib -R server -p $HGPORT -d --pid-file hg.pid |
|
120 | $ hg serve --config server.compressionengines=none,zlib -R server -p $HGPORT -d --pid-file hg.pid | |
121 | $ cat hg.pid > $DAEMON_PIDS |
|
121 | $ cat hg.pid > $DAEMON_PIDS | |
122 |
|
122 | |||
123 | No Accept will send 0.1+zlib, even though "none" is preferred b/c "none" isn't supported on 0.1 |
|
123 | No Accept will send 0.1+zlib, even though "none" is preferred b/c "none" isn't supported on 0.1 | |
124 |
|
124 | |||
125 | $ get-with-headers.py --headeronly $LOCALIP:$HGPORT '?cmd=getbundle&heads=e93700bd72895c5addab234c56d4024b487a362f&common=0000000000000000000000000000000000000000' Content-Type |
|
125 | $ get-with-headers.py --headeronly $LOCALIP:$HGPORT '?cmd=getbundle&heads=e93700bd72895c5addab234c56d4024b487a362f&common=0000000000000000000000000000000000000000' Content-Type | |
126 | 200 Script output follows |
|
126 | 200 Script output follows | |
127 | content-type: application/mercurial-0.1 |
|
127 | content-type: application/mercurial-0.1 | |
128 |
|
128 | |||
129 | $ get-with-headers.py $LOCALIP:$HGPORT '?cmd=getbundle&heads=e93700bd72895c5addab234c56d4024b487a362f&common=0000000000000000000000000000000000000000' > resp |
|
129 | $ get-with-headers.py $LOCALIP:$HGPORT '?cmd=getbundle&heads=e93700bd72895c5addab234c56d4024b487a362f&common=0000000000000000000000000000000000000000' > resp | |
130 | $ f --size --hexdump --bytes 28 --sha1 resp |
|
130 | $ f --size --hexdump --bytes 28 --sha1 resp | |
131 | resp: size=227, sha1=35a4c074da74f32f5440da3cbf04 |
|
131 | resp: size=227, sha1=35a4c074da74f32f5440da3cbf04 | |
132 | 0000: 32 30 30 20 53 63 72 69 70 74 20 6f 75 74 70 75 |200 Script outpu| |
|
132 | 0000: 32 30 30 20 53 63 72 69 70 74 20 6f 75 74 70 75 |200 Script outpu| | |
133 | 0010: 74 20 66 6f 6c 6c 6f 77 73 0a 0a 78 |t follows..x| |
|
133 | 0010: 74 20 66 6f 6c 6c 6f 77 73 0a 0a 78 |t follows..x| | |
134 |
|
134 | |||
135 | Explicit 0.1 will send zlib because "none" isn't supported on 0.1 |
|
135 | Explicit 0.1 will send zlib because "none" isn't supported on 0.1 | |
136 |
|
136 | |||
137 | $ get-with-headers.py --hgproto '0.1' $LOCALIP:$HGPORT '?cmd=getbundle&heads=e93700bd72895c5addab234c56d4024b487a362f&common=0000000000000000000000000000000000000000' > resp |
|
137 | $ get-with-headers.py --hgproto '0.1' $LOCALIP:$HGPORT '?cmd=getbundle&heads=e93700bd72895c5addab234c56d4024b487a362f&common=0000000000000000000000000000000000000000' > resp | |
138 | $ f --size --hexdump --bytes 28 --sha1 resp |
|
138 | $ f --size --hexdump --bytes 28 --sha1 resp | |
139 | resp: size=227, sha1=35a4c074da74f32f5440da3cbf04 |
|
139 | resp: size=227, sha1=35a4c074da74f32f5440da3cbf04 | |
140 | 0000: 32 30 30 20 53 63 72 69 70 74 20 6f 75 74 70 75 |200 Script outpu| |
|
140 | 0000: 32 30 30 20 53 63 72 69 70 74 20 6f 75 74 70 75 |200 Script outpu| | |
141 | 0010: 74 20 66 6f 6c 6c 6f 77 73 0a 0a 78 |t follows..x| |
|
141 | 0010: 74 20 66 6f 6c 6c 6f 77 73 0a 0a 78 |t follows..x| | |
142 |
|
142 | |||
143 | 0.2 with no compression will get "none" because that is server's preference |
|
143 | 0.2 with no compression will get "none" because that is server's preference | |
144 | (spec says ZL and UN are implicitly supported) |
|
144 | (spec says ZL and UN are implicitly supported) | |
145 |
|
145 | |||
146 | $ get-with-headers.py --hgproto '0.2' $LOCALIP:$HGPORT '?cmd=getbundle&heads=e93700bd72895c5addab234c56d4024b487a362f&common=0000000000000000000000000000000000000000' > resp |
|
146 | $ get-with-headers.py --hgproto '0.2' $LOCALIP:$HGPORT '?cmd=getbundle&heads=e93700bd72895c5addab234c56d4024b487a362f&common=0000000000000000000000000000000000000000' > resp | |
147 | $ f --size --hexdump --bytes 32 --sha1 resp |
|
147 | $ f --size --hexdump --bytes 32 --sha1 resp | |
148 | resp: size=432, sha1=ac931b412ec185a02e0e5bcff98dac83 |
|
148 | resp: size=432, sha1=ac931b412ec185a02e0e5bcff98dac83 | |
149 | 0000: 32 30 30 20 53 63 72 69 70 74 20 6f 75 74 70 75 |200 Script outpu| |
|
149 | 0000: 32 30 30 20 53 63 72 69 70 74 20 6f 75 74 70 75 |200 Script outpu| | |
150 | 0010: 74 20 66 6f 6c 6c 6f 77 73 0a 0a 04 6e 6f 6e 65 |t follows...none| |
|
150 | 0010: 74 20 66 6f 6c 6c 6f 77 73 0a 0a 04 6e 6f 6e 65 |t follows...none| | |
151 |
|
151 | |||
152 | Client receives server preference even if local order doesn't match |
|
152 | Client receives server preference even if local order doesn't match | |
153 |
|
153 | |||
154 | $ get-with-headers.py --hgproto '0.2 comp=zlib,none' $LOCALIP:$HGPORT '?cmd=getbundle&heads=e93700bd72895c5addab234c56d4024b487a362f&common=0000000000000000000000000000000000000000' > resp |
|
154 | $ get-with-headers.py --hgproto '0.2 comp=zlib,none' $LOCALIP:$HGPORT '?cmd=getbundle&heads=e93700bd72895c5addab234c56d4024b487a362f&common=0000000000000000000000000000000000000000' > resp | |
155 | $ f --size --hexdump --bytes 32 --sha1 resp |
|
155 | $ f --size --hexdump --bytes 32 --sha1 resp | |
156 | resp: size=432, sha1=ac931b412ec185a02e0e5bcff98dac83 |
|
156 | resp: size=432, sha1=ac931b412ec185a02e0e5bcff98dac83 | |
157 | 0000: 32 30 30 20 53 63 72 69 70 74 20 6f 75 74 70 75 |200 Script outpu| |
|
157 | 0000: 32 30 30 20 53 63 72 69 70 74 20 6f 75 74 70 75 |200 Script outpu| | |
158 | 0010: 74 20 66 6f 6c 6c 6f 77 73 0a 0a 04 6e 6f 6e 65 |t follows...none| |
|
158 | 0010: 74 20 66 6f 6c 6c 6f 77 73 0a 0a 04 6e 6f 6e 65 |t follows...none| | |
159 |
|
159 | |||
160 | Client receives only supported format even if not server preferred format |
|
160 | Client receives only supported format even if not server preferred format | |
161 |
|
161 | |||
162 | $ get-with-headers.py --hgproto '0.2 comp=zlib' $LOCALIP:$HGPORT '?cmd=getbundle&heads=e93700bd72895c5addab234c56d4024b487a362f&common=0000000000000000000000000000000000000000' > resp |
|
162 | $ get-with-headers.py --hgproto '0.2 comp=zlib' $LOCALIP:$HGPORT '?cmd=getbundle&heads=e93700bd72895c5addab234c56d4024b487a362f&common=0000000000000000000000000000000000000000' > resp | |
163 | $ f --size --hexdump --bytes 33 --sha1 resp |
|
163 | $ f --size --hexdump --bytes 33 --sha1 resp | |
164 | resp: size=232, sha1=a1c727f0c9693ca15742a75c30419bc36 |
|
164 | resp: size=232, sha1=a1c727f0c9693ca15742a75c30419bc36 | |
165 | 0000: 32 30 30 20 53 63 72 69 70 74 20 6f 75 74 70 75 |200 Script outpu| |
|
165 | 0000: 32 30 30 20 53 63 72 69 70 74 20 6f 75 74 70 75 |200 Script outpu| | |
166 | 0010: 74 20 66 6f 6c 6c 6f 77 73 0a 0a 04 7a 6c 69 62 |t follows...zlib| |
|
166 | 0010: 74 20 66 6f 6c 6c 6f 77 73 0a 0a 04 7a 6c 69 62 |t follows...zlib| | |
167 | 0020: 78 |x| |
|
167 | 0020: 78 |x| | |
168 |
|
168 | |||
169 | $ killdaemons.py |
|
169 | $ killdaemons.py | |
170 | $ cd .. |
|
170 | $ cd .. | |
171 |
|
171 | |||
172 | Test listkeys for listing namespaces |
|
172 | Test listkeys for listing namespaces | |
173 |
|
173 | |||
174 | $ hg init empty |
|
174 | $ hg init empty | |
175 | $ hg -R empty serve -p $HGPORT -d --pid-file hg.pid |
|
175 | $ hg -R empty serve -p $HGPORT -d --pid-file hg.pid | |
176 | $ cat hg.pid > $DAEMON_PIDS |
|
176 | $ cat hg.pid > $DAEMON_PIDS | |
177 |
|
177 | |||
178 | $ hg --verbose debugwireproto http://$LOCALIP:$HGPORT << EOF |
|
178 | $ hg --verbose debugwireproto http://$LOCALIP:$HGPORT << EOF | |
179 | > command listkeys |
|
179 | > command listkeys | |
180 | > namespace namespaces |
|
180 | > namespace namespaces | |
181 | > EOF |
|
181 | > EOF | |
182 |
s> setsockopt(6, 1, 1) -> None ( |
|
182 | s> setsockopt(6, 1, 1) -> None (?) | |
183 |
|
|
183 | s> GET /?cmd=capabilities HTTP/1.1\r\n | |
184 | s> Accept-Encoding: identity\r\n |
|
184 | s> Accept-Encoding: identity\r\n | |
185 | s> accept: application/mercurial-0.1\r\n |
|
185 | s> accept: application/mercurial-0.1\r\n | |
186 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
186 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
187 | s> user-agent: Mercurial debugwireproto\r\n |
|
187 | s> user-agent: Mercurial debugwireproto\r\n | |
188 | s> \r\n |
|
188 | s> \r\n | |
189 | s> makefile('rb', None) |
|
189 | s> makefile('rb', None) | |
190 | s> HTTP/1.1 200 Script output follows\r\n |
|
190 | s> HTTP/1.1 200 Script output follows\r\n | |
191 | s> Server: testing stub value\r\n |
|
191 | s> Server: testing stub value\r\n | |
192 | s> Date: $HTTP_DATE$\r\n |
|
192 | s> Date: $HTTP_DATE$\r\n | |
193 | s> Content-Type: application/mercurial-0.1\r\n |
|
193 | s> Content-Type: application/mercurial-0.1\r\n | |
194 | s> Content-Length: *\r\n (glob) |
|
194 | s> Content-Length: *\r\n (glob) | |
195 | s> \r\n |
|
195 | s> \r\n | |
196 | s> batch 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 |
|
196 | s> batch 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 | |
197 | sending listkeys command |
|
197 | sending listkeys command | |
198 |
s> setsockopt(6, 1, 1) -> None ( |
|
198 | s> setsockopt(6, 1, 1) -> None (?) | |
199 |
|
|
199 | s> GET /?cmd=listkeys HTTP/1.1\r\n | |
200 | s> Accept-Encoding: identity\r\n |
|
200 | s> Accept-Encoding: identity\r\n | |
201 | s> vary: X-HgArg-1,X-HgProto-1\r\n |
|
201 | s> vary: X-HgArg-1,X-HgProto-1\r\n | |
202 | s> x-hgarg-1: namespace=namespaces\r\n |
|
202 | s> x-hgarg-1: namespace=namespaces\r\n | |
203 | s> x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull\r\n |
|
203 | s> x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull\r\n | |
204 | s> accept: application/mercurial-0.1\r\n |
|
204 | s> accept: application/mercurial-0.1\r\n | |
205 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
205 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
206 | s> user-agent: Mercurial debugwireproto\r\n |
|
206 | s> user-agent: Mercurial debugwireproto\r\n | |
207 | s> \r\n |
|
207 | s> \r\n | |
208 | s> makefile('rb', None) |
|
208 | s> makefile('rb', None) | |
209 | s> HTTP/1.1 200 Script output follows\r\n |
|
209 | s> HTTP/1.1 200 Script output follows\r\n | |
210 | s> Server: testing stub value\r\n |
|
210 | s> Server: testing stub value\r\n | |
211 | s> Date: $HTTP_DATE$\r\n |
|
211 | s> Date: $HTTP_DATE$\r\n | |
212 | s> Content-Type: application/mercurial-0.1\r\n |
|
212 | s> Content-Type: application/mercurial-0.1\r\n | |
213 | s> Content-Length: 30\r\n |
|
213 | s> Content-Length: 30\r\n | |
214 | s> \r\n |
|
214 | s> \r\n | |
215 | s> bookmarks\t\n |
|
215 | s> bookmarks\t\n | |
216 | s> namespaces\t\n |
|
216 | s> namespaces\t\n | |
217 | s> phases\t |
|
217 | s> phases\t | |
218 | response: { |
|
218 | response: { | |
219 | b'bookmarks': b'', |
|
219 | b'bookmarks': b'', | |
220 | b'namespaces': b'', |
|
220 | b'namespaces': b'', | |
221 | b'phases': b'' |
|
221 | b'phases': b'' | |
222 | } |
|
222 | } | |
223 | (sent 2 HTTP requests and * bytes; received * bytes in responses) (glob) |
|
223 | (sent 2 HTTP requests and * bytes; received * bytes in responses) (glob) | |
224 |
|
224 | |||
225 | Same thing, but with "httprequest" command |
|
225 | Same thing, but with "httprequest" command | |
226 |
|
226 | |||
227 | $ hg --verbose debugwireproto --peer raw http://$LOCALIP:$HGPORT << EOF |
|
227 | $ hg --verbose debugwireproto --peer raw http://$LOCALIP:$HGPORT << EOF | |
228 | > httprequest GET ?cmd=listkeys |
|
228 | > httprequest GET ?cmd=listkeys | |
229 | > user-agent: test |
|
229 | > user-agent: test | |
230 | > x-hgarg-1: namespace=namespaces |
|
230 | > x-hgarg-1: namespace=namespaces | |
231 | > EOF |
|
231 | > EOF | |
232 | using raw connection to peer |
|
232 | using raw connection to peer | |
233 |
s> setsockopt(6, 1, 1) -> None ( |
|
233 | s> setsockopt(6, 1, 1) -> None (?) | |
234 |
|
|
234 | s> GET /?cmd=listkeys HTTP/1.1\r\n | |
235 | s> Accept-Encoding: identity\r\n |
|
235 | s> Accept-Encoding: identity\r\n | |
236 | s> user-agent: test\r\n |
|
236 | s> user-agent: test\r\n | |
237 | s> x-hgarg-1: namespace=namespaces\r\n |
|
237 | s> x-hgarg-1: namespace=namespaces\r\n | |
238 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
238 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
239 | s> \r\n |
|
239 | s> \r\n | |
240 | s> makefile('rb', None) |
|
240 | s> makefile('rb', None) | |
241 | s> HTTP/1.1 200 Script output follows\r\n |
|
241 | s> HTTP/1.1 200 Script output follows\r\n | |
242 | s> Server: testing stub value\r\n |
|
242 | s> Server: testing stub value\r\n | |
243 | s> Date: $HTTP_DATE$\r\n |
|
243 | s> Date: $HTTP_DATE$\r\n | |
244 | s> Content-Type: application/mercurial-0.1\r\n |
|
244 | s> Content-Type: application/mercurial-0.1\r\n | |
245 | s> Content-Length: 30\r\n |
|
245 | s> Content-Length: 30\r\n | |
246 | s> \r\n |
|
246 | s> \r\n | |
247 | s> bookmarks\t\n |
|
247 | s> bookmarks\t\n | |
248 | s> namespaces\t\n |
|
248 | s> namespaces\t\n | |
249 | s> phases\t |
|
249 | s> phases\t | |
250 |
|
250 | |||
251 | Client with HTTPv2 enabled advertises that and gets old capabilities response from old server |
|
251 | Client with HTTPv2 enabled advertises that and gets old capabilities response from old server | |
252 |
|
252 | |||
253 | $ hg --config experimental.httppeer.advertise-v2=true --verbose debugwireproto http://$LOCALIP:$HGPORT << EOF |
|
253 | $ hg --config experimental.httppeer.advertise-v2=true --verbose debugwireproto http://$LOCALIP:$HGPORT << EOF | |
254 | > command heads |
|
254 | > command heads | |
255 | > EOF |
|
255 | > EOF | |
256 |
s> setsockopt(6, 1, 1) -> None ( |
|
256 | s> setsockopt(6, 1, 1) -> None (?) | |
257 |
|
|
257 | s> GET /?cmd=capabilities HTTP/1.1\r\n | |
258 | s> Accept-Encoding: identity\r\n |
|
258 | s> Accept-Encoding: identity\r\n | |
259 | s> vary: X-HgProto-1,X-HgUpgrade-1\r\n |
|
259 | s> vary: X-HgProto-1,X-HgUpgrade-1\r\n | |
260 | s> x-hgproto-1: cbor\r\n |
|
260 | s> x-hgproto-1: cbor\r\n | |
261 | s> x-hgupgrade-1: exp-http-v2-0003\r\n |
|
261 | s> x-hgupgrade-1: exp-http-v2-0003\r\n | |
262 | s> accept: application/mercurial-0.1\r\n |
|
262 | s> accept: application/mercurial-0.1\r\n | |
263 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
263 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
264 | s> user-agent: Mercurial debugwireproto\r\n |
|
264 | s> user-agent: Mercurial debugwireproto\r\n | |
265 | s> \r\n |
|
265 | s> \r\n | |
266 | s> makefile('rb', None) |
|
266 | s> makefile('rb', None) | |
267 | s> HTTP/1.1 200 Script output follows\r\n |
|
267 | s> HTTP/1.1 200 Script output follows\r\n | |
268 | s> Server: testing stub value\r\n |
|
268 | s> Server: testing stub value\r\n | |
269 | s> Date: $HTTP_DATE$\r\n |
|
269 | s> Date: $HTTP_DATE$\r\n | |
270 | s> Content-Type: application/mercurial-0.1\r\n |
|
270 | s> Content-Type: application/mercurial-0.1\r\n | |
271 | s> Content-Length: *\r\n (glob) |
|
271 | s> Content-Length: *\r\n (glob) | |
272 | s> \r\n |
|
272 | s> \r\n | |
273 | s> batch 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 |
|
273 | s> batch 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 | |
274 | sending heads command |
|
274 | sending heads command | |
275 |
s> setsockopt(6, 1, 1) -> None ( |
|
275 | s> setsockopt(6, 1, 1) -> None (?) | |
276 |
|
|
276 | s> GET /?cmd=heads HTTP/1.1\r\n | |
277 | s> Accept-Encoding: identity\r\n |
|
277 | s> Accept-Encoding: identity\r\n | |
278 | s> vary: X-HgProto-1\r\n |
|
278 | s> vary: X-HgProto-1\r\n | |
279 | s> x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull\r\n |
|
279 | s> x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull\r\n | |
280 | s> accept: application/mercurial-0.1\r\n |
|
280 | s> accept: application/mercurial-0.1\r\n | |
281 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
281 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
282 | s> user-agent: Mercurial debugwireproto\r\n |
|
282 | s> user-agent: Mercurial debugwireproto\r\n | |
283 | s> \r\n |
|
283 | s> \r\n | |
284 | s> makefile('rb', None) |
|
284 | s> makefile('rb', None) | |
285 | s> HTTP/1.1 200 Script output follows\r\n |
|
285 | s> HTTP/1.1 200 Script output follows\r\n | |
286 | s> Server: testing stub value\r\n |
|
286 | s> Server: testing stub value\r\n | |
287 | s> Date: $HTTP_DATE$\r\n |
|
287 | s> Date: $HTTP_DATE$\r\n | |
288 | s> Content-Type: application/mercurial-0.1\r\n |
|
288 | s> Content-Type: application/mercurial-0.1\r\n | |
289 | s> Content-Length: 41\r\n |
|
289 | s> Content-Length: 41\r\n | |
290 | s> \r\n |
|
290 | s> \r\n | |
291 | s> 0000000000000000000000000000000000000000\n |
|
291 | s> 0000000000000000000000000000000000000000\n | |
292 | response: [ |
|
292 | response: [ | |
293 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' |
|
293 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' | |
294 | ] |
|
294 | ] | |
295 | (sent 2 HTTP requests and * bytes; received * bytes in responses) (glob) |
|
295 | (sent 2 HTTP requests and * bytes; received * bytes in responses) (glob) | |
296 |
|
296 | |||
297 | $ killdaemons.py |
|
297 | $ killdaemons.py | |
298 | $ enablehttpv2 empty |
|
298 | $ enablehttpv2 empty | |
299 | $ hg --config server.compressionengines=zlib -R empty serve -p $HGPORT -d --pid-file hg.pid |
|
299 | $ hg --config server.compressionengines=zlib -R empty serve -p $HGPORT -d --pid-file hg.pid | |
300 | $ cat hg.pid > $DAEMON_PIDS |
|
300 | $ cat hg.pid > $DAEMON_PIDS | |
301 |
|
301 | |||
302 | Client with HTTPv2 enabled automatically upgrades if the server supports it |
|
302 | Client with HTTPv2 enabled automatically upgrades if the server supports it | |
303 |
|
303 | |||
304 | $ hg --config experimental.httppeer.advertise-v2=true --config experimental.httppeer.v2-encoder-order=identity --verbose debugwireproto http://$LOCALIP:$HGPORT << EOF |
|
304 | $ hg --config experimental.httppeer.advertise-v2=true --config experimental.httppeer.v2-encoder-order=identity --verbose debugwireproto http://$LOCALIP:$HGPORT << EOF | |
305 | > command heads |
|
305 | > command heads | |
306 | > EOF |
|
306 | > EOF | |
307 |
s> setsockopt(6, 1, 1) -> None ( |
|
307 | s> setsockopt(6, 1, 1) -> None (?) | |
308 |
|
|
308 | s> GET /?cmd=capabilities HTTP/1.1\r\n | |
309 | s> Accept-Encoding: identity\r\n |
|
309 | s> Accept-Encoding: identity\r\n | |
310 | s> vary: X-HgProto-1,X-HgUpgrade-1\r\n |
|
310 | s> vary: X-HgProto-1,X-HgUpgrade-1\r\n | |
311 | s> x-hgproto-1: cbor\r\n |
|
311 | s> x-hgproto-1: cbor\r\n | |
312 | s> x-hgupgrade-1: exp-http-v2-0003\r\n |
|
312 | s> x-hgupgrade-1: exp-http-v2-0003\r\n | |
313 | s> accept: application/mercurial-0.1\r\n |
|
313 | s> accept: application/mercurial-0.1\r\n | |
314 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
314 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
315 | s> user-agent: Mercurial debugwireproto\r\n |
|
315 | s> user-agent: Mercurial debugwireproto\r\n | |
316 | s> \r\n |
|
316 | s> \r\n | |
317 | s> makefile('rb', None) |
|
317 | s> makefile('rb', None) | |
318 | s> HTTP/1.1 200 OK\r\n |
|
318 | s> HTTP/1.1 200 OK\r\n | |
319 | s> Server: testing stub value\r\n |
|
319 | s> Server: testing stub value\r\n | |
320 | s> Date: $HTTP_DATE$\r\n |
|
320 | s> Date: $HTTP_DATE$\r\n | |
321 | s> Content-Type: application/mercurial-cbor\r\n |
|
321 | s> Content-Type: application/mercurial-cbor\r\n | |
322 | s> Content-Length: *\r\n (glob) |
|
322 | s> Content-Length: *\r\n (glob) | |
323 | s> \r\n |
|
323 | s> \r\n | |
324 | s> \xa3GapibaseDapi/Dapis\xa1Pexp-http-v2-0003\xa4Hcommands\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\x83LgeneraldeltaHrevlogv1LsparserevlogNv1capabilitiesY\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 |
|
324 | s> \xa3GapibaseDapi/Dapis\xa1Pexp-http-v2-0003\xa4Hcommands\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\x83LgeneraldeltaHrevlogv1LsparserevlogNv1capabilitiesY\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 | |
325 | sending heads command |
|
325 | sending heads command | |
326 |
s> setsockopt(6, 1, 1) -> None ( |
|
326 | s> setsockopt(6, 1, 1) -> None (?) | |
327 |
|
|
327 | s> POST /api/exp-http-v2-0003/ro/heads HTTP/1.1\r\n | |
328 | s> Accept-Encoding: identity\r\n |
|
328 | s> Accept-Encoding: identity\r\n | |
329 | s> accept: application/mercurial-exp-framing-0006\r\n |
|
329 | s> accept: application/mercurial-exp-framing-0006\r\n | |
330 | s> content-type: application/mercurial-exp-framing-0006\r\n |
|
330 | s> content-type: application/mercurial-exp-framing-0006\r\n | |
331 | s> content-length: 56\r\n |
|
331 | s> content-length: 56\r\n | |
332 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
332 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
333 | s> user-agent: Mercurial debugwireproto\r\n |
|
333 | s> user-agent: Mercurial debugwireproto\r\n | |
334 | s> \r\n |
|
334 | s> \r\n | |
335 | s> \x1c\x00\x00\x01\x00\x01\x01\x82\xa1Pcontentencodings\x81Hidentity\x0c\x00\x00\x01\x00\x01\x00\x11\xa1DnameEheads |
|
335 | s> \x1c\x00\x00\x01\x00\x01\x01\x82\xa1Pcontentencodings\x81Hidentity\x0c\x00\x00\x01\x00\x01\x00\x11\xa1DnameEheads | |
336 | s> makefile('rb', None) |
|
336 | s> makefile('rb', None) | |
337 | s> HTTP/1.1 200 OK\r\n |
|
337 | s> HTTP/1.1 200 OK\r\n | |
338 | s> Server: testing stub value\r\n |
|
338 | s> Server: testing stub value\r\n | |
339 | s> Date: $HTTP_DATE$\r\n |
|
339 | s> Date: $HTTP_DATE$\r\n | |
340 | s> Content-Type: application/mercurial-exp-framing-0006\r\n |
|
340 | s> Content-Type: application/mercurial-exp-framing-0006\r\n | |
341 | s> Transfer-Encoding: chunked\r\n |
|
341 | s> Transfer-Encoding: chunked\r\n | |
342 | s> \r\n |
|
342 | s> \r\n | |
343 | s> 11\r\n |
|
343 | s> 11\r\n | |
344 | s> \t\x00\x00\x01\x00\x02\x01\x92 |
|
344 | s> \t\x00\x00\x01\x00\x02\x01\x92 | |
345 | s> Hidentity |
|
345 | s> Hidentity | |
346 | s> \r\n |
|
346 | s> \r\n | |
347 | s> 13\r\n |
|
347 | s> 13\r\n | |
348 | s> \x0b\x00\x00\x01\x00\x02\x041 |
|
348 | s> \x0b\x00\x00\x01\x00\x02\x041 | |
349 | s> \xa1FstatusBok |
|
349 | s> \xa1FstatusBok | |
350 | s> \r\n |
|
350 | s> \r\n | |
351 | s> 1e\r\n |
|
351 | s> 1e\r\n | |
352 | s> \x16\x00\x00\x01\x00\x02\x041 |
|
352 | s> \x16\x00\x00\x01\x00\x02\x041 | |
353 | s> \x81T\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00 |
|
353 | s> \x81T\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00 | |
354 | s> \r\n |
|
354 | s> \r\n | |
355 | s> 8\r\n |
|
355 | s> 8\r\n | |
356 | s> \x00\x00\x00\x01\x00\x02\x002 |
|
356 | s> \x00\x00\x00\x01\x00\x02\x002 | |
357 | s> \r\n |
|
357 | s> \r\n | |
358 | s> 0\r\n |
|
358 | s> 0\r\n | |
359 | s> \r\n |
|
359 | s> \r\n | |
360 | response: [ |
|
360 | response: [ | |
361 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' |
|
361 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' | |
362 | ] |
|
362 | ] | |
363 | (sent 2 HTTP requests and * bytes; received * bytes in responses) (glob) |
|
363 | (sent 2 HTTP requests and * bytes; received * bytes in responses) (glob) | |
364 |
|
364 | |||
365 | $ killdaemons.py |
|
365 | $ killdaemons.py | |
366 |
|
366 | |||
367 | HTTP client follows HTTP redirect on handshake to new repo |
|
367 | HTTP client follows HTTP redirect on handshake to new repo | |
368 |
|
368 | |||
369 | $ cd $TESTTMP |
|
369 | $ cd $TESTTMP | |
370 |
|
370 | |||
371 | $ hg init redirector |
|
371 | $ hg init redirector | |
372 | $ hg init redirected |
|
372 | $ hg init redirected | |
373 | $ cd redirected |
|
373 | $ cd redirected | |
374 | $ touch foo |
|
374 | $ touch foo | |
375 | $ hg -q commit -A -m initial |
|
375 | $ hg -q commit -A -m initial | |
376 | $ cd .. |
|
376 | $ cd .. | |
377 |
|
377 | |||
378 | $ cat > paths.conf << EOF |
|
378 | $ cat > paths.conf << EOF | |
379 | > [paths] |
|
379 | > [paths] | |
380 | > / = $TESTTMP/* |
|
380 | > / = $TESTTMP/* | |
381 | > EOF |
|
381 | > EOF | |
382 |
|
382 | |||
383 | $ cat > redirectext.py << EOF |
|
383 | $ cat > redirectext.py << EOF | |
384 | > from mercurial import extensions, wireprotoserver |
|
384 | > from mercurial import extensions, wireprotoserver | |
385 | > def wrappedcallhttp(orig, repo, req, res, proto, cmd): |
|
385 | > def wrappedcallhttp(orig, repo, req, res, proto, cmd): | |
386 | > path = req.advertisedurl[len(req.advertisedbaseurl):] |
|
386 | > path = req.advertisedurl[len(req.advertisedbaseurl):] | |
387 | > if not path.startswith(b'/redirector'): |
|
387 | > if not path.startswith(b'/redirector'): | |
388 | > return orig(repo, req, res, proto, cmd) |
|
388 | > return orig(repo, req, res, proto, cmd) | |
389 | > relpath = path[len(b'/redirector'):] |
|
389 | > relpath = path[len(b'/redirector'):] | |
390 | > res.status = b'301 Redirect' |
|
390 | > res.status = b'301 Redirect' | |
391 | > newurl = b'%s/redirected%s' % (req.baseurl, relpath) |
|
391 | > newurl = b'%s/redirected%s' % (req.baseurl, relpath) | |
392 | > if not repo.ui.configbool(b'testing', b'redirectqs', True) and b'?' in newurl: |
|
392 | > if not repo.ui.configbool(b'testing', b'redirectqs', True) and b'?' in newurl: | |
393 | > newurl = newurl[0:newurl.index(b'?')] |
|
393 | > newurl = newurl[0:newurl.index(b'?')] | |
394 | > res.headers[b'Location'] = newurl |
|
394 | > res.headers[b'Location'] = newurl | |
395 | > res.headers[b'Content-Type'] = b'text/plain' |
|
395 | > res.headers[b'Content-Type'] = b'text/plain' | |
396 | > res.setbodybytes(b'redirected') |
|
396 | > res.setbodybytes(b'redirected') | |
397 | > return True |
|
397 | > return True | |
398 | > |
|
398 | > | |
399 | > extensions.wrapfunction(wireprotoserver, '_callhttp', wrappedcallhttp) |
|
399 | > extensions.wrapfunction(wireprotoserver, '_callhttp', wrappedcallhttp) | |
400 | > EOF |
|
400 | > EOF | |
401 |
|
401 | |||
402 | $ hg --config extensions.redirect=$TESTTMP/redirectext.py \ |
|
402 | $ hg --config extensions.redirect=$TESTTMP/redirectext.py \ | |
403 | > --config server.compressionengines=zlib \ |
|
403 | > --config server.compressionengines=zlib \ | |
404 | > serve --web-conf paths.conf --pid-file hg.pid -p $HGPORT -d |
|
404 | > serve --web-conf paths.conf --pid-file hg.pid -p $HGPORT -d | |
405 | $ cat hg.pid > $DAEMON_PIDS |
|
405 | $ cat hg.pid > $DAEMON_PIDS | |
406 |
|
406 | |||
407 | Verify our HTTP 301 is served properly |
|
407 | Verify our HTTP 301 is served properly | |
408 |
|
408 | |||
409 | $ hg --verbose debugwireproto --peer raw http://$LOCALIP:$HGPORT << EOF |
|
409 | $ hg --verbose debugwireproto --peer raw http://$LOCALIP:$HGPORT << EOF | |
410 | > httprequest GET /redirector?cmd=capabilities |
|
410 | > httprequest GET /redirector?cmd=capabilities | |
411 | > user-agent: test |
|
411 | > user-agent: test | |
412 | > EOF |
|
412 | > EOF | |
413 | using raw connection to peer |
|
413 | using raw connection to peer | |
414 |
s> setsockopt(6, 1, 1) -> None ( |
|
414 | s> setsockopt(6, 1, 1) -> None (?) | |
415 |
|
|
415 | s> GET /redirector?cmd=capabilities HTTP/1.1\r\n | |
416 | s> Accept-Encoding: identity\r\n |
|
416 | s> Accept-Encoding: identity\r\n | |
417 | s> user-agent: test\r\n |
|
417 | s> user-agent: test\r\n | |
418 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
418 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
419 | s> \r\n |
|
419 | s> \r\n | |
420 | s> makefile('rb', None) |
|
420 | s> makefile('rb', None) | |
421 | s> HTTP/1.1 301 Redirect\r\n |
|
421 | s> HTTP/1.1 301 Redirect\r\n | |
422 | s> Server: testing stub value\r\n |
|
422 | s> Server: testing stub value\r\n | |
423 | s> Date: $HTTP_DATE$\r\n |
|
423 | s> Date: $HTTP_DATE$\r\n | |
424 | s> Location: http://$LOCALIP:$HGPORT/redirected?cmd=capabilities\r\n (glob) |
|
424 | s> Location: http://$LOCALIP:$HGPORT/redirected?cmd=capabilities\r\n (glob) | |
425 | s> Content-Type: text/plain\r\n |
|
425 | s> Content-Type: text/plain\r\n | |
426 | s> Content-Length: 10\r\n |
|
426 | s> Content-Length: 10\r\n | |
427 | s> \r\n |
|
427 | s> \r\n | |
428 | s> redirected |
|
428 | s> redirected | |
429 |
s> setsockopt(6, 1, 1) -> None ( |
|
429 | s> setsockopt(6, 1, 1) -> None (?) | |
430 |
|
|
430 | s> GET /redirected?cmd=capabilities HTTP/1.1\r\n | |
431 | s> Accept-Encoding: identity\r\n |
|
431 | s> Accept-Encoding: identity\r\n | |
432 | s> user-agent: test\r\n |
|
432 | s> user-agent: test\r\n | |
433 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
433 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
434 | s> \r\n |
|
434 | s> \r\n | |
435 | s> makefile('rb', None) |
|
435 | s> makefile('rb', None) | |
436 | s> HTTP/1.1 200 Script output follows\r\n |
|
436 | s> HTTP/1.1 200 Script output follows\r\n | |
437 | s> Server: testing stub value\r\n |
|
437 | s> Server: testing stub value\r\n | |
438 | s> Date: $HTTP_DATE$\r\n |
|
438 | s> Date: $HTTP_DATE$\r\n | |
439 | s> Content-Type: application/mercurial-0.1\r\n |
|
439 | s> Content-Type: application/mercurial-0.1\r\n | |
440 | s> Content-Length: 480\r\n |
|
440 | s> Content-Length: 480\r\n | |
441 | s> \r\n |
|
441 | s> \r\n | |
442 | s> batch 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 |
|
442 | s> batch 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 | |
443 |
|
443 | |||
444 | Test with the HTTP peer |
|
444 | Test with the HTTP peer | |
445 |
|
445 | |||
446 | $ hg --verbose debugwireproto http://$LOCALIP:$HGPORT/redirector << EOF |
|
446 | $ hg --verbose debugwireproto http://$LOCALIP:$HGPORT/redirector << EOF | |
447 | > command heads |
|
447 | > command heads | |
448 | > EOF |
|
448 | > EOF | |
449 |
s> setsockopt(6, 1, 1) -> None ( |
|
449 | s> setsockopt(6, 1, 1) -> None (?) | |
450 |
|
|
450 | s> GET /redirector?cmd=capabilities HTTP/1.1\r\n | |
451 | s> Accept-Encoding: identity\r\n |
|
451 | s> Accept-Encoding: identity\r\n | |
452 | s> accept: application/mercurial-0.1\r\n |
|
452 | s> accept: application/mercurial-0.1\r\n | |
453 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
453 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
454 | s> user-agent: Mercurial debugwireproto\r\n |
|
454 | s> user-agent: Mercurial debugwireproto\r\n | |
455 | s> \r\n |
|
455 | s> \r\n | |
456 | s> makefile('rb', None) |
|
456 | s> makefile('rb', None) | |
457 | s> HTTP/1.1 301 Redirect\r\n |
|
457 | s> HTTP/1.1 301 Redirect\r\n | |
458 | s> Server: testing stub value\r\n |
|
458 | s> Server: testing stub value\r\n | |
459 | s> Date: $HTTP_DATE$\r\n |
|
459 | s> Date: $HTTP_DATE$\r\n | |
460 | s> Location: http://$LOCALIP:$HGPORT/redirected?cmd=capabilities\r\n (glob) |
|
460 | s> Location: http://$LOCALIP:$HGPORT/redirected?cmd=capabilities\r\n (glob) | |
461 | s> Content-Type: text/plain\r\n |
|
461 | s> Content-Type: text/plain\r\n | |
462 | s> Content-Length: 10\r\n |
|
462 | s> Content-Length: 10\r\n | |
463 | s> \r\n |
|
463 | s> \r\n | |
464 | s> redirected |
|
464 | s> redirected | |
465 |
s> setsockopt(6, 1, 1) -> None ( |
|
465 | s> setsockopt(6, 1, 1) -> None (?) | |
466 |
|
|
466 | s> GET /redirected?cmd=capabilities HTTP/1.1\r\n | |
467 | s> Accept-Encoding: identity\r\n |
|
467 | s> Accept-Encoding: identity\r\n | |
468 | s> accept: application/mercurial-0.1\r\n |
|
468 | s> accept: application/mercurial-0.1\r\n | |
469 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
469 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
470 | s> user-agent: Mercurial debugwireproto\r\n |
|
470 | s> user-agent: Mercurial debugwireproto\r\n | |
471 | s> \r\n |
|
471 | s> \r\n | |
472 | s> makefile('rb', None) |
|
472 | s> makefile('rb', None) | |
473 | s> HTTP/1.1 200 Script output follows\r\n |
|
473 | s> HTTP/1.1 200 Script output follows\r\n | |
474 | s> Server: testing stub value\r\n |
|
474 | s> Server: testing stub value\r\n | |
475 | s> Date: $HTTP_DATE$\r\n |
|
475 | s> Date: $HTTP_DATE$\r\n | |
476 | s> Content-Type: application/mercurial-0.1\r\n |
|
476 | s> Content-Type: application/mercurial-0.1\r\n | |
477 | s> Content-Length: 480\r\n |
|
477 | s> Content-Length: 480\r\n | |
478 | s> \r\n |
|
478 | s> \r\n | |
479 | real URL is http://$LOCALIP:$HGPORT/redirected (glob) |
|
479 | real URL is http://$LOCALIP:$HGPORT/redirected (glob) | |
480 | s> batch 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 |
|
480 | s> batch 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 | |
481 | sending heads command |
|
481 | sending heads command | |
482 |
s> setsockopt(6, 1, 1) -> None ( |
|
482 | s> setsockopt(6, 1, 1) -> None (?) | |
483 |
|
|
483 | s> GET /redirected?cmd=heads HTTP/1.1\r\n | |
484 | s> Accept-Encoding: identity\r\n |
|
484 | s> Accept-Encoding: identity\r\n | |
485 | s> vary: X-HgProto-1\r\n |
|
485 | s> vary: X-HgProto-1\r\n | |
486 | s> x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull\r\n |
|
486 | s> x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull\r\n | |
487 | s> accept: application/mercurial-0.1\r\n |
|
487 | s> accept: application/mercurial-0.1\r\n | |
488 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
488 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
489 | s> user-agent: Mercurial debugwireproto\r\n |
|
489 | s> user-agent: Mercurial debugwireproto\r\n | |
490 | s> \r\n |
|
490 | s> \r\n | |
491 | s> makefile('rb', None) |
|
491 | s> makefile('rb', None) | |
492 | s> HTTP/1.1 200 Script output follows\r\n |
|
492 | s> HTTP/1.1 200 Script output follows\r\n | |
493 | s> Server: testing stub value\r\n |
|
493 | s> Server: testing stub value\r\n | |
494 | s> Date: $HTTP_DATE$\r\n |
|
494 | s> Date: $HTTP_DATE$\r\n | |
495 | s> Content-Type: application/mercurial-0.1\r\n |
|
495 | s> Content-Type: application/mercurial-0.1\r\n | |
496 | s> Content-Length: 41\r\n |
|
496 | s> Content-Length: 41\r\n | |
497 | s> \r\n |
|
497 | s> \r\n | |
498 | s> 96ee1d7354c4ad7372047672c36a1f561e3a6a4c\n |
|
498 | s> 96ee1d7354c4ad7372047672c36a1f561e3a6a4c\n | |
499 | response: [ |
|
499 | response: [ | |
500 | b'\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL' |
|
500 | b'\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL' | |
501 | ] |
|
501 | ] | |
502 | (sent 3 HTTP requests and * bytes; received * bytes in responses) (glob) |
|
502 | (sent 3 HTTP requests and * bytes; received * bytes in responses) (glob) | |
503 |
|
503 | |||
504 | $ killdaemons.py |
|
504 | $ killdaemons.py | |
505 |
|
505 | |||
506 | Now test a variation where we strip the query string from the redirect URL. |
|
506 | Now test a variation where we strip the query string from the redirect URL. | |
507 | (SCM Manager apparently did this and clients would recover from it) |
|
507 | (SCM Manager apparently did this and clients would recover from it) | |
508 |
|
508 | |||
509 | $ hg --config extensions.redirect=$TESTTMP/redirectext.py \ |
|
509 | $ hg --config extensions.redirect=$TESTTMP/redirectext.py \ | |
510 | > --config server.compressionengines=zlib \ |
|
510 | > --config server.compressionengines=zlib \ | |
511 | > --config testing.redirectqs=false \ |
|
511 | > --config testing.redirectqs=false \ | |
512 | > serve --web-conf paths.conf --pid-file hg.pid -p $HGPORT -d |
|
512 | > serve --web-conf paths.conf --pid-file hg.pid -p $HGPORT -d | |
513 | $ cat hg.pid > $DAEMON_PIDS |
|
513 | $ cat hg.pid > $DAEMON_PIDS | |
514 |
|
514 | |||
515 | $ hg --verbose debugwireproto --peer raw http://$LOCALIP:$HGPORT << EOF |
|
515 | $ hg --verbose debugwireproto --peer raw http://$LOCALIP:$HGPORT << EOF | |
516 | > httprequest GET /redirector?cmd=capabilities |
|
516 | > httprequest GET /redirector?cmd=capabilities | |
517 | > user-agent: test |
|
517 | > user-agent: test | |
518 | > EOF |
|
518 | > EOF | |
519 | using raw connection to peer |
|
519 | using raw connection to peer | |
520 |
s> setsockopt(6, 1, 1) -> None ( |
|
520 | s> setsockopt(6, 1, 1) -> None (?) | |
521 |
|
|
521 | s> GET /redirector?cmd=capabilities HTTP/1.1\r\n | |
522 | s> Accept-Encoding: identity\r\n |
|
522 | s> Accept-Encoding: identity\r\n | |
523 | s> user-agent: test\r\n |
|
523 | s> user-agent: test\r\n | |
524 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
524 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
525 | s> \r\n |
|
525 | s> \r\n | |
526 | s> makefile('rb', None) |
|
526 | s> makefile('rb', None) | |
527 | s> HTTP/1.1 301 Redirect\r\n |
|
527 | s> HTTP/1.1 301 Redirect\r\n | |
528 | s> Server: testing stub value\r\n |
|
528 | s> Server: testing stub value\r\n | |
529 | s> Date: $HTTP_DATE$\r\n |
|
529 | s> Date: $HTTP_DATE$\r\n | |
530 | s> Location: http://$LOCALIP:$HGPORT/redirected\r\n (glob) |
|
530 | s> Location: http://$LOCALIP:$HGPORT/redirected\r\n (glob) | |
531 | s> Content-Type: text/plain\r\n |
|
531 | s> Content-Type: text/plain\r\n | |
532 | s> Content-Length: 10\r\n |
|
532 | s> Content-Length: 10\r\n | |
533 | s> \r\n |
|
533 | s> \r\n | |
534 | s> redirected |
|
534 | s> redirected | |
535 |
s> setsockopt(6, 1, 1) -> None ( |
|
535 | s> setsockopt(6, 1, 1) -> None (?) | |
536 |
|
|
536 | s> GET /redirected HTTP/1.1\r\n | |
537 | s> Accept-Encoding: identity\r\n |
|
537 | s> Accept-Encoding: identity\r\n | |
538 | s> user-agent: test\r\n |
|
538 | s> user-agent: test\r\n | |
539 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
539 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
540 | s> \r\n |
|
540 | s> \r\n | |
541 | s> makefile('rb', None) |
|
541 | s> makefile('rb', None) | |
542 | s> HTTP/1.1 200 Script output follows\r\n |
|
542 | s> HTTP/1.1 200 Script output follows\r\n | |
543 | s> Server: testing stub value\r\n |
|
543 | s> Server: testing stub value\r\n | |
544 | s> Date: $HTTP_DATE$\r\n |
|
544 | s> Date: $HTTP_DATE$\r\n | |
545 | s> ETag: W/"*"\r\n (glob) |
|
545 | s> ETag: W/"*"\r\n (glob) | |
546 | s> Content-Type: text/html; charset=ascii\r\n |
|
546 | s> Content-Type: text/html; charset=ascii\r\n | |
547 | s> Transfer-Encoding: chunked\r\n |
|
547 | s> Transfer-Encoding: chunked\r\n | |
548 | s> \r\n |
|
548 | s> \r\n | |
549 | s> 414\r\n |
|
549 | s> 414\r\n | |
550 | s> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">\n |
|
550 | s> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">\n | |
551 | s> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">\n |
|
551 | s> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">\n | |
552 | s> <head>\n |
|
552 | s> <head>\n | |
553 | s> <link rel="icon" href="/redirected/static/hgicon.png" type="image/png" />\n |
|
553 | s> <link rel="icon" href="/redirected/static/hgicon.png" type="image/png" />\n | |
554 | s> <meta name="robots" content="index, nofollow" />\n |
|
554 | s> <meta name="robots" content="index, nofollow" />\n | |
555 | s> <link rel="stylesheet" href="/redirected/static/style-paper.css" type="text/css" />\n |
|
555 | s> <link rel="stylesheet" href="/redirected/static/style-paper.css" type="text/css" />\n | |
556 | s> <script type="text/javascript" src="/redirected/static/mercurial.js"></script>\n |
|
556 | s> <script type="text/javascript" src="/redirected/static/mercurial.js"></script>\n | |
557 | s> \n |
|
557 | s> \n | |
558 | s> <title>redirected: log</title>\n |
|
558 | s> <title>redirected: log</title>\n | |
559 | s> <link rel="alternate" type="application/atom+xml"\n |
|
559 | s> <link rel="alternate" type="application/atom+xml"\n | |
560 | s> href="/redirected/atom-log" title="Atom feed for redirected" />\n |
|
560 | s> href="/redirected/atom-log" title="Atom feed for redirected" />\n | |
561 | s> <link rel="alternate" type="application/rss+xml"\n |
|
561 | s> <link rel="alternate" type="application/rss+xml"\n | |
562 | s> href="/redirected/rss-log" title="RSS feed for redirected" />\n |
|
562 | s> href="/redirected/rss-log" title="RSS feed for redirected" />\n | |
563 | s> </head>\n |
|
563 | s> </head>\n | |
564 | s> <body>\n |
|
564 | s> <body>\n | |
565 | s> \n |
|
565 | s> \n | |
566 | s> <div class="container">\n |
|
566 | s> <div class="container">\n | |
567 | s> <div class="menu">\n |
|
567 | s> <div class="menu">\n | |
568 | s> <div class="logo">\n |
|
568 | s> <div class="logo">\n | |
569 | s> <a href="https://mercurial-scm.org/">\n |
|
569 | s> <a href="https://mercurial-scm.org/">\n | |
570 | s> <img src="/redirected/static/hglogo.png" alt="mercurial" /></a>\n |
|
570 | s> <img src="/redirected/static/hglogo.png" alt="mercurial" /></a>\n | |
571 | s> </div>\n |
|
571 | s> </div>\n | |
572 | s> <ul>\n |
|
572 | s> <ul>\n | |
573 | s> <li class="active">log</li>\n |
|
573 | s> <li class="active">log</li>\n | |
574 | s> <li><a href="/redirected/graph/tip">graph</a></li>\n |
|
574 | s> <li><a href="/redirected/graph/tip">graph</a></li>\n | |
575 | s> <li><a href="/redirected/tags">tags</a></li>\n |
|
575 | s> <li><a href="/redirected/tags">tags</a></li>\n | |
576 | s> <li><a href=" |
|
576 | s> <li><a href=" | |
577 | s> \r\n |
|
577 | s> \r\n | |
578 | s> 810\r\n |
|
578 | s> 810\r\n | |
579 | s> /redirected/bookmarks">bookmarks</a></li>\n |
|
579 | s> /redirected/bookmarks">bookmarks</a></li>\n | |
580 | s> <li><a href="/redirected/branches">branches</a></li>\n |
|
580 | s> <li><a href="/redirected/branches">branches</a></li>\n | |
581 | s> </ul>\n |
|
581 | s> </ul>\n | |
582 | s> <ul>\n |
|
582 | s> <ul>\n | |
583 | s> <li><a href="/redirected/rev/tip">changeset</a></li>\n |
|
583 | s> <li><a href="/redirected/rev/tip">changeset</a></li>\n | |
584 | s> <li><a href="/redirected/file/tip">browse</a></li>\n |
|
584 | s> <li><a href="/redirected/file/tip">browse</a></li>\n | |
585 | s> </ul>\n |
|
585 | s> </ul>\n | |
586 | s> <ul>\n |
|
586 | s> <ul>\n | |
587 | s> \n |
|
587 | s> \n | |
588 | s> </ul>\n |
|
588 | s> </ul>\n | |
589 | s> <ul>\n |
|
589 | s> <ul>\n | |
590 | s> <li><a href="/redirected/help">help</a></li>\n |
|
590 | s> <li><a href="/redirected/help">help</a></li>\n | |
591 | s> </ul>\n |
|
591 | s> </ul>\n | |
592 | s> <div class="atom-logo">\n |
|
592 | s> <div class="atom-logo">\n | |
593 | s> <a href="/redirected/atom-log" title="subscribe to atom feed">\n |
|
593 | s> <a href="/redirected/atom-log" title="subscribe to atom feed">\n | |
594 | s> <img class="atom-logo" src="/redirected/static/feed-icon-14x14.png" alt="atom feed" />\n |
|
594 | s> <img class="atom-logo" src="/redirected/static/feed-icon-14x14.png" alt="atom feed" />\n | |
595 | s> </a>\n |
|
595 | s> </a>\n | |
596 | s> </div>\n |
|
596 | s> </div>\n | |
597 | s> </div>\n |
|
597 | s> </div>\n | |
598 | s> \n |
|
598 | s> \n | |
599 | s> <div class="main">\n |
|
599 | s> <div class="main">\n | |
600 | s> <h2 class="breadcrumb"><a href="/">Mercurial</a> > <a href="/redirected">redirected</a> </h2>\n |
|
600 | s> <h2 class="breadcrumb"><a href="/">Mercurial</a> > <a href="/redirected">redirected</a> </h2>\n | |
601 | s> <h3>log</h3>\n |
|
601 | s> <h3>log</h3>\n | |
602 | s> \n |
|
602 | s> \n | |
603 | s> \n |
|
603 | s> \n | |
604 | s> <form class="search" action="/redirected/log">\n |
|
604 | s> <form class="search" action="/redirected/log">\n | |
605 | s> \n |
|
605 | s> \n | |
606 | s> <p><input name="rev" id="search1" type="text" size="30" value="" /></p>\n |
|
606 | s> <p><input name="rev" id="search1" type="text" size="30" value="" /></p>\n | |
607 | s> <div id="hint">Find changesets by keywords (author, files, the commit message), revision\n |
|
607 | s> <div id="hint">Find changesets by keywords (author, files, the commit message), revision\n | |
608 | s> number or hash, or <a href="/redirected/help/revsets">revset expression</a>.</div>\n |
|
608 | s> number or hash, or <a href="/redirected/help/revsets">revset expression</a>.</div>\n | |
609 | s> </form>\n |
|
609 | s> </form>\n | |
610 | s> \n |
|
610 | s> \n | |
611 | s> <div class="navigate">\n |
|
611 | s> <div class="navigate">\n | |
612 | s> <a href="/redirected/shortlog/tip?revcount=30">less</a>\n |
|
612 | s> <a href="/redirected/shortlog/tip?revcount=30">less</a>\n | |
613 | s> <a href="/redirected/shortlog/tip?revcount=120">more</a>\n |
|
613 | s> <a href="/redirected/shortlog/tip?revcount=120">more</a>\n | |
614 | s> | rev 0: <a href="/redirected/shortlog/96ee1d7354c4">(0)</a> <a href="/redirected/shortlog/tip">tip</a> \n |
|
614 | s> | rev 0: <a href="/redirected/shortlog/96ee1d7354c4">(0)</a> <a href="/redirected/shortlog/tip">tip</a> \n | |
615 | s> </div>\n |
|
615 | s> </div>\n | |
616 | s> \n |
|
616 | s> \n | |
617 | s> <table class="bigtable">\n |
|
617 | s> <table class="bigtable">\n | |
618 | s> <thead>\n |
|
618 | s> <thead>\n | |
619 | s> <tr>\n |
|
619 | s> <tr>\n | |
620 | s> <th class="age">age</th>\n |
|
620 | s> <th class="age">age</th>\n | |
621 | s> <th class="author">author</th>\n |
|
621 | s> <th class="author">author</th>\n | |
622 | s> <th class="description">description</th>\n |
|
622 | s> <th class="description">description</th>\n | |
623 | s> </tr>\n |
|
623 | s> </tr>\n | |
624 | s> </thead>\n |
|
624 | s> </thead>\n | |
625 | s> <tbody class="stripes2">\n |
|
625 | s> <tbody class="stripes2">\n | |
626 | s> <tr>\n |
|
626 | s> <tr>\n | |
627 | s> <td class="age">Thu, 01 Jan 1970 00:00:00 +0000</td>\n |
|
627 | s> <td class="age">Thu, 01 Jan 1970 00:00:00 +0000</td>\n | |
628 | s> <td class="author">test</td>\n |
|
628 | s> <td class="author">test</td>\n | |
629 | s> <td class="description">\n |
|
629 | s> <td class="description">\n | |
630 | s> <a href="/redirected/rev/96ee1d7354c4">initial</a>\n |
|
630 | s> <a href="/redirected/rev/96ee1d7354c4">initial</a>\n | |
631 | s> <span class="phase">draft</span> <span class="branchhead">default</span> <span class="tag">tip</span> \n |
|
631 | s> <span class="phase">draft</span> <span class="branchhead">default</span> <span class="tag">tip</span> \n | |
632 | s> </td>\n |
|
632 | s> </td>\n | |
633 | s> </tr>\n |
|
633 | s> </tr>\n | |
634 | s> \n |
|
634 | s> \n | |
635 | s> </tbody>\n |
|
635 | s> </tbody>\n | |
636 | s> </table>\n |
|
636 | s> </table>\n | |
637 | s> \n |
|
637 | s> \n | |
638 | s> <div class="navigate">\n |
|
638 | s> <div class="navigate">\n | |
639 | s> <a href="/redirected/shortlog/tip?revcount=30">less</a>\n |
|
639 | s> <a href="/redirected/shortlog/tip?revcount=30">less</a>\n | |
640 | s> <a href="/redirected/shortlog/tip?revcount=120">more</a>\n |
|
640 | s> <a href="/redirected/shortlog/tip?revcount=120">more</a>\n | |
641 | s> | rev 0: <a href="/redirected/shortlog/96ee1d7354c4">(0)</a> <a href="/redirected/shortlog/tip">tip</a> \n |
|
641 | s> | rev 0: <a href="/redirected/shortlog/96ee1d7354c4">(0)</a> <a href="/redirected/shortlog/tip">tip</a> \n | |
642 | s> </div>\n |
|
642 | s> </div>\n | |
643 | s> \n |
|
643 | s> \n | |
644 | s> <script type="text/javascript">\n |
|
644 | s> <script type="text/javascript">\n | |
645 | s> ajaxScrollInit(\n |
|
645 | s> ajaxScrollInit(\n | |
646 | s> \'/redirected/shortlog/%next%\',\n |
|
646 | s> \'/redirected/shortlog/%next%\',\n | |
647 | s> \'\', <!-- NEXTHASH\n |
|
647 | s> \'\', <!-- NEXTHASH\n | |
648 | s> function (htmlText) { |
|
648 | s> function (htmlText) { | |
649 | s> \r\n |
|
649 | s> \r\n | |
650 | s> 14a\r\n |
|
650 | s> 14a\r\n | |
651 | s> \n |
|
651 | s> \n | |
652 | s> var m = htmlText.match(/\'(\\w+)\', <!-- NEXTHASH/);\n |
|
652 | s> var m = htmlText.match(/\'(\\w+)\', <!-- NEXTHASH/);\n | |
653 | s> return m ? m[1] : null;\n |
|
653 | s> return m ? m[1] : null;\n | |
654 | s> },\n |
|
654 | s> },\n | |
655 | s> \'.bigtable > tbody\',\n |
|
655 | s> \'.bigtable > tbody\',\n | |
656 | s> \'<tr class="%class%">\\\n |
|
656 | s> \'<tr class="%class%">\\\n | |
657 | s> <td colspan="3" style="text-align: center;">%text%</td>\\\n |
|
657 | s> <td colspan="3" style="text-align: center;">%text%</td>\\\n | |
658 | s> </tr>\'\n |
|
658 | s> </tr>\'\n | |
659 | s> );\n |
|
659 | s> );\n | |
660 | s> </script>\n |
|
660 | s> </script>\n | |
661 | s> \n |
|
661 | s> \n | |
662 | s> </div>\n |
|
662 | s> </div>\n | |
663 | s> </div>\n |
|
663 | s> </div>\n | |
664 | s> \n |
|
664 | s> \n | |
665 | s> \n |
|
665 | s> \n | |
666 | s> \n |
|
666 | s> \n | |
667 | s> </body>\n |
|
667 | s> </body>\n | |
668 | s> </html>\n |
|
668 | s> </html>\n | |
669 | s> \n |
|
669 | s> \n | |
670 | s> \r\n |
|
670 | s> \r\n | |
671 | s> 0\r\n |
|
671 | s> 0\r\n | |
672 | s> \r\n |
|
672 | s> \r\n | |
673 |
|
673 | |||
674 | $ hg --verbose debugwireproto http://$LOCALIP:$HGPORT/redirector << EOF |
|
674 | $ hg --verbose debugwireproto http://$LOCALIP:$HGPORT/redirector << EOF | |
675 | > command heads |
|
675 | > command heads | |
676 | > EOF |
|
676 | > EOF | |
677 |
s> setsockopt(6, 1, 1) -> None ( |
|
677 | s> setsockopt(6, 1, 1) -> None (?) | |
678 |
|
|
678 | s> GET /redirector?cmd=capabilities HTTP/1.1\r\n | |
679 | s> Accept-Encoding: identity\r\n |
|
679 | s> Accept-Encoding: identity\r\n | |
680 | s> accept: application/mercurial-0.1\r\n |
|
680 | s> accept: application/mercurial-0.1\r\n | |
681 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
681 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
682 | s> user-agent: Mercurial debugwireproto\r\n |
|
682 | s> user-agent: Mercurial debugwireproto\r\n | |
683 | s> \r\n |
|
683 | s> \r\n | |
684 | s> makefile('rb', None) |
|
684 | s> makefile('rb', None) | |
685 | s> HTTP/1.1 301 Redirect\r\n |
|
685 | s> HTTP/1.1 301 Redirect\r\n | |
686 | s> Server: testing stub value\r\n |
|
686 | s> Server: testing stub value\r\n | |
687 | s> Date: $HTTP_DATE$\r\n |
|
687 | s> Date: $HTTP_DATE$\r\n | |
688 | s> Location: http://$LOCALIP:$HGPORT/redirected\r\n (glob) |
|
688 | s> Location: http://$LOCALIP:$HGPORT/redirected\r\n (glob) | |
689 | s> Content-Type: text/plain\r\n |
|
689 | s> Content-Type: text/plain\r\n | |
690 | s> Content-Length: 10\r\n |
|
690 | s> Content-Length: 10\r\n | |
691 | s> \r\n |
|
691 | s> \r\n | |
692 | s> redirected |
|
692 | s> redirected | |
693 |
s> setsockopt(6, 1, 1) -> None ( |
|
693 | s> setsockopt(6, 1, 1) -> None (?) | |
694 |
|
|
694 | s> GET /redirected HTTP/1.1\r\n | |
695 | s> Accept-Encoding: identity\r\n |
|
695 | s> Accept-Encoding: identity\r\n | |
696 | s> accept: application/mercurial-0.1\r\n |
|
696 | s> accept: application/mercurial-0.1\r\n | |
697 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
697 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
698 | s> user-agent: Mercurial debugwireproto\r\n |
|
698 | s> user-agent: Mercurial debugwireproto\r\n | |
699 | s> \r\n |
|
699 | s> \r\n | |
700 | s> makefile('rb', None) |
|
700 | s> makefile('rb', None) | |
701 | s> HTTP/1.1 200 Script output follows\r\n |
|
701 | s> HTTP/1.1 200 Script output follows\r\n | |
702 | s> Server: testing stub value\r\n |
|
702 | s> Server: testing stub value\r\n | |
703 | s> Date: $HTTP_DATE$\r\n |
|
703 | s> Date: $HTTP_DATE$\r\n | |
704 | s> ETag: W/"*"\r\n (glob) |
|
704 | s> ETag: W/"*"\r\n (glob) | |
705 | s> Content-Type: text/html; charset=ascii\r\n |
|
705 | s> Content-Type: text/html; charset=ascii\r\n | |
706 | s> Transfer-Encoding: chunked\r\n |
|
706 | s> Transfer-Encoding: chunked\r\n | |
707 | s> \r\n |
|
707 | s> \r\n | |
708 | real URL is http://$LOCALIP:$HGPORT/redirected (glob) |
|
708 | real URL is http://$LOCALIP:$HGPORT/redirected (glob) | |
709 | s> 414\r\n |
|
709 | s> 414\r\n | |
710 | s> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">\n |
|
710 | s> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">\n | |
711 | s> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">\n |
|
711 | s> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">\n | |
712 | s> <head>\n |
|
712 | s> <head>\n | |
713 | s> <link rel="icon" href="/redirected/static/hgicon.png" type="image/png" />\n |
|
713 | s> <link rel="icon" href="/redirected/static/hgicon.png" type="image/png" />\n | |
714 | s> <meta name="robots" content="index, nofollow" />\n |
|
714 | s> <meta name="robots" content="index, nofollow" />\n | |
715 | s> <link rel="stylesheet" href="/redirected/static/style-paper.css" type="text/css" />\n |
|
715 | s> <link rel="stylesheet" href="/redirected/static/style-paper.css" type="text/css" />\n | |
716 | s> <script type="text/javascript" src="/redirected/static/mercurial.js"></script>\n |
|
716 | s> <script type="text/javascript" src="/redirected/static/mercurial.js"></script>\n | |
717 | s> \n |
|
717 | s> \n | |
718 | s> <title>redirected: log</title>\n |
|
718 | s> <title>redirected: log</title>\n | |
719 | s> <link rel="alternate" type="application/atom+xml"\n |
|
719 | s> <link rel="alternate" type="application/atom+xml"\n | |
720 | s> href="/redirected/atom-log" title="Atom feed for redirected" />\n |
|
720 | s> href="/redirected/atom-log" title="Atom feed for redirected" />\n | |
721 | s> <link rel="alternate" type="application/rss+xml"\n |
|
721 | s> <link rel="alternate" type="application/rss+xml"\n | |
722 | s> href="/redirected/rss-log" title="RSS feed for redirected" />\n |
|
722 | s> href="/redirected/rss-log" title="RSS feed for redirected" />\n | |
723 | s> </head>\n |
|
723 | s> </head>\n | |
724 | s> <body>\n |
|
724 | s> <body>\n | |
725 | s> \n |
|
725 | s> \n | |
726 | s> <div class="container">\n |
|
726 | s> <div class="container">\n | |
727 | s> <div class="menu">\n |
|
727 | s> <div class="menu">\n | |
728 | s> <div class="logo">\n |
|
728 | s> <div class="logo">\n | |
729 | s> <a href="https://mercurial-scm.org/">\n |
|
729 | s> <a href="https://mercurial-scm.org/">\n | |
730 | s> <img src="/redirected/static/hglogo.png" alt="mercurial" /></a>\n |
|
730 | s> <img src="/redirected/static/hglogo.png" alt="mercurial" /></a>\n | |
731 | s> </div>\n |
|
731 | s> </div>\n | |
732 | s> <ul>\n |
|
732 | s> <ul>\n | |
733 | s> <li class="active">log</li>\n |
|
733 | s> <li class="active">log</li>\n | |
734 | s> <li><a href="/redirected/graph/tip">graph</a></li>\n |
|
734 | s> <li><a href="/redirected/graph/tip">graph</a></li>\n | |
735 | s> <li><a href="/redirected/tags">tags</a |
|
735 | s> <li><a href="/redirected/tags">tags</a | |
736 |
s> setsockopt(6, 1, 1) -> None ( |
|
736 | s> setsockopt(6, 1, 1) -> None (?) | |
737 | s> GET /redirected?cmd=capabilities HTTP/1.1\r\n |
|
737 | s> GET /redirected?cmd=capabilities HTTP/1.1\r\n | |
738 | s> Accept-Encoding: identity\r\n |
|
738 | s> Accept-Encoding: identity\r\n | |
739 | s> accept: application/mercurial-0.1\r\n |
|
739 | s> accept: application/mercurial-0.1\r\n | |
740 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
740 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
741 | s> user-agent: Mercurial debugwireproto\r\n |
|
741 | s> user-agent: Mercurial debugwireproto\r\n | |
742 | s> \r\n |
|
742 | s> \r\n | |
743 | s> makefile('rb', None) |
|
743 | s> makefile('rb', None) | |
744 | s> HTTP/1.1 200 Script output follows\r\n |
|
744 | s> HTTP/1.1 200 Script output follows\r\n | |
745 | s> Server: testing stub value\r\n |
|
745 | s> Server: testing stub value\r\n | |
746 | s> Date: $HTTP_DATE$\r\n |
|
746 | s> Date: $HTTP_DATE$\r\n | |
747 | s> Content-Type: application/mercurial-0.1\r\n |
|
747 | s> Content-Type: application/mercurial-0.1\r\n | |
748 | s> Content-Length: 480\r\n |
|
748 | s> Content-Length: 480\r\n | |
749 | s> \r\n |
|
749 | s> \r\n | |
750 | real URL is http://$LOCALIP:$HGPORT/redirected (glob) |
|
750 | real URL is http://$LOCALIP:$HGPORT/redirected (glob) | |
751 | s> batch 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 |
|
751 | s> batch 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 | |
752 | sending heads command |
|
752 | sending heads command | |
753 |
s> setsockopt(6, 1, 1) -> None ( |
|
753 | s> setsockopt(6, 1, 1) -> None (?) | |
754 |
|
|
754 | s> GET /redirected?cmd=heads HTTP/1.1\r\n | |
755 | s> Accept-Encoding: identity\r\n |
|
755 | s> Accept-Encoding: identity\r\n | |
756 | s> vary: X-HgProto-1\r\n |
|
756 | s> vary: X-HgProto-1\r\n | |
757 | s> x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull\r\n |
|
757 | s> x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull\r\n | |
758 | s> accept: application/mercurial-0.1\r\n |
|
758 | s> accept: application/mercurial-0.1\r\n | |
759 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
759 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
760 | s> user-agent: Mercurial debugwireproto\r\n |
|
760 | s> user-agent: Mercurial debugwireproto\r\n | |
761 | s> \r\n |
|
761 | s> \r\n | |
762 | s> makefile('rb', None) |
|
762 | s> makefile('rb', None) | |
763 | s> HTTP/1.1 200 Script output follows\r\n |
|
763 | s> HTTP/1.1 200 Script output follows\r\n | |
764 | s> Server: testing stub value\r\n |
|
764 | s> Server: testing stub value\r\n | |
765 | s> Date: $HTTP_DATE$\r\n |
|
765 | s> Date: $HTTP_DATE$\r\n | |
766 | s> Content-Type: application/mercurial-0.1\r\n |
|
766 | s> Content-Type: application/mercurial-0.1\r\n | |
767 | s> Content-Length: 41\r\n |
|
767 | s> Content-Length: 41\r\n | |
768 | s> \r\n |
|
768 | s> \r\n | |
769 | s> 96ee1d7354c4ad7372047672c36a1f561e3a6a4c\n |
|
769 | s> 96ee1d7354c4ad7372047672c36a1f561e3a6a4c\n | |
770 | response: [ |
|
770 | response: [ | |
771 | b'\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL' |
|
771 | b'\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL' | |
772 | ] |
|
772 | ] | |
773 | (sent 4 HTTP requests and * bytes; received * bytes in responses) (glob) |
|
773 | (sent 4 HTTP requests and * bytes; received * bytes in responses) (glob) |
@@ -1,755 +1,755 b'' | |||||
1 | #require no-chg |
|
1 | #require no-chg | |
2 |
|
2 | |||
3 | $ . $TESTDIR/wireprotohelpers.sh |
|
3 | $ . $TESTDIR/wireprotohelpers.sh | |
4 |
|
4 | |||
5 | $ hg init server |
|
5 | $ hg init server | |
6 |
|
6 | |||
7 | zstd isn't present in plain builds. Make tests easier by removing |
|
7 | zstd isn't present in plain builds. Make tests easier by removing | |
8 | zstd from the equation. |
|
8 | zstd from the equation. | |
9 |
|
9 | |||
10 | $ cat >> server/.hg/hgrc << EOF |
|
10 | $ cat >> server/.hg/hgrc << EOF | |
11 | > [server] |
|
11 | > [server] | |
12 | > compressionengines = zlib |
|
12 | > compressionengines = zlib | |
13 | > EOF |
|
13 | > EOF | |
14 |
|
14 | |||
15 | $ hg -R server serve -p $HGPORT -d --pid-file hg.pid -E error.log |
|
15 | $ hg -R server serve -p $HGPORT -d --pid-file hg.pid -E error.log | |
16 | $ cat hg.pid > $DAEMON_PIDS |
|
16 | $ cat hg.pid > $DAEMON_PIDS | |
17 |
|
17 | |||
18 | A normal capabilities request is serviced for version 1 |
|
18 | A normal capabilities request is serviced for version 1 | |
19 |
|
19 | |||
20 | $ sendhttpraw << EOF |
|
20 | $ sendhttpraw << EOF | |
21 | > httprequest GET ?cmd=capabilities |
|
21 | > httprequest GET ?cmd=capabilities | |
22 | > user-agent: test |
|
22 | > user-agent: test | |
23 | > EOF |
|
23 | > EOF | |
24 | using raw connection to peer |
|
24 | using raw connection to peer | |
25 |
s> setsockopt(6, 1, 1) -> None ( |
|
25 | s> setsockopt(6, 1, 1) -> None (?) | |
26 |
|
|
26 | s> GET /?cmd=capabilities HTTP/1.1\r\n | |
27 | s> Accept-Encoding: identity\r\n |
|
27 | s> Accept-Encoding: identity\r\n | |
28 | s> user-agent: test\r\n |
|
28 | s> user-agent: test\r\n | |
29 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
29 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
30 | s> \r\n |
|
30 | s> \r\n | |
31 | s> makefile('rb', None) |
|
31 | s> makefile('rb', None) | |
32 | s> HTTP/1.1 200 Script output follows\r\n |
|
32 | s> HTTP/1.1 200 Script output follows\r\n | |
33 | s> Server: testing stub value\r\n |
|
33 | s> Server: testing stub value\r\n | |
34 | s> Date: $HTTP_DATE$\r\n |
|
34 | s> Date: $HTTP_DATE$\r\n | |
35 | s> Content-Type: application/mercurial-0.1\r\n |
|
35 | s> Content-Type: application/mercurial-0.1\r\n | |
36 | s> Content-Length: *\r\n (glob) |
|
36 | s> Content-Length: *\r\n (glob) | |
37 | s> \r\n |
|
37 | s> \r\n | |
38 | s> batch 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 |
|
38 | s> batch 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 | |
39 |
|
39 | |||
40 | A proper request without the API server enabled returns the legacy response |
|
40 | A proper request without the API server enabled returns the legacy response | |
41 |
|
41 | |||
42 | $ sendhttpraw << EOF |
|
42 | $ sendhttpraw << EOF | |
43 | > httprequest GET ?cmd=capabilities |
|
43 | > httprequest GET ?cmd=capabilities | |
44 | > user-agent: test |
|
44 | > user-agent: test | |
45 | > x-hgupgrade-1: foo |
|
45 | > x-hgupgrade-1: foo | |
46 | > x-hgproto-1: cbor |
|
46 | > x-hgproto-1: cbor | |
47 | > EOF |
|
47 | > EOF | |
48 | using raw connection to peer |
|
48 | using raw connection to peer | |
49 |
s> setsockopt(6, 1, 1) -> None ( |
|
49 | s> setsockopt(6, 1, 1) -> None (?) | |
50 |
|
|
50 | s> GET /?cmd=capabilities HTTP/1.1\r\n | |
51 | s> Accept-Encoding: identity\r\n |
|
51 | s> Accept-Encoding: identity\r\n | |
52 | s> user-agent: test\r\n |
|
52 | s> user-agent: test\r\n | |
53 | s> x-hgproto-1: cbor\r\n |
|
53 | s> x-hgproto-1: cbor\r\n | |
54 | s> x-hgupgrade-1: foo\r\n |
|
54 | s> x-hgupgrade-1: foo\r\n | |
55 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
55 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
56 | s> \r\n |
|
56 | s> \r\n | |
57 | s> makefile('rb', None) |
|
57 | s> makefile('rb', None) | |
58 | s> HTTP/1.1 200 Script output follows\r\n |
|
58 | s> HTTP/1.1 200 Script output follows\r\n | |
59 | s> Server: testing stub value\r\n |
|
59 | s> Server: testing stub value\r\n | |
60 | s> Date: $HTTP_DATE$\r\n |
|
60 | s> Date: $HTTP_DATE$\r\n | |
61 | s> Content-Type: application/mercurial-0.1\r\n |
|
61 | s> Content-Type: application/mercurial-0.1\r\n | |
62 | s> Content-Length: *\r\n (glob) |
|
62 | s> Content-Length: *\r\n (glob) | |
63 | s> \r\n |
|
63 | s> \r\n | |
64 | s> batch 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 |
|
64 | s> batch 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 | |
65 |
|
65 | |||
66 | Restart with just API server enabled. This enables serving the new format. |
|
66 | Restart with just API server enabled. This enables serving the new format. | |
67 |
|
67 | |||
68 | $ killdaemons.py |
|
68 | $ killdaemons.py | |
69 | $ cat error.log |
|
69 | $ cat error.log | |
70 |
|
70 | |||
71 | $ cat >> server/.hg/hgrc << EOF |
|
71 | $ cat >> server/.hg/hgrc << EOF | |
72 | > [experimental] |
|
72 | > [experimental] | |
73 | > web.apiserver = true |
|
73 | > web.apiserver = true | |
74 | > EOF |
|
74 | > EOF | |
75 |
|
75 | |||
76 | $ hg -R server serve -p $HGPORT -d --pid-file hg.pid -E error.log |
|
76 | $ hg -R server serve -p $HGPORT -d --pid-file hg.pid -E error.log | |
77 | $ cat hg.pid > $DAEMON_PIDS |
|
77 | $ cat hg.pid > $DAEMON_PIDS | |
78 |
|
78 | |||
79 | X-HgUpgrade-<N> without CBOR advertisement uses legacy response |
|
79 | X-HgUpgrade-<N> without CBOR advertisement uses legacy response | |
80 |
|
80 | |||
81 | $ sendhttpraw << EOF |
|
81 | $ sendhttpraw << EOF | |
82 | > httprequest GET ?cmd=capabilities |
|
82 | > httprequest GET ?cmd=capabilities | |
83 | > user-agent: test |
|
83 | > user-agent: test | |
84 | > x-hgupgrade-1: foo bar |
|
84 | > x-hgupgrade-1: foo bar | |
85 | > EOF |
|
85 | > EOF | |
86 | using raw connection to peer |
|
86 | using raw connection to peer | |
87 |
s> setsockopt(6, 1, 1) -> None ( |
|
87 | s> setsockopt(6, 1, 1) -> None (?) | |
88 |
|
|
88 | s> GET /?cmd=capabilities HTTP/1.1\r\n | |
89 | s> Accept-Encoding: identity\r\n |
|
89 | s> Accept-Encoding: identity\r\n | |
90 | s> user-agent: test\r\n |
|
90 | s> user-agent: test\r\n | |
91 | s> x-hgupgrade-1: foo bar\r\n |
|
91 | s> x-hgupgrade-1: foo bar\r\n | |
92 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
92 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
93 | s> \r\n |
|
93 | s> \r\n | |
94 | s> makefile('rb', None) |
|
94 | s> makefile('rb', None) | |
95 | s> HTTP/1.1 200 Script output follows\r\n |
|
95 | s> HTTP/1.1 200 Script output follows\r\n | |
96 | s> Server: testing stub value\r\n |
|
96 | s> Server: testing stub value\r\n | |
97 | s> Date: $HTTP_DATE$\r\n |
|
97 | s> Date: $HTTP_DATE$\r\n | |
98 | s> Content-Type: application/mercurial-0.1\r\n |
|
98 | s> Content-Type: application/mercurial-0.1\r\n | |
99 | s> Content-Length: *\r\n (glob) |
|
99 | s> Content-Length: *\r\n (glob) | |
100 | s> \r\n |
|
100 | s> \r\n | |
101 | s> batch 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 |
|
101 | s> batch 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 | |
102 |
|
102 | |||
103 | X-HgUpgrade-<N> without known serialization in X-HgProto-<N> uses legacy response |
|
103 | X-HgUpgrade-<N> without known serialization in X-HgProto-<N> uses legacy response | |
104 |
|
104 | |||
105 | $ sendhttpraw << EOF |
|
105 | $ sendhttpraw << EOF | |
106 | > httprequest GET ?cmd=capabilities |
|
106 | > httprequest GET ?cmd=capabilities | |
107 | > user-agent: test |
|
107 | > user-agent: test | |
108 | > x-hgupgrade-1: foo bar |
|
108 | > x-hgupgrade-1: foo bar | |
109 | > x-hgproto-1: some value |
|
109 | > x-hgproto-1: some value | |
110 | > EOF |
|
110 | > EOF | |
111 | using raw connection to peer |
|
111 | using raw connection to peer | |
112 |
s> setsockopt(6, 1, 1) -> None ( |
|
112 | s> setsockopt(6, 1, 1) -> None (?) | |
113 |
|
|
113 | s> GET /?cmd=capabilities HTTP/1.1\r\n | |
114 | s> Accept-Encoding: identity\r\n |
|
114 | s> Accept-Encoding: identity\r\n | |
115 | s> user-agent: test\r\n |
|
115 | s> user-agent: test\r\n | |
116 | s> x-hgproto-1: some value\r\n |
|
116 | s> x-hgproto-1: some value\r\n | |
117 | s> x-hgupgrade-1: foo bar\r\n |
|
117 | s> x-hgupgrade-1: foo bar\r\n | |
118 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
118 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
119 | s> \r\n |
|
119 | s> \r\n | |
120 | s> makefile('rb', None) |
|
120 | s> makefile('rb', None) | |
121 | s> HTTP/1.1 200 Script output follows\r\n |
|
121 | s> HTTP/1.1 200 Script output follows\r\n | |
122 | s> Server: testing stub value\r\n |
|
122 | s> Server: testing stub value\r\n | |
123 | s> Date: $HTTP_DATE$\r\n |
|
123 | s> Date: $HTTP_DATE$\r\n | |
124 | s> Content-Type: application/mercurial-0.1\r\n |
|
124 | s> Content-Type: application/mercurial-0.1\r\n | |
125 | s> Content-Length: *\r\n (glob) |
|
125 | s> Content-Length: *\r\n (glob) | |
126 | s> \r\n |
|
126 | s> \r\n | |
127 | s> batch 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 |
|
127 | s> batch 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 | |
128 |
|
128 | |||
129 | X-HgUpgrade-<N> + X-HgProto-<N> headers trigger new response format |
|
129 | X-HgUpgrade-<N> + X-HgProto-<N> headers trigger new response format | |
130 |
|
130 | |||
131 | $ sendhttpraw << EOF |
|
131 | $ sendhttpraw << EOF | |
132 | > httprequest GET ?cmd=capabilities |
|
132 | > httprequest GET ?cmd=capabilities | |
133 | > user-agent: test |
|
133 | > user-agent: test | |
134 | > x-hgupgrade-1: foo bar |
|
134 | > x-hgupgrade-1: foo bar | |
135 | > x-hgproto-1: cbor |
|
135 | > x-hgproto-1: cbor | |
136 | > EOF |
|
136 | > EOF | |
137 | using raw connection to peer |
|
137 | using raw connection to peer | |
138 |
s> setsockopt(6, 1, 1) -> None ( |
|
138 | s> setsockopt(6, 1, 1) -> None (?) | |
139 |
|
|
139 | s> GET /?cmd=capabilities HTTP/1.1\r\n | |
140 | s> Accept-Encoding: identity\r\n |
|
140 | s> Accept-Encoding: identity\r\n | |
141 | s> user-agent: test\r\n |
|
141 | s> user-agent: test\r\n | |
142 | s> x-hgproto-1: cbor\r\n |
|
142 | s> x-hgproto-1: cbor\r\n | |
143 | s> x-hgupgrade-1: foo bar\r\n |
|
143 | s> x-hgupgrade-1: foo bar\r\n | |
144 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
144 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
145 | s> \r\n |
|
145 | s> \r\n | |
146 | s> makefile('rb', None) |
|
146 | s> makefile('rb', None) | |
147 | s> HTTP/1.1 200 OK\r\n |
|
147 | s> HTTP/1.1 200 OK\r\n | |
148 | s> Server: testing stub value\r\n |
|
148 | s> Server: testing stub value\r\n | |
149 | s> Date: $HTTP_DATE$\r\n |
|
149 | s> Date: $HTTP_DATE$\r\n | |
150 | s> Content-Type: application/mercurial-cbor\r\n |
|
150 | s> Content-Type: application/mercurial-cbor\r\n | |
151 | s> Content-Length: *\r\n (glob) |
|
151 | s> Content-Length: *\r\n (glob) | |
152 | s> \r\n |
|
152 | s> \r\n | |
153 | s> \xa3GapibaseDapi/Dapis\xa0Nv1capabilitiesY\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 |
|
153 | s> \xa3GapibaseDapi/Dapis\xa0Nv1capabilitiesY\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 | |
154 | cbor> [ |
|
154 | cbor> [ | |
155 | { |
|
155 | { | |
156 | b'apibase': b'api/', |
|
156 | b'apibase': b'api/', | |
157 | b'apis': {}, |
|
157 | b'apis': {}, | |
158 | b'v1capabilities': b'batch 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' |
|
158 | b'v1capabilities': b'batch 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' | |
159 | } |
|
159 | } | |
160 | ] |
|
160 | ] | |
161 |
|
161 | |||
162 | Restart server to enable HTTPv2 |
|
162 | Restart server to enable HTTPv2 | |
163 |
|
163 | |||
164 | $ killdaemons.py |
|
164 | $ killdaemons.py | |
165 | $ enablehttpv2 server |
|
165 | $ enablehttpv2 server | |
166 | $ hg -R server serve -p $HGPORT -d --pid-file hg.pid -E error.log |
|
166 | $ hg -R server serve -p $HGPORT -d --pid-file hg.pid -E error.log | |
167 | $ cat hg.pid > $DAEMON_PIDS |
|
167 | $ cat hg.pid > $DAEMON_PIDS | |
168 |
|
168 | |||
169 | Only requested API services are returned |
|
169 | Only requested API services are returned | |
170 |
|
170 | |||
171 | $ sendhttpraw << EOF |
|
171 | $ sendhttpraw << EOF | |
172 | > httprequest GET ?cmd=capabilities |
|
172 | > httprequest GET ?cmd=capabilities | |
173 | > user-agent: test |
|
173 | > user-agent: test | |
174 | > x-hgupgrade-1: foo bar |
|
174 | > x-hgupgrade-1: foo bar | |
175 | > x-hgproto-1: cbor |
|
175 | > x-hgproto-1: cbor | |
176 | > EOF |
|
176 | > EOF | |
177 | using raw connection to peer |
|
177 | using raw connection to peer | |
178 |
s> setsockopt(6, 1, 1) -> None ( |
|
178 | s> setsockopt(6, 1, 1) -> None (?) | |
179 |
|
|
179 | s> GET /?cmd=capabilities HTTP/1.1\r\n | |
180 | s> Accept-Encoding: identity\r\n |
|
180 | s> Accept-Encoding: identity\r\n | |
181 | s> user-agent: test\r\n |
|
181 | s> user-agent: test\r\n | |
182 | s> x-hgproto-1: cbor\r\n |
|
182 | s> x-hgproto-1: cbor\r\n | |
183 | s> x-hgupgrade-1: foo bar\r\n |
|
183 | s> x-hgupgrade-1: foo bar\r\n | |
184 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
184 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
185 | s> \r\n |
|
185 | s> \r\n | |
186 | s> makefile('rb', None) |
|
186 | s> makefile('rb', None) | |
187 | s> HTTP/1.1 200 OK\r\n |
|
187 | s> HTTP/1.1 200 OK\r\n | |
188 | s> Server: testing stub value\r\n |
|
188 | s> Server: testing stub value\r\n | |
189 | s> Date: $HTTP_DATE$\r\n |
|
189 | s> Date: $HTTP_DATE$\r\n | |
190 | s> Content-Type: application/mercurial-cbor\r\n |
|
190 | s> Content-Type: application/mercurial-cbor\r\n | |
191 | s> Content-Length: *\r\n (glob) |
|
191 | s> Content-Length: *\r\n (glob) | |
192 | s> \r\n |
|
192 | s> \r\n | |
193 | s> \xa3GapibaseDapi/Dapis\xa0Nv1capabilitiesY\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 |
|
193 | s> \xa3GapibaseDapi/Dapis\xa0Nv1capabilitiesY\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 | |
194 | cbor> [ |
|
194 | cbor> [ | |
195 | { |
|
195 | { | |
196 | b'apibase': b'api/', |
|
196 | b'apibase': b'api/', | |
197 | b'apis': {}, |
|
197 | b'apis': {}, | |
198 | b'v1capabilities': b'batch 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' |
|
198 | b'v1capabilities': b'batch 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' | |
199 | } |
|
199 | } | |
200 | ] |
|
200 | ] | |
201 |
|
201 | |||
202 | Request for HTTPv2 service returns information about it |
|
202 | Request for HTTPv2 service returns information about it | |
203 |
|
203 | |||
204 | $ sendhttpraw << EOF |
|
204 | $ sendhttpraw << EOF | |
205 | > httprequest GET ?cmd=capabilities |
|
205 | > httprequest GET ?cmd=capabilities | |
206 | > user-agent: test |
|
206 | > user-agent: test | |
207 | > x-hgupgrade-1: exp-http-v2-0003 foo bar |
|
207 | > x-hgupgrade-1: exp-http-v2-0003 foo bar | |
208 | > x-hgproto-1: cbor |
|
208 | > x-hgproto-1: cbor | |
209 | > EOF |
|
209 | > EOF | |
210 | using raw connection to peer |
|
210 | using raw connection to peer | |
211 |
s> setsockopt(6, 1, 1) -> None ( |
|
211 | s> setsockopt(6, 1, 1) -> None (?) | |
212 |
|
|
212 | s> GET /?cmd=capabilities HTTP/1.1\r\n | |
213 | s> Accept-Encoding: identity\r\n |
|
213 | s> Accept-Encoding: identity\r\n | |
214 | s> user-agent: test\r\n |
|
214 | s> user-agent: test\r\n | |
215 | s> x-hgproto-1: cbor\r\n |
|
215 | s> x-hgproto-1: cbor\r\n | |
216 | s> x-hgupgrade-1: exp-http-v2-0003 foo bar\r\n |
|
216 | s> x-hgupgrade-1: exp-http-v2-0003 foo bar\r\n | |
217 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
217 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
218 | s> \r\n |
|
218 | s> \r\n | |
219 | s> makefile('rb', None) |
|
219 | s> makefile('rb', None) | |
220 | s> HTTP/1.1 200 OK\r\n |
|
220 | s> HTTP/1.1 200 OK\r\n | |
221 | s> Server: testing stub value\r\n |
|
221 | s> Server: testing stub value\r\n | |
222 | s> Date: $HTTP_DATE$\r\n |
|
222 | s> Date: $HTTP_DATE$\r\n | |
223 | s> Content-Type: application/mercurial-cbor\r\n |
|
223 | s> Content-Type: application/mercurial-cbor\r\n | |
224 | s> Content-Length: *\r\n (glob) |
|
224 | s> Content-Length: *\r\n (glob) | |
225 | s> \r\n |
|
225 | s> \r\n | |
226 | s> \xa3GapibaseDapi/Dapis\xa1Pexp-http-v2-0003\xa4Hcommands\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\x83LgeneraldeltaHrevlogv1LsparserevlogNv1capabilitiesY\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 |
|
226 | s> \xa3GapibaseDapi/Dapis\xa1Pexp-http-v2-0003\xa4Hcommands\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\x83LgeneraldeltaHrevlogv1LsparserevlogNv1capabilitiesY\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 | |
227 | cbor> [ |
|
227 | cbor> [ | |
228 | { |
|
228 | { | |
229 | b'apibase': b'api/', |
|
229 | b'apibase': b'api/', | |
230 | b'apis': { |
|
230 | b'apis': { | |
231 | b'exp-http-v2-0003': { |
|
231 | b'exp-http-v2-0003': { | |
232 | b'commands': { |
|
232 | b'commands': { | |
233 | b'branchmap': { |
|
233 | b'branchmap': { | |
234 | b'args': {}, |
|
234 | b'args': {}, | |
235 | b'permissions': [ |
|
235 | b'permissions': [ | |
236 | b'pull' |
|
236 | b'pull' | |
237 | ] |
|
237 | ] | |
238 | }, |
|
238 | }, | |
239 | b'capabilities': { |
|
239 | b'capabilities': { | |
240 | b'args': {}, |
|
240 | b'args': {}, | |
241 | b'permissions': [ |
|
241 | b'permissions': [ | |
242 | b'pull' |
|
242 | b'pull' | |
243 | ] |
|
243 | ] | |
244 | }, |
|
244 | }, | |
245 | b'changesetdata': { |
|
245 | b'changesetdata': { | |
246 | b'args': { |
|
246 | b'args': { | |
247 | b'fields': { |
|
247 | b'fields': { | |
248 | b'default': set([]), |
|
248 | b'default': set([]), | |
249 | b'required': False, |
|
249 | b'required': False, | |
250 | b'type': b'set', |
|
250 | b'type': b'set', | |
251 | b'validvalues': set([ |
|
251 | b'validvalues': set([ | |
252 | b'bookmarks', |
|
252 | b'bookmarks', | |
253 | b'parents', |
|
253 | b'parents', | |
254 | b'phase', |
|
254 | b'phase', | |
255 | b'revision' |
|
255 | b'revision' | |
256 | ]) |
|
256 | ]) | |
257 | }, |
|
257 | }, | |
258 | b'revisions': { |
|
258 | b'revisions': { | |
259 | b'required': True, |
|
259 | b'required': True, | |
260 | b'type': b'list' |
|
260 | b'type': b'list' | |
261 | } |
|
261 | } | |
262 | }, |
|
262 | }, | |
263 | b'permissions': [ |
|
263 | b'permissions': [ | |
264 | b'pull' |
|
264 | b'pull' | |
265 | ] |
|
265 | ] | |
266 | }, |
|
266 | }, | |
267 | b'filedata': { |
|
267 | b'filedata': { | |
268 | b'args': { |
|
268 | b'args': { | |
269 | b'fields': { |
|
269 | b'fields': { | |
270 | b'default': set([]), |
|
270 | b'default': set([]), | |
271 | b'required': False, |
|
271 | b'required': False, | |
272 | b'type': b'set', |
|
272 | b'type': b'set', | |
273 | b'validvalues': set([ |
|
273 | b'validvalues': set([ | |
274 | b'linknode', |
|
274 | b'linknode', | |
275 | b'parents', |
|
275 | b'parents', | |
276 | b'revision' |
|
276 | b'revision' | |
277 | ]) |
|
277 | ]) | |
278 | }, |
|
278 | }, | |
279 | b'haveparents': { |
|
279 | b'haveparents': { | |
280 | b'default': False, |
|
280 | b'default': False, | |
281 | b'required': False, |
|
281 | b'required': False, | |
282 | b'type': b'bool' |
|
282 | b'type': b'bool' | |
283 | }, |
|
283 | }, | |
284 | b'nodes': { |
|
284 | b'nodes': { | |
285 | b'required': True, |
|
285 | b'required': True, | |
286 | b'type': b'list' |
|
286 | b'type': b'list' | |
287 | }, |
|
287 | }, | |
288 | b'path': { |
|
288 | b'path': { | |
289 | b'required': True, |
|
289 | b'required': True, | |
290 | b'type': b'bytes' |
|
290 | b'type': b'bytes' | |
291 | } |
|
291 | } | |
292 | }, |
|
292 | }, | |
293 | b'permissions': [ |
|
293 | b'permissions': [ | |
294 | b'pull' |
|
294 | b'pull' | |
295 | ] |
|
295 | ] | |
296 | }, |
|
296 | }, | |
297 | b'filesdata': { |
|
297 | b'filesdata': { | |
298 | b'args': { |
|
298 | b'args': { | |
299 | b'fields': { |
|
299 | b'fields': { | |
300 | b'default': set([]), |
|
300 | b'default': set([]), | |
301 | b'required': False, |
|
301 | b'required': False, | |
302 | b'type': b'set', |
|
302 | b'type': b'set', | |
303 | b'validvalues': set([ |
|
303 | b'validvalues': set([ | |
304 | b'firstchangeset', |
|
304 | b'firstchangeset', | |
305 | b'linknode', |
|
305 | b'linknode', | |
306 | b'parents', |
|
306 | b'parents', | |
307 | b'revision' |
|
307 | b'revision' | |
308 | ]) |
|
308 | ]) | |
309 | }, |
|
309 | }, | |
310 | b'haveparents': { |
|
310 | b'haveparents': { | |
311 | b'default': False, |
|
311 | b'default': False, | |
312 | b'required': False, |
|
312 | b'required': False, | |
313 | b'type': b'bool' |
|
313 | b'type': b'bool' | |
314 | }, |
|
314 | }, | |
315 | b'pathfilter': { |
|
315 | b'pathfilter': { | |
316 | b'default': None, |
|
316 | b'default': None, | |
317 | b'required': False, |
|
317 | b'required': False, | |
318 | b'type': b'dict' |
|
318 | b'type': b'dict' | |
319 | }, |
|
319 | }, | |
320 | b'revisions': { |
|
320 | b'revisions': { | |
321 | b'required': True, |
|
321 | b'required': True, | |
322 | b'type': b'list' |
|
322 | b'type': b'list' | |
323 | } |
|
323 | } | |
324 | }, |
|
324 | }, | |
325 | b'permissions': [ |
|
325 | b'permissions': [ | |
326 | b'pull' |
|
326 | b'pull' | |
327 | ], |
|
327 | ], | |
328 | b'recommendedbatchsize': 50000 |
|
328 | b'recommendedbatchsize': 50000 | |
329 | }, |
|
329 | }, | |
330 | b'heads': { |
|
330 | b'heads': { | |
331 | b'args': { |
|
331 | b'args': { | |
332 | b'publiconly': { |
|
332 | b'publiconly': { | |
333 | b'default': False, |
|
333 | b'default': False, | |
334 | b'required': False, |
|
334 | b'required': False, | |
335 | b'type': b'bool' |
|
335 | b'type': b'bool' | |
336 | } |
|
336 | } | |
337 | }, |
|
337 | }, | |
338 | b'permissions': [ |
|
338 | b'permissions': [ | |
339 | b'pull' |
|
339 | b'pull' | |
340 | ] |
|
340 | ] | |
341 | }, |
|
341 | }, | |
342 | b'known': { |
|
342 | b'known': { | |
343 | b'args': { |
|
343 | b'args': { | |
344 | b'nodes': { |
|
344 | b'nodes': { | |
345 | b'default': [], |
|
345 | b'default': [], | |
346 | b'required': False, |
|
346 | b'required': False, | |
347 | b'type': b'list' |
|
347 | b'type': b'list' | |
348 | } |
|
348 | } | |
349 | }, |
|
349 | }, | |
350 | b'permissions': [ |
|
350 | b'permissions': [ | |
351 | b'pull' |
|
351 | b'pull' | |
352 | ] |
|
352 | ] | |
353 | }, |
|
353 | }, | |
354 | b'listkeys': { |
|
354 | b'listkeys': { | |
355 | b'args': { |
|
355 | b'args': { | |
356 | b'namespace': { |
|
356 | b'namespace': { | |
357 | b'required': True, |
|
357 | b'required': True, | |
358 | b'type': b'bytes' |
|
358 | b'type': b'bytes' | |
359 | } |
|
359 | } | |
360 | }, |
|
360 | }, | |
361 | b'permissions': [ |
|
361 | b'permissions': [ | |
362 | b'pull' |
|
362 | b'pull' | |
363 | ] |
|
363 | ] | |
364 | }, |
|
364 | }, | |
365 | b'lookup': { |
|
365 | b'lookup': { | |
366 | b'args': { |
|
366 | b'args': { | |
367 | b'key': { |
|
367 | b'key': { | |
368 | b'required': True, |
|
368 | b'required': True, | |
369 | b'type': b'bytes' |
|
369 | b'type': b'bytes' | |
370 | } |
|
370 | } | |
371 | }, |
|
371 | }, | |
372 | b'permissions': [ |
|
372 | b'permissions': [ | |
373 | b'pull' |
|
373 | b'pull' | |
374 | ] |
|
374 | ] | |
375 | }, |
|
375 | }, | |
376 | b'manifestdata': { |
|
376 | b'manifestdata': { | |
377 | b'args': { |
|
377 | b'args': { | |
378 | b'fields': { |
|
378 | b'fields': { | |
379 | b'default': set([]), |
|
379 | b'default': set([]), | |
380 | b'required': False, |
|
380 | b'required': False, | |
381 | b'type': b'set', |
|
381 | b'type': b'set', | |
382 | b'validvalues': set([ |
|
382 | b'validvalues': set([ | |
383 | b'parents', |
|
383 | b'parents', | |
384 | b'revision' |
|
384 | b'revision' | |
385 | ]) |
|
385 | ]) | |
386 | }, |
|
386 | }, | |
387 | b'haveparents': { |
|
387 | b'haveparents': { | |
388 | b'default': False, |
|
388 | b'default': False, | |
389 | b'required': False, |
|
389 | b'required': False, | |
390 | b'type': b'bool' |
|
390 | b'type': b'bool' | |
391 | }, |
|
391 | }, | |
392 | b'nodes': { |
|
392 | b'nodes': { | |
393 | b'required': True, |
|
393 | b'required': True, | |
394 | b'type': b'list' |
|
394 | b'type': b'list' | |
395 | }, |
|
395 | }, | |
396 | b'tree': { |
|
396 | b'tree': { | |
397 | b'required': True, |
|
397 | b'required': True, | |
398 | b'type': b'bytes' |
|
398 | b'type': b'bytes' | |
399 | } |
|
399 | } | |
400 | }, |
|
400 | }, | |
401 | b'permissions': [ |
|
401 | b'permissions': [ | |
402 | b'pull' |
|
402 | b'pull' | |
403 | ], |
|
403 | ], | |
404 | b'recommendedbatchsize': 100000 |
|
404 | b'recommendedbatchsize': 100000 | |
405 | }, |
|
405 | }, | |
406 | b'pushkey': { |
|
406 | b'pushkey': { | |
407 | b'args': { |
|
407 | b'args': { | |
408 | b'key': { |
|
408 | b'key': { | |
409 | b'required': True, |
|
409 | b'required': True, | |
410 | b'type': b'bytes' |
|
410 | b'type': b'bytes' | |
411 | }, |
|
411 | }, | |
412 | b'namespace': { |
|
412 | b'namespace': { | |
413 | b'required': True, |
|
413 | b'required': True, | |
414 | b'type': b'bytes' |
|
414 | b'type': b'bytes' | |
415 | }, |
|
415 | }, | |
416 | b'new': { |
|
416 | b'new': { | |
417 | b'required': True, |
|
417 | b'required': True, | |
418 | b'type': b'bytes' |
|
418 | b'type': b'bytes' | |
419 | }, |
|
419 | }, | |
420 | b'old': { |
|
420 | b'old': { | |
421 | b'required': True, |
|
421 | b'required': True, | |
422 | b'type': b'bytes' |
|
422 | b'type': b'bytes' | |
423 | } |
|
423 | } | |
424 | }, |
|
424 | }, | |
425 | b'permissions': [ |
|
425 | b'permissions': [ | |
426 | b'push' |
|
426 | b'push' | |
427 | ] |
|
427 | ] | |
428 | }, |
|
428 | }, | |
429 | b'rawstorefiledata': { |
|
429 | b'rawstorefiledata': { | |
430 | b'args': { |
|
430 | b'args': { | |
431 | b'files': { |
|
431 | b'files': { | |
432 | b'required': True, |
|
432 | b'required': True, | |
433 | b'type': b'list' |
|
433 | b'type': b'list' | |
434 | }, |
|
434 | }, | |
435 | b'pathfilter': { |
|
435 | b'pathfilter': { | |
436 | b'default': None, |
|
436 | b'default': None, | |
437 | b'required': False, |
|
437 | b'required': False, | |
438 | b'type': b'list' |
|
438 | b'type': b'list' | |
439 | } |
|
439 | } | |
440 | }, |
|
440 | }, | |
441 | b'permissions': [ |
|
441 | b'permissions': [ | |
442 | b'pull' |
|
442 | b'pull' | |
443 | ] |
|
443 | ] | |
444 | } |
|
444 | } | |
445 | }, |
|
445 | }, | |
446 | b'framingmediatypes': [ |
|
446 | b'framingmediatypes': [ | |
447 | b'application/mercurial-exp-framing-0006' |
|
447 | b'application/mercurial-exp-framing-0006' | |
448 | ], |
|
448 | ], | |
449 | b'pathfilterprefixes': set([ |
|
449 | b'pathfilterprefixes': set([ | |
450 | b'path:', |
|
450 | b'path:', | |
451 | b'rootfilesin:' |
|
451 | b'rootfilesin:' | |
452 | ]), |
|
452 | ]), | |
453 | b'rawrepoformats': [ |
|
453 | b'rawrepoformats': [ | |
454 | b'generaldelta', |
|
454 | b'generaldelta', | |
455 | b'revlogv1', |
|
455 | b'revlogv1', | |
456 | b'sparserevlog' |
|
456 | b'sparserevlog' | |
457 | ] |
|
457 | ] | |
458 | } |
|
458 | } | |
459 | }, |
|
459 | }, | |
460 | b'v1capabilities': b'batch 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' |
|
460 | b'v1capabilities': b'batch 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' | |
461 | } |
|
461 | } | |
462 | ] |
|
462 | ] | |
463 |
|
463 | |||
464 | capabilities command returns expected info |
|
464 | capabilities command returns expected info | |
465 |
|
465 | |||
466 | $ sendhttpv2peerhandshake << EOF |
|
466 | $ sendhttpv2peerhandshake << EOF | |
467 | > command capabilities |
|
467 | > command capabilities | |
468 | > EOF |
|
468 | > EOF | |
469 | creating http peer for wire protocol version 2 |
|
469 | creating http peer for wire protocol version 2 | |
470 |
s> setsockopt(6, 1, 1) -> None ( |
|
470 | s> setsockopt(6, 1, 1) -> None (?) | |
471 |
|
|
471 | s> GET /?cmd=capabilities HTTP/1.1\r\n | |
472 | s> Accept-Encoding: identity\r\n |
|
472 | s> Accept-Encoding: identity\r\n | |
473 | s> vary: X-HgProto-1,X-HgUpgrade-1\r\n |
|
473 | s> vary: X-HgProto-1,X-HgUpgrade-1\r\n | |
474 | s> x-hgproto-1: cbor\r\n |
|
474 | s> x-hgproto-1: cbor\r\n | |
475 | s> x-hgupgrade-1: exp-http-v2-0003\r\n |
|
475 | s> x-hgupgrade-1: exp-http-v2-0003\r\n | |
476 | s> accept: application/mercurial-0.1\r\n |
|
476 | s> accept: application/mercurial-0.1\r\n | |
477 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
477 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
478 | s> user-agent: Mercurial debugwireproto\r\n |
|
478 | s> user-agent: Mercurial debugwireproto\r\n | |
479 | s> \r\n |
|
479 | s> \r\n | |
480 | s> makefile('rb', None) |
|
480 | s> makefile('rb', None) | |
481 | s> HTTP/1.1 200 OK\r\n |
|
481 | s> HTTP/1.1 200 OK\r\n | |
482 | s> Server: testing stub value\r\n |
|
482 | s> Server: testing stub value\r\n | |
483 | s> Date: $HTTP_DATE$\r\n |
|
483 | s> Date: $HTTP_DATE$\r\n | |
484 | s> Content-Type: application/mercurial-cbor\r\n |
|
484 | s> Content-Type: application/mercurial-cbor\r\n | |
485 | s> Content-Length: *\r\n (glob) |
|
485 | s> Content-Length: *\r\n (glob) | |
486 | s> \r\n |
|
486 | s> \r\n | |
487 | s> \xa3GapibaseDapi/Dapis\xa1Pexp-http-v2-0003\xa4Hcommands\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\x83LgeneraldeltaHrevlogv1LsparserevlogNv1capabilitiesY\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 |
|
487 | s> \xa3GapibaseDapi/Dapis\xa1Pexp-http-v2-0003\xa4Hcommands\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\x83LgeneraldeltaHrevlogv1LsparserevlogNv1capabilitiesY\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 | |
488 | sending capabilities command |
|
488 | sending capabilities command | |
489 |
s> setsockopt(6, 1, 1) -> None ( |
|
489 | s> setsockopt(6, 1, 1) -> None (?) | |
490 |
|
|
490 | s> POST /api/exp-http-v2-0003/ro/capabilities HTTP/1.1\r\n | |
491 | s> Accept-Encoding: identity\r\n |
|
491 | s> Accept-Encoding: identity\r\n | |
492 | s> accept: application/mercurial-exp-framing-0006\r\n |
|
492 | s> accept: application/mercurial-exp-framing-0006\r\n | |
493 | s> content-type: application/mercurial-exp-framing-0006\r\n |
|
493 | s> content-type: application/mercurial-exp-framing-0006\r\n | |
494 | s> content-length: 63\r\n |
|
494 | s> content-length: 63\r\n | |
495 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
495 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
496 | s> user-agent: Mercurial debugwireproto\r\n |
|
496 | s> user-agent: Mercurial debugwireproto\r\n | |
497 | s> \r\n |
|
497 | s> \r\n | |
498 | s> \x1c\x00\x00\x01\x00\x01\x01\x82\xa1Pcontentencodings\x81Hidentity\x13\x00\x00\x01\x00\x01\x00\x11\xa1DnameLcapabilities |
|
498 | s> \x1c\x00\x00\x01\x00\x01\x01\x82\xa1Pcontentencodings\x81Hidentity\x13\x00\x00\x01\x00\x01\x00\x11\xa1DnameLcapabilities | |
499 | s> makefile('rb', None) |
|
499 | s> makefile('rb', None) | |
500 | s> HTTP/1.1 200 OK\r\n |
|
500 | s> HTTP/1.1 200 OK\r\n | |
501 | s> Server: testing stub value\r\n |
|
501 | s> Server: testing stub value\r\n | |
502 | s> Date: $HTTP_DATE$\r\n |
|
502 | s> Date: $HTTP_DATE$\r\n | |
503 | s> Content-Type: application/mercurial-exp-framing-0006\r\n |
|
503 | s> Content-Type: application/mercurial-exp-framing-0006\r\n | |
504 | s> Transfer-Encoding: chunked\r\n |
|
504 | s> Transfer-Encoding: chunked\r\n | |
505 | s> \r\n |
|
505 | s> \r\n | |
506 | s> 11\r\n |
|
506 | s> 11\r\n | |
507 | s> \t\x00\x00\x01\x00\x02\x01\x92 |
|
507 | s> \t\x00\x00\x01\x00\x02\x01\x92 | |
508 | s> Hidentity |
|
508 | s> Hidentity | |
509 | s> \r\n |
|
509 | s> \r\n | |
510 | s> 13\r\n |
|
510 | s> 13\r\n | |
511 | s> \x0b\x00\x00\x01\x00\x02\x041 |
|
511 | s> \x0b\x00\x00\x01\x00\x02\x041 | |
512 | s> \xa1FstatusBok |
|
512 | s> \xa1FstatusBok | |
513 | s> \r\n |
|
513 | s> \r\n | |
514 | s> 65e\r\n |
|
514 | s> 65e\r\n | |
515 | s> V\x06\x00\x01\x00\x02\x041 |
|
515 | s> V\x06\x00\x01\x00\x02\x041 | |
516 | s> \xa4Hcommands\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\x83LgeneraldeltaHrevlogv1Lsparserevlog |
|
516 | s> \xa4Hcommands\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\x83LgeneraldeltaHrevlogv1Lsparserevlog | |
517 | s> \r\n |
|
517 | s> \r\n | |
518 | s> 8\r\n |
|
518 | s> 8\r\n | |
519 | s> \x00\x00\x00\x01\x00\x02\x002 |
|
519 | s> \x00\x00\x00\x01\x00\x02\x002 | |
520 | s> \r\n |
|
520 | s> \r\n | |
521 | s> 0\r\n |
|
521 | s> 0\r\n | |
522 | s> \r\n |
|
522 | s> \r\n | |
523 | response: gen[ |
|
523 | response: gen[ | |
524 | { |
|
524 | { | |
525 | b'commands': { |
|
525 | b'commands': { | |
526 | b'branchmap': { |
|
526 | b'branchmap': { | |
527 | b'args': {}, |
|
527 | b'args': {}, | |
528 | b'permissions': [ |
|
528 | b'permissions': [ | |
529 | b'pull' |
|
529 | b'pull' | |
530 | ] |
|
530 | ] | |
531 | }, |
|
531 | }, | |
532 | b'capabilities': { |
|
532 | b'capabilities': { | |
533 | b'args': {}, |
|
533 | b'args': {}, | |
534 | b'permissions': [ |
|
534 | b'permissions': [ | |
535 | b'pull' |
|
535 | b'pull' | |
536 | ] |
|
536 | ] | |
537 | }, |
|
537 | }, | |
538 | b'changesetdata': { |
|
538 | b'changesetdata': { | |
539 | b'args': { |
|
539 | b'args': { | |
540 | b'fields': { |
|
540 | b'fields': { | |
541 | b'default': set([]), |
|
541 | b'default': set([]), | |
542 | b'required': False, |
|
542 | b'required': False, | |
543 | b'type': b'set', |
|
543 | b'type': b'set', | |
544 | b'validvalues': set([ |
|
544 | b'validvalues': set([ | |
545 | b'bookmarks', |
|
545 | b'bookmarks', | |
546 | b'parents', |
|
546 | b'parents', | |
547 | b'phase', |
|
547 | b'phase', | |
548 | b'revision' |
|
548 | b'revision' | |
549 | ]) |
|
549 | ]) | |
550 | }, |
|
550 | }, | |
551 | b'revisions': { |
|
551 | b'revisions': { | |
552 | b'required': True, |
|
552 | b'required': True, | |
553 | b'type': b'list' |
|
553 | b'type': b'list' | |
554 | } |
|
554 | } | |
555 | }, |
|
555 | }, | |
556 | b'permissions': [ |
|
556 | b'permissions': [ | |
557 | b'pull' |
|
557 | b'pull' | |
558 | ] |
|
558 | ] | |
559 | }, |
|
559 | }, | |
560 | b'filedata': { |
|
560 | b'filedata': { | |
561 | b'args': { |
|
561 | b'args': { | |
562 | b'fields': { |
|
562 | b'fields': { | |
563 | b'default': set([]), |
|
563 | b'default': set([]), | |
564 | b'required': False, |
|
564 | b'required': False, | |
565 | b'type': b'set', |
|
565 | b'type': b'set', | |
566 | b'validvalues': set([ |
|
566 | b'validvalues': set([ | |
567 | b'linknode', |
|
567 | b'linknode', | |
568 | b'parents', |
|
568 | b'parents', | |
569 | b'revision' |
|
569 | b'revision' | |
570 | ]) |
|
570 | ]) | |
571 | }, |
|
571 | }, | |
572 | b'haveparents': { |
|
572 | b'haveparents': { | |
573 | b'default': False, |
|
573 | b'default': False, | |
574 | b'required': False, |
|
574 | b'required': False, | |
575 | b'type': b'bool' |
|
575 | b'type': b'bool' | |
576 | }, |
|
576 | }, | |
577 | b'nodes': { |
|
577 | b'nodes': { | |
578 | b'required': True, |
|
578 | b'required': True, | |
579 | b'type': b'list' |
|
579 | b'type': b'list' | |
580 | }, |
|
580 | }, | |
581 | b'path': { |
|
581 | b'path': { | |
582 | b'required': True, |
|
582 | b'required': True, | |
583 | b'type': b'bytes' |
|
583 | b'type': b'bytes' | |
584 | } |
|
584 | } | |
585 | }, |
|
585 | }, | |
586 | b'permissions': [ |
|
586 | b'permissions': [ | |
587 | b'pull' |
|
587 | b'pull' | |
588 | ] |
|
588 | ] | |
589 | }, |
|
589 | }, | |
590 | b'filesdata': { |
|
590 | b'filesdata': { | |
591 | b'args': { |
|
591 | b'args': { | |
592 | b'fields': { |
|
592 | b'fields': { | |
593 | b'default': set([]), |
|
593 | b'default': set([]), | |
594 | b'required': False, |
|
594 | b'required': False, | |
595 | b'type': b'set', |
|
595 | b'type': b'set', | |
596 | b'validvalues': set([ |
|
596 | b'validvalues': set([ | |
597 | b'firstchangeset', |
|
597 | b'firstchangeset', | |
598 | b'linknode', |
|
598 | b'linknode', | |
599 | b'parents', |
|
599 | b'parents', | |
600 | b'revision' |
|
600 | b'revision' | |
601 | ]) |
|
601 | ]) | |
602 | }, |
|
602 | }, | |
603 | b'haveparents': { |
|
603 | b'haveparents': { | |
604 | b'default': False, |
|
604 | b'default': False, | |
605 | b'required': False, |
|
605 | b'required': False, | |
606 | b'type': b'bool' |
|
606 | b'type': b'bool' | |
607 | }, |
|
607 | }, | |
608 | b'pathfilter': { |
|
608 | b'pathfilter': { | |
609 | b'default': None, |
|
609 | b'default': None, | |
610 | b'required': False, |
|
610 | b'required': False, | |
611 | b'type': b'dict' |
|
611 | b'type': b'dict' | |
612 | }, |
|
612 | }, | |
613 | b'revisions': { |
|
613 | b'revisions': { | |
614 | b'required': True, |
|
614 | b'required': True, | |
615 | b'type': b'list' |
|
615 | b'type': b'list' | |
616 | } |
|
616 | } | |
617 | }, |
|
617 | }, | |
618 | b'permissions': [ |
|
618 | b'permissions': [ | |
619 | b'pull' |
|
619 | b'pull' | |
620 | ], |
|
620 | ], | |
621 | b'recommendedbatchsize': 50000 |
|
621 | b'recommendedbatchsize': 50000 | |
622 | }, |
|
622 | }, | |
623 | b'heads': { |
|
623 | b'heads': { | |
624 | b'args': { |
|
624 | b'args': { | |
625 | b'publiconly': { |
|
625 | b'publiconly': { | |
626 | b'default': False, |
|
626 | b'default': False, | |
627 | b'required': False, |
|
627 | b'required': False, | |
628 | b'type': b'bool' |
|
628 | b'type': b'bool' | |
629 | } |
|
629 | } | |
630 | }, |
|
630 | }, | |
631 | b'permissions': [ |
|
631 | b'permissions': [ | |
632 | b'pull' |
|
632 | b'pull' | |
633 | ] |
|
633 | ] | |
634 | }, |
|
634 | }, | |
635 | b'known': { |
|
635 | b'known': { | |
636 | b'args': { |
|
636 | b'args': { | |
637 | b'nodes': { |
|
637 | b'nodes': { | |
638 | b'default': [], |
|
638 | b'default': [], | |
639 | b'required': False, |
|
639 | b'required': False, | |
640 | b'type': b'list' |
|
640 | b'type': b'list' | |
641 | } |
|
641 | } | |
642 | }, |
|
642 | }, | |
643 | b'permissions': [ |
|
643 | b'permissions': [ | |
644 | b'pull' |
|
644 | b'pull' | |
645 | ] |
|
645 | ] | |
646 | }, |
|
646 | }, | |
647 | b'listkeys': { |
|
647 | b'listkeys': { | |
648 | b'args': { |
|
648 | b'args': { | |
649 | b'namespace': { |
|
649 | b'namespace': { | |
650 | b'required': True, |
|
650 | b'required': True, | |
651 | b'type': b'bytes' |
|
651 | b'type': b'bytes' | |
652 | } |
|
652 | } | |
653 | }, |
|
653 | }, | |
654 | b'permissions': [ |
|
654 | b'permissions': [ | |
655 | b'pull' |
|
655 | b'pull' | |
656 | ] |
|
656 | ] | |
657 | }, |
|
657 | }, | |
658 | b'lookup': { |
|
658 | b'lookup': { | |
659 | b'args': { |
|
659 | b'args': { | |
660 | b'key': { |
|
660 | b'key': { | |
661 | b'required': True, |
|
661 | b'required': True, | |
662 | b'type': b'bytes' |
|
662 | b'type': b'bytes' | |
663 | } |
|
663 | } | |
664 | }, |
|
664 | }, | |
665 | b'permissions': [ |
|
665 | b'permissions': [ | |
666 | b'pull' |
|
666 | b'pull' | |
667 | ] |
|
667 | ] | |
668 | }, |
|
668 | }, | |
669 | b'manifestdata': { |
|
669 | b'manifestdata': { | |
670 | b'args': { |
|
670 | b'args': { | |
671 | b'fields': { |
|
671 | b'fields': { | |
672 | b'default': set([]), |
|
672 | b'default': set([]), | |
673 | b'required': False, |
|
673 | b'required': False, | |
674 | b'type': b'set', |
|
674 | b'type': b'set', | |
675 | b'validvalues': set([ |
|
675 | b'validvalues': set([ | |
676 | b'parents', |
|
676 | b'parents', | |
677 | b'revision' |
|
677 | b'revision' | |
678 | ]) |
|
678 | ]) | |
679 | }, |
|
679 | }, | |
680 | b'haveparents': { |
|
680 | b'haveparents': { | |
681 | b'default': False, |
|
681 | b'default': False, | |
682 | b'required': False, |
|
682 | b'required': False, | |
683 | b'type': b'bool' |
|
683 | b'type': b'bool' | |
684 | }, |
|
684 | }, | |
685 | b'nodes': { |
|
685 | b'nodes': { | |
686 | b'required': True, |
|
686 | b'required': True, | |
687 | b'type': b'list' |
|
687 | b'type': b'list' | |
688 | }, |
|
688 | }, | |
689 | b'tree': { |
|
689 | b'tree': { | |
690 | b'required': True, |
|
690 | b'required': True, | |
691 | b'type': b'bytes' |
|
691 | b'type': b'bytes' | |
692 | } |
|
692 | } | |
693 | }, |
|
693 | }, | |
694 | b'permissions': [ |
|
694 | b'permissions': [ | |
695 | b'pull' |
|
695 | b'pull' | |
696 | ], |
|
696 | ], | |
697 | b'recommendedbatchsize': 100000 |
|
697 | b'recommendedbatchsize': 100000 | |
698 | }, |
|
698 | }, | |
699 | b'pushkey': { |
|
699 | b'pushkey': { | |
700 | b'args': { |
|
700 | b'args': { | |
701 | b'key': { |
|
701 | b'key': { | |
702 | b'required': True, |
|
702 | b'required': True, | |
703 | b'type': b'bytes' |
|
703 | b'type': b'bytes' | |
704 | }, |
|
704 | }, | |
705 | b'namespace': { |
|
705 | b'namespace': { | |
706 | b'required': True, |
|
706 | b'required': True, | |
707 | b'type': b'bytes' |
|
707 | b'type': b'bytes' | |
708 | }, |
|
708 | }, | |
709 | b'new': { |
|
709 | b'new': { | |
710 | b'required': True, |
|
710 | b'required': True, | |
711 | b'type': b'bytes' |
|
711 | b'type': b'bytes' | |
712 | }, |
|
712 | }, | |
713 | b'old': { |
|
713 | b'old': { | |
714 | b'required': True, |
|
714 | b'required': True, | |
715 | b'type': b'bytes' |
|
715 | b'type': b'bytes' | |
716 | } |
|
716 | } | |
717 | }, |
|
717 | }, | |
718 | b'permissions': [ |
|
718 | b'permissions': [ | |
719 | b'push' |
|
719 | b'push' | |
720 | ] |
|
720 | ] | |
721 | }, |
|
721 | }, | |
722 | b'rawstorefiledata': { |
|
722 | b'rawstorefiledata': { | |
723 | b'args': { |
|
723 | b'args': { | |
724 | b'files': { |
|
724 | b'files': { | |
725 | b'required': True, |
|
725 | b'required': True, | |
726 | b'type': b'list' |
|
726 | b'type': b'list' | |
727 | }, |
|
727 | }, | |
728 | b'pathfilter': { |
|
728 | b'pathfilter': { | |
729 | b'default': None, |
|
729 | b'default': None, | |
730 | b'required': False, |
|
730 | b'required': False, | |
731 | b'type': b'list' |
|
731 | b'type': b'list' | |
732 | } |
|
732 | } | |
733 | }, |
|
733 | }, | |
734 | b'permissions': [ |
|
734 | b'permissions': [ | |
735 | b'pull' |
|
735 | b'pull' | |
736 | ] |
|
736 | ] | |
737 | } |
|
737 | } | |
738 | }, |
|
738 | }, | |
739 | b'framingmediatypes': [ |
|
739 | b'framingmediatypes': [ | |
740 | b'application/mercurial-exp-framing-0006' |
|
740 | b'application/mercurial-exp-framing-0006' | |
741 | ], |
|
741 | ], | |
742 | b'pathfilterprefixes': set([ |
|
742 | b'pathfilterprefixes': set([ | |
743 | b'path:', |
|
743 | b'path:', | |
744 | b'rootfilesin:' |
|
744 | b'rootfilesin:' | |
745 | ]), |
|
745 | ]), | |
746 | b'rawrepoformats': [ |
|
746 | b'rawrepoformats': [ | |
747 | b'generaldelta', |
|
747 | b'generaldelta', | |
748 | b'revlogv1', |
|
748 | b'revlogv1', | |
749 | b'sparserevlog' |
|
749 | b'sparserevlog' | |
750 | ] |
|
750 | ] | |
751 | } |
|
751 | } | |
752 | ] |
|
752 | ] | |
753 | (sent 2 HTTP requests and * bytes; received * bytes in responses) (glob) |
|
753 | (sent 2 HTTP requests and * bytes; received * bytes in responses) (glob) | |
754 |
|
754 | |||
755 | $ cat error.log |
|
755 | $ cat error.log |
@@ -1,1471 +1,1471 b'' | |||||
1 | $ . $TESTDIR/wireprotohelpers.sh |
|
1 | $ . $TESTDIR/wireprotohelpers.sh | |
2 |
|
2 | |||
3 | $ cat >> $HGRCPATH << EOF |
|
3 | $ cat >> $HGRCPATH << EOF | |
4 | > [extensions] |
|
4 | > [extensions] | |
5 | > blackbox = |
|
5 | > blackbox = | |
6 | > [blackbox] |
|
6 | > [blackbox] | |
7 | > track = simplecache |
|
7 | > track = simplecache | |
8 | > EOF |
|
8 | > EOF | |
9 |
|
9 | |||
10 | $ hg init server |
|
10 | $ hg init server | |
11 | $ enablehttpv2 server |
|
11 | $ enablehttpv2 server | |
12 | $ cd server |
|
12 | $ cd server | |
13 | $ cat >> .hg/hgrc << EOF |
|
13 | $ cat >> .hg/hgrc << EOF | |
14 | > [server] |
|
14 | > [server] | |
15 | > compressionengines = zlib |
|
15 | > compressionengines = zlib | |
16 | > [extensions] |
|
16 | > [extensions] | |
17 | > simplecache = $TESTDIR/wireprotosimplecache.py |
|
17 | > simplecache = $TESTDIR/wireprotosimplecache.py | |
18 | > [simplecache] |
|
18 | > [simplecache] | |
19 | > cacheapi = true |
|
19 | > cacheapi = true | |
20 | > EOF |
|
20 | > EOF | |
21 |
|
21 | |||
22 | $ echo a0 > a |
|
22 | $ echo a0 > a | |
23 | $ echo b0 > b |
|
23 | $ echo b0 > b | |
24 | $ hg -q commit -A -m 'commit 0' |
|
24 | $ hg -q commit -A -m 'commit 0' | |
25 | $ echo a1 > a |
|
25 | $ echo a1 > a | |
26 | $ hg commit -m 'commit 1' |
|
26 | $ hg commit -m 'commit 1' | |
27 |
|
27 | |||
28 | $ hg --debug debugindex -m |
|
28 | $ hg --debug debugindex -m | |
29 | rev linkrev nodeid p1 p2 |
|
29 | rev linkrev nodeid p1 p2 | |
30 | 0 0 992f4779029a3df8d0666d00bb924f69634e2641 0000000000000000000000000000000000000000 0000000000000000000000000000000000000000 |
|
30 | 0 0 992f4779029a3df8d0666d00bb924f69634e2641 0000000000000000000000000000000000000000 0000000000000000000000000000000000000000 | |
31 | 1 1 a988fb43583e871d1ed5750ee074c6d840bbbfc8 992f4779029a3df8d0666d00bb924f69634e2641 0000000000000000000000000000000000000000 |
|
31 | 1 1 a988fb43583e871d1ed5750ee074c6d840bbbfc8 992f4779029a3df8d0666d00bb924f69634e2641 0000000000000000000000000000000000000000 | |
32 |
|
32 | |||
33 | $ hg --config simplecache.redirectsfile=redirects.py serve -p $HGPORT -d --pid-file hg.pid -E error.log |
|
33 | $ hg --config simplecache.redirectsfile=redirects.py serve -p $HGPORT -d --pid-file hg.pid -E error.log | |
34 | $ cat hg.pid > $DAEMON_PIDS |
|
34 | $ cat hg.pid > $DAEMON_PIDS | |
35 |
|
35 | |||
36 | $ cat > redirects.py << EOF |
|
36 | $ cat > redirects.py << EOF | |
37 | > [ |
|
37 | > [ | |
38 | > { |
|
38 | > { | |
39 | > b'name': b'target-a', |
|
39 | > b'name': b'target-a', | |
40 | > b'protocol': b'http', |
|
40 | > b'protocol': b'http', | |
41 | > b'snirequired': False, |
|
41 | > b'snirequired': False, | |
42 | > b'tlsversions': [b'1.2', b'1.3'], |
|
42 | > b'tlsversions': [b'1.2', b'1.3'], | |
43 | > b'uris': [b'http://example.com/'], |
|
43 | > b'uris': [b'http://example.com/'], | |
44 | > }, |
|
44 | > }, | |
45 | > ] |
|
45 | > ] | |
46 | > EOF |
|
46 | > EOF | |
47 |
|
47 | |||
48 | Redirect targets advertised when configured |
|
48 | Redirect targets advertised when configured | |
49 |
|
49 | |||
50 | $ sendhttpv2peerhandshake << EOF |
|
50 | $ sendhttpv2peerhandshake << EOF | |
51 | > command capabilities |
|
51 | > command capabilities | |
52 | > EOF |
|
52 | > EOF | |
53 | creating http peer for wire protocol version 2 |
|
53 | creating http peer for wire protocol version 2 | |
54 |
s> setsockopt(6, 1, 1) -> None ( |
|
54 | s> setsockopt(6, 1, 1) -> None (?) | |
55 | s> GET /?cmd=capabilities HTTP/1.1\r\n |
|
55 | s> GET /?cmd=capabilities HTTP/1.1\r\n | |
56 | s> Accept-Encoding: identity\r\n |
|
56 | s> Accept-Encoding: identity\r\n | |
57 | s> vary: X-HgProto-1,X-HgUpgrade-1\r\n |
|
57 | s> vary: X-HgProto-1,X-HgUpgrade-1\r\n | |
58 | s> x-hgproto-1: cbor\r\n |
|
58 | s> x-hgproto-1: cbor\r\n | |
59 | s> x-hgupgrade-1: exp-http-v2-0003\r\n |
|
59 | s> x-hgupgrade-1: exp-http-v2-0003\r\n | |
60 | s> accept: application/mercurial-0.1\r\n |
|
60 | s> accept: application/mercurial-0.1\r\n | |
61 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
61 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
62 | s> user-agent: Mercurial debugwireproto\r\n |
|
62 | s> user-agent: Mercurial debugwireproto\r\n | |
63 | s> \r\n |
|
63 | s> \r\n | |
64 | s> makefile('rb', None) |
|
64 | s> makefile('rb', None) | |
65 | s> HTTP/1.1 200 OK\r\n |
|
65 | s> HTTP/1.1 200 OK\r\n | |
66 | s> Server: testing stub value\r\n |
|
66 | s> Server: testing stub value\r\n | |
67 | s> Date: $HTTP_DATE$\r\n |
|
67 | s> Date: $HTTP_DATE$\r\n | |
68 | s> Content-Type: application/mercurial-cbor\r\n |
|
68 | s> Content-Type: application/mercurial-cbor\r\n | |
69 | s> Content-Length: 2285\r\n |
|
69 | s> Content-Length: 2285\r\n | |
70 | s> \r\n |
|
70 | s> \r\n | |
71 | 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 | 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 | |
72 | (remote redirect target target-a is compatible) (tls1.2 !) |
|
72 | (remote redirect target target-a is compatible) (tls1.2 !) | |
73 | (remote redirect target target-a requires unsupported TLS versions: 1.2, 1.3) (no-tls1.2 !) |
|
73 | (remote redirect target target-a requires unsupported TLS versions: 1.2, 1.3) (no-tls1.2 !) | |
74 | sending capabilities command |
|
74 | sending capabilities command | |
75 |
s> setsockopt(6, 1, 1) -> None ( |
|
75 | s> setsockopt(6, 1, 1) -> None (?) | |
76 | s> POST /api/exp-http-v2-0003/ro/capabilities HTTP/1.1\r\n |
|
76 | s> POST /api/exp-http-v2-0003/ro/capabilities HTTP/1.1\r\n | |
77 | s> Accept-Encoding: identity\r\n |
|
77 | s> Accept-Encoding: identity\r\n | |
78 | s> accept: application/mercurial-exp-framing-0006\r\n |
|
78 | s> accept: application/mercurial-exp-framing-0006\r\n | |
79 | s> content-type: application/mercurial-exp-framing-0006\r\n |
|
79 | s> content-type: application/mercurial-exp-framing-0006\r\n | |
80 | s> content-length: 111\r\n (tls1.2 !) |
|
80 | s> content-length: 111\r\n (tls1.2 !) | |
81 | s> content-length: 102\r\n (no-tls1.2 !) |
|
81 | s> content-length: 102\r\n (no-tls1.2 !) | |
82 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
82 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
83 | s> user-agent: Mercurial debugwireproto\r\n |
|
83 | s> user-agent: Mercurial debugwireproto\r\n | |
84 | s> \r\n |
|
84 | s> \r\n | |
85 | 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 !) |
|
85 | 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 !) | |
86 | 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 !) |
|
86 | 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 !) | |
87 | s> makefile('rb', None) |
|
87 | s> makefile('rb', None) | |
88 | s> HTTP/1.1 200 OK\r\n |
|
88 | s> HTTP/1.1 200 OK\r\n | |
89 | s> Server: testing stub value\r\n |
|
89 | s> Server: testing stub value\r\n | |
90 | s> Date: $HTTP_DATE$\r\n |
|
90 | s> Date: $HTTP_DATE$\r\n | |
91 | s> Content-Type: application/mercurial-exp-framing-0006\r\n |
|
91 | s> Content-Type: application/mercurial-exp-framing-0006\r\n | |
92 | s> Transfer-Encoding: chunked\r\n |
|
92 | s> Transfer-Encoding: chunked\r\n | |
93 | s> \r\n |
|
93 | s> \r\n | |
94 | s> 11\r\n |
|
94 | s> 11\r\n | |
95 | s> \t\x00\x00\x01\x00\x02\x01\x92 |
|
95 | s> \t\x00\x00\x01\x00\x02\x01\x92 | |
96 | s> Hidentity |
|
96 | s> Hidentity | |
97 | s> \r\n |
|
97 | s> \r\n | |
98 | s> 13\r\n |
|
98 | s> 13\r\n | |
99 | s> \x0b\x00\x00\x01\x00\x02\x041 |
|
99 | s> \x0b\x00\x00\x01\x00\x02\x041 | |
100 | s> \xa1FstatusBok |
|
100 | s> \xa1FstatusBok | |
101 | s> \r\n |
|
101 | s> \r\n | |
102 | s> 6de\r\n |
|
102 | s> 6de\r\n | |
103 | s> \xd6\x06\x00\x01\x00\x02\x041 |
|
103 | s> \xd6\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\x83LgeneraldeltaHrevlogv1LsparserevlogHredirect\xa2Fhashes\x82Fsha256Dsha1Gtargets\x81\xa5DnameHtarget-aHprotocolDhttpKsnirequired\xf4Ktlsversions\x82C1.2C1.3Duris\x81Shttp://example.com/ |
|
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\x83LgeneraldeltaHrevlogv1LsparserevlogHredirect\xa2Fhashes\x82Fsha256Dsha1Gtargets\x81\xa5DnameHtarget-aHprotocolDhttpKsnirequired\xf4Ktlsversions\x82C1.2C1.3Duris\x81Shttp://example.com/ | |
105 | s> \r\n |
|
105 | s> \r\n | |
106 | s> 8\r\n |
|
106 | s> 8\r\n | |
107 | s> \x00\x00\x00\x01\x00\x02\x002 |
|
107 | s> \x00\x00\x00\x01\x00\x02\x002 | |
108 | s> \r\n |
|
108 | s> \r\n | |
109 | s> 0\r\n |
|
109 | s> 0\r\n | |
110 | s> \r\n |
|
110 | s> \r\n | |
111 | response: gen[ |
|
111 | response: gen[ | |
112 | { |
|
112 | { | |
113 | b'commands': { |
|
113 | b'commands': { | |
114 | b'branchmap': { |
|
114 | b'branchmap': { | |
115 | b'args': {}, |
|
115 | b'args': {}, | |
116 | b'permissions': [ |
|
116 | b'permissions': [ | |
117 | b'pull' |
|
117 | b'pull' | |
118 | ] |
|
118 | ] | |
119 | }, |
|
119 | }, | |
120 | b'capabilities': { |
|
120 | b'capabilities': { | |
121 | b'args': {}, |
|
121 | b'args': {}, | |
122 | b'permissions': [ |
|
122 | b'permissions': [ | |
123 | b'pull' |
|
123 | b'pull' | |
124 | ] |
|
124 | ] | |
125 | }, |
|
125 | }, | |
126 | b'changesetdata': { |
|
126 | b'changesetdata': { | |
127 | b'args': { |
|
127 | b'args': { | |
128 | b'fields': { |
|
128 | b'fields': { | |
129 | b'default': set([]), |
|
129 | b'default': set([]), | |
130 | b'required': False, |
|
130 | b'required': False, | |
131 | b'type': b'set', |
|
131 | b'type': b'set', | |
132 | b'validvalues': set([ |
|
132 | b'validvalues': set([ | |
133 | b'bookmarks', |
|
133 | b'bookmarks', | |
134 | b'parents', |
|
134 | b'parents', | |
135 | b'phase', |
|
135 | b'phase', | |
136 | b'revision' |
|
136 | b'revision' | |
137 | ]) |
|
137 | ]) | |
138 | }, |
|
138 | }, | |
139 | b'revisions': { |
|
139 | b'revisions': { | |
140 | b'required': True, |
|
140 | b'required': True, | |
141 | b'type': b'list' |
|
141 | b'type': b'list' | |
142 | } |
|
142 | } | |
143 | }, |
|
143 | }, | |
144 | b'permissions': [ |
|
144 | b'permissions': [ | |
145 | b'pull' |
|
145 | b'pull' | |
146 | ] |
|
146 | ] | |
147 | }, |
|
147 | }, | |
148 | b'filedata': { |
|
148 | b'filedata': { | |
149 | b'args': { |
|
149 | b'args': { | |
150 | b'fields': { |
|
150 | b'fields': { | |
151 | b'default': set([]), |
|
151 | b'default': set([]), | |
152 | b'required': False, |
|
152 | b'required': False, | |
153 | b'type': b'set', |
|
153 | b'type': b'set', | |
154 | b'validvalues': set([ |
|
154 | b'validvalues': set([ | |
155 | b'linknode', |
|
155 | b'linknode', | |
156 | b'parents', |
|
156 | b'parents', | |
157 | b'revision' |
|
157 | b'revision' | |
158 | ]) |
|
158 | ]) | |
159 | }, |
|
159 | }, | |
160 | b'haveparents': { |
|
160 | b'haveparents': { | |
161 | b'default': False, |
|
161 | b'default': False, | |
162 | b'required': False, |
|
162 | b'required': False, | |
163 | b'type': b'bool' |
|
163 | b'type': b'bool' | |
164 | }, |
|
164 | }, | |
165 | b'nodes': { |
|
165 | b'nodes': { | |
166 | b'required': True, |
|
166 | b'required': True, | |
167 | b'type': b'list' |
|
167 | b'type': b'list' | |
168 | }, |
|
168 | }, | |
169 | b'path': { |
|
169 | b'path': { | |
170 | b'required': True, |
|
170 | b'required': True, | |
171 | b'type': b'bytes' |
|
171 | b'type': b'bytes' | |
172 | } |
|
172 | } | |
173 | }, |
|
173 | }, | |
174 | b'permissions': [ |
|
174 | b'permissions': [ | |
175 | b'pull' |
|
175 | b'pull' | |
176 | ] |
|
176 | ] | |
177 | }, |
|
177 | }, | |
178 | b'filesdata': { |
|
178 | b'filesdata': { | |
179 | b'args': { |
|
179 | b'args': { | |
180 | b'fields': { |
|
180 | b'fields': { | |
181 | b'default': set([]), |
|
181 | b'default': set([]), | |
182 | b'required': False, |
|
182 | b'required': False, | |
183 | b'type': b'set', |
|
183 | b'type': b'set', | |
184 | b'validvalues': set([ |
|
184 | b'validvalues': set([ | |
185 | b'firstchangeset', |
|
185 | b'firstchangeset', | |
186 | b'linknode', |
|
186 | b'linknode', | |
187 | b'parents', |
|
187 | b'parents', | |
188 | b'revision' |
|
188 | b'revision' | |
189 | ]) |
|
189 | ]) | |
190 | }, |
|
190 | }, | |
191 | b'haveparents': { |
|
191 | b'haveparents': { | |
192 | b'default': False, |
|
192 | b'default': False, | |
193 | b'required': False, |
|
193 | b'required': False, | |
194 | b'type': b'bool' |
|
194 | b'type': b'bool' | |
195 | }, |
|
195 | }, | |
196 | b'pathfilter': { |
|
196 | b'pathfilter': { | |
197 | b'default': None, |
|
197 | b'default': None, | |
198 | b'required': False, |
|
198 | b'required': False, | |
199 | b'type': b'dict' |
|
199 | b'type': b'dict' | |
200 | }, |
|
200 | }, | |
201 | b'revisions': { |
|
201 | b'revisions': { | |
202 | b'required': True, |
|
202 | b'required': True, | |
203 | b'type': b'list' |
|
203 | b'type': b'list' | |
204 | } |
|
204 | } | |
205 | }, |
|
205 | }, | |
206 | b'permissions': [ |
|
206 | b'permissions': [ | |
207 | b'pull' |
|
207 | b'pull' | |
208 | ], |
|
208 | ], | |
209 | b'recommendedbatchsize': 50000 |
|
209 | b'recommendedbatchsize': 50000 | |
210 | }, |
|
210 | }, | |
211 | b'heads': { |
|
211 | b'heads': { | |
212 | b'args': { |
|
212 | b'args': { | |
213 | b'publiconly': { |
|
213 | b'publiconly': { | |
214 | b'default': False, |
|
214 | b'default': False, | |
215 | b'required': False, |
|
215 | b'required': False, | |
216 | b'type': b'bool' |
|
216 | b'type': b'bool' | |
217 | } |
|
217 | } | |
218 | }, |
|
218 | }, | |
219 | b'permissions': [ |
|
219 | b'permissions': [ | |
220 | b'pull' |
|
220 | b'pull' | |
221 | ] |
|
221 | ] | |
222 | }, |
|
222 | }, | |
223 | b'known': { |
|
223 | b'known': { | |
224 | b'args': { |
|
224 | b'args': { | |
225 | b'nodes': { |
|
225 | b'nodes': { | |
226 | b'default': [], |
|
226 | b'default': [], | |
227 | b'required': False, |
|
227 | b'required': False, | |
228 | b'type': b'list' |
|
228 | b'type': b'list' | |
229 | } |
|
229 | } | |
230 | }, |
|
230 | }, | |
231 | b'permissions': [ |
|
231 | b'permissions': [ | |
232 | b'pull' |
|
232 | b'pull' | |
233 | ] |
|
233 | ] | |
234 | }, |
|
234 | }, | |
235 | b'listkeys': { |
|
235 | b'listkeys': { | |
236 | b'args': { |
|
236 | b'args': { | |
237 | b'namespace': { |
|
237 | b'namespace': { | |
238 | b'required': True, |
|
238 | b'required': True, | |
239 | b'type': b'bytes' |
|
239 | b'type': b'bytes' | |
240 | } |
|
240 | } | |
241 | }, |
|
241 | }, | |
242 | b'permissions': [ |
|
242 | b'permissions': [ | |
243 | b'pull' |
|
243 | b'pull' | |
244 | ] |
|
244 | ] | |
245 | }, |
|
245 | }, | |
246 | b'lookup': { |
|
246 | b'lookup': { | |
247 | b'args': { |
|
247 | b'args': { | |
248 | b'key': { |
|
248 | b'key': { | |
249 | b'required': True, |
|
249 | b'required': True, | |
250 | b'type': b'bytes' |
|
250 | b'type': b'bytes' | |
251 | } |
|
251 | } | |
252 | }, |
|
252 | }, | |
253 | b'permissions': [ |
|
253 | b'permissions': [ | |
254 | b'pull' |
|
254 | b'pull' | |
255 | ] |
|
255 | ] | |
256 | }, |
|
256 | }, | |
257 | b'manifestdata': { |
|
257 | b'manifestdata': { | |
258 | b'args': { |
|
258 | b'args': { | |
259 | b'fields': { |
|
259 | b'fields': { | |
260 | b'default': set([]), |
|
260 | b'default': set([]), | |
261 | b'required': False, |
|
261 | b'required': False, | |
262 | b'type': b'set', |
|
262 | b'type': b'set', | |
263 | b'validvalues': set([ |
|
263 | b'validvalues': set([ | |
264 | b'parents', |
|
264 | b'parents', | |
265 | b'revision' |
|
265 | b'revision' | |
266 | ]) |
|
266 | ]) | |
267 | }, |
|
267 | }, | |
268 | b'haveparents': { |
|
268 | b'haveparents': { | |
269 | b'default': False, |
|
269 | b'default': False, | |
270 | b'required': False, |
|
270 | b'required': False, | |
271 | b'type': b'bool' |
|
271 | b'type': b'bool' | |
272 | }, |
|
272 | }, | |
273 | b'nodes': { |
|
273 | b'nodes': { | |
274 | b'required': True, |
|
274 | b'required': True, | |
275 | b'type': b'list' |
|
275 | b'type': b'list' | |
276 | }, |
|
276 | }, | |
277 | b'tree': { |
|
277 | b'tree': { | |
278 | b'required': True, |
|
278 | b'required': True, | |
279 | b'type': b'bytes' |
|
279 | b'type': b'bytes' | |
280 | } |
|
280 | } | |
281 | }, |
|
281 | }, | |
282 | b'permissions': [ |
|
282 | b'permissions': [ | |
283 | b'pull' |
|
283 | b'pull' | |
284 | ], |
|
284 | ], | |
285 | b'recommendedbatchsize': 100000 |
|
285 | b'recommendedbatchsize': 100000 | |
286 | }, |
|
286 | }, | |
287 | b'pushkey': { |
|
287 | b'pushkey': { | |
288 | b'args': { |
|
288 | b'args': { | |
289 | b'key': { |
|
289 | b'key': { | |
290 | b'required': True, |
|
290 | b'required': True, | |
291 | b'type': b'bytes' |
|
291 | b'type': b'bytes' | |
292 | }, |
|
292 | }, | |
293 | b'namespace': { |
|
293 | b'namespace': { | |
294 | b'required': True, |
|
294 | b'required': True, | |
295 | b'type': b'bytes' |
|
295 | b'type': b'bytes' | |
296 | }, |
|
296 | }, | |
297 | b'new': { |
|
297 | b'new': { | |
298 | b'required': True, |
|
298 | b'required': True, | |
299 | b'type': b'bytes' |
|
299 | b'type': b'bytes' | |
300 | }, |
|
300 | }, | |
301 | b'old': { |
|
301 | b'old': { | |
302 | b'required': True, |
|
302 | b'required': True, | |
303 | b'type': b'bytes' |
|
303 | b'type': b'bytes' | |
304 | } |
|
304 | } | |
305 | }, |
|
305 | }, | |
306 | b'permissions': [ |
|
306 | b'permissions': [ | |
307 | b'push' |
|
307 | b'push' | |
308 | ] |
|
308 | ] | |
309 | }, |
|
309 | }, | |
310 | b'rawstorefiledata': { |
|
310 | b'rawstorefiledata': { | |
311 | b'args': { |
|
311 | b'args': { | |
312 | b'files': { |
|
312 | b'files': { | |
313 | b'required': True, |
|
313 | b'required': True, | |
314 | b'type': b'list' |
|
314 | b'type': b'list' | |
315 | }, |
|
315 | }, | |
316 | b'pathfilter': { |
|
316 | b'pathfilter': { | |
317 | b'default': None, |
|
317 | b'default': None, | |
318 | b'required': False, |
|
318 | b'required': False, | |
319 | b'type': b'list' |
|
319 | b'type': b'list' | |
320 | } |
|
320 | } | |
321 | }, |
|
321 | }, | |
322 | b'permissions': [ |
|
322 | b'permissions': [ | |
323 | b'pull' |
|
323 | b'pull' | |
324 | ] |
|
324 | ] | |
325 | } |
|
325 | } | |
326 | }, |
|
326 | }, | |
327 | b'framingmediatypes': [ |
|
327 | b'framingmediatypes': [ | |
328 | b'application/mercurial-exp-framing-0006' |
|
328 | b'application/mercurial-exp-framing-0006' | |
329 | ], |
|
329 | ], | |
330 | b'pathfilterprefixes': set([ |
|
330 | b'pathfilterprefixes': set([ | |
331 | b'path:', |
|
331 | b'path:', | |
332 | b'rootfilesin:' |
|
332 | b'rootfilesin:' | |
333 | ]), |
|
333 | ]), | |
334 | b'rawrepoformats': [ |
|
334 | b'rawrepoformats': [ | |
335 | b'generaldelta', |
|
335 | b'generaldelta', | |
336 | b'revlogv1', |
|
336 | b'revlogv1', | |
337 | b'sparserevlog' |
|
337 | b'sparserevlog' | |
338 | ], |
|
338 | ], | |
339 | b'redirect': { |
|
339 | b'redirect': { | |
340 | b'hashes': [ |
|
340 | b'hashes': [ | |
341 | b'sha256', |
|
341 | b'sha256', | |
342 | b'sha1' |
|
342 | b'sha1' | |
343 | ], |
|
343 | ], | |
344 | b'targets': [ |
|
344 | b'targets': [ | |
345 | { |
|
345 | { | |
346 | b'name': b'target-a', |
|
346 | b'name': b'target-a', | |
347 | b'protocol': b'http', |
|
347 | b'protocol': b'http', | |
348 | b'snirequired': False, |
|
348 | b'snirequired': False, | |
349 | b'tlsversions': [ |
|
349 | b'tlsversions': [ | |
350 | b'1.2', |
|
350 | b'1.2', | |
351 | b'1.3' |
|
351 | b'1.3' | |
352 | ], |
|
352 | ], | |
353 | b'uris': [ |
|
353 | b'uris': [ | |
354 | b'http://example.com/' |
|
354 | b'http://example.com/' | |
355 | ] |
|
355 | ] | |
356 | } |
|
356 | } | |
357 | ] |
|
357 | ] | |
358 | } |
|
358 | } | |
359 | } |
|
359 | } | |
360 | ] |
|
360 | ] | |
361 | (sent 2 HTTP requests and * bytes; received * bytes in responses) (glob) |
|
361 | (sent 2 HTTP requests and * bytes; received * bytes in responses) (glob) | |
362 |
|
362 | |||
363 | Unknown protocol is filtered from compatible targets |
|
363 | Unknown protocol is filtered from compatible targets | |
364 |
|
364 | |||
365 | $ cat > redirects.py << EOF |
|
365 | $ cat > redirects.py << EOF | |
366 | > [ |
|
366 | > [ | |
367 | > { |
|
367 | > { | |
368 | > b'name': b'target-a', |
|
368 | > b'name': b'target-a', | |
369 | > b'protocol': b'http', |
|
369 | > b'protocol': b'http', | |
370 | > b'uris': [b'http://example.com/'], |
|
370 | > b'uris': [b'http://example.com/'], | |
371 | > }, |
|
371 | > }, | |
372 | > { |
|
372 | > { | |
373 | > b'name': b'target-b', |
|
373 | > b'name': b'target-b', | |
374 | > b'protocol': b'unknown', |
|
374 | > b'protocol': b'unknown', | |
375 | > b'uris': [b'unknown://example.com/'], |
|
375 | > b'uris': [b'unknown://example.com/'], | |
376 | > }, |
|
376 | > }, | |
377 | > ] |
|
377 | > ] | |
378 | > EOF |
|
378 | > EOF | |
379 |
|
379 | |||
380 | $ sendhttpv2peerhandshake << EOF |
|
380 | $ sendhttpv2peerhandshake << EOF | |
381 | > command capabilities |
|
381 | > command capabilities | |
382 | > EOF |
|
382 | > EOF | |
383 | creating http peer for wire protocol version 2 |
|
383 | creating http peer for wire protocol version 2 | |
384 |
s> setsockopt(6, 1, 1) -> None ( |
|
384 | s> setsockopt(6, 1, 1) -> None (?) | |
385 | s> GET /?cmd=capabilities HTTP/1.1\r\n |
|
385 | s> GET /?cmd=capabilities HTTP/1.1\r\n | |
386 | s> Accept-Encoding: identity\r\n |
|
386 | s> Accept-Encoding: identity\r\n | |
387 | s> vary: X-HgProto-1,X-HgUpgrade-1\r\n |
|
387 | s> vary: X-HgProto-1,X-HgUpgrade-1\r\n | |
388 | s> x-hgproto-1: cbor\r\n |
|
388 | s> x-hgproto-1: cbor\r\n | |
389 | s> x-hgupgrade-1: exp-http-v2-0003\r\n |
|
389 | s> x-hgupgrade-1: exp-http-v2-0003\r\n | |
390 | s> accept: application/mercurial-0.1\r\n |
|
390 | s> accept: application/mercurial-0.1\r\n | |
391 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
391 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
392 | s> user-agent: Mercurial debugwireproto\r\n |
|
392 | s> user-agent: Mercurial debugwireproto\r\n | |
393 | s> \r\n |
|
393 | s> \r\n | |
394 | s> makefile('rb', None) |
|
394 | s> makefile('rb', None) | |
395 | s> HTTP/1.1 200 OK\r\n |
|
395 | s> HTTP/1.1 200 OK\r\n | |
396 | s> Server: testing stub value\r\n |
|
396 | s> Server: testing stub value\r\n | |
397 | s> Date: $HTTP_DATE$\r\n |
|
397 | s> Date: $HTTP_DATE$\r\n | |
398 | s> Content-Type: application/mercurial-cbor\r\n |
|
398 | s> Content-Type: application/mercurial-cbor\r\n | |
399 | s> Content-Length: 2312\r\n |
|
399 | s> Content-Length: 2312\r\n | |
400 | s> \r\n |
|
400 | 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\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 |
|
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\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 | |
402 | (remote redirect target target-a is compatible) |
|
402 | (remote redirect target target-a is compatible) | |
403 | (remote redirect target target-b uses unsupported protocol: unknown) |
|
403 | (remote redirect target target-b uses unsupported protocol: unknown) | |
404 | sending capabilities command |
|
404 | sending capabilities command | |
405 |
s> setsockopt(6, 1, 1) -> None ( |
|
405 | s> setsockopt(6, 1, 1) -> None (?) | |
406 | s> POST /api/exp-http-v2-0003/ro/capabilities HTTP/1.1\r\n |
|
406 | s> POST /api/exp-http-v2-0003/ro/capabilities HTTP/1.1\r\n | |
407 | s> Accept-Encoding: identity\r\n |
|
407 | s> Accept-Encoding: identity\r\n | |
408 | s> accept: application/mercurial-exp-framing-0006\r\n |
|
408 | s> accept: application/mercurial-exp-framing-0006\r\n | |
409 | s> content-type: application/mercurial-exp-framing-0006\r\n |
|
409 | s> content-type: application/mercurial-exp-framing-0006\r\n | |
410 | s> content-length: 111\r\n |
|
410 | s> content-length: 111\r\n | |
411 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
411 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
412 | s> user-agent: Mercurial debugwireproto\r\n |
|
412 | s> user-agent: Mercurial debugwireproto\r\n | |
413 | s> \r\n |
|
413 | s> \r\n | |
414 | s> \x1c\x00\x00\x01\x00\x01\x01\x82\xa1Pcontentencodings\x81HidentityC\x00\x00\x01\x00\x01\x00\x11\xa2DnameLcapabilitiesHredirect\xa2Fhashes\x82Fsha256Dsha1Gtargets\x81Htarget-a |
|
414 | s> \x1c\x00\x00\x01\x00\x01\x01\x82\xa1Pcontentencodings\x81HidentityC\x00\x00\x01\x00\x01\x00\x11\xa2DnameLcapabilitiesHredirect\xa2Fhashes\x82Fsha256Dsha1Gtargets\x81Htarget-a | |
415 | s> makefile('rb', None) |
|
415 | s> makefile('rb', None) | |
416 | s> HTTP/1.1 200 OK\r\n |
|
416 | s> HTTP/1.1 200 OK\r\n | |
417 | s> Server: testing stub value\r\n |
|
417 | s> Server: testing stub value\r\n | |
418 | s> Date: $HTTP_DATE$\r\n |
|
418 | s> Date: $HTTP_DATE$\r\n | |
419 | s> Content-Type: application/mercurial-exp-framing-0006\r\n |
|
419 | s> Content-Type: application/mercurial-exp-framing-0006\r\n | |
420 | s> Transfer-Encoding: chunked\r\n |
|
420 | s> Transfer-Encoding: chunked\r\n | |
421 | s> \r\n |
|
421 | s> \r\n | |
422 | s> 11\r\n |
|
422 | s> 11\r\n | |
423 | s> \t\x00\x00\x01\x00\x02\x01\x92 |
|
423 | s> \t\x00\x00\x01\x00\x02\x01\x92 | |
424 | s> Hidentity |
|
424 | s> Hidentity | |
425 | s> \r\n |
|
425 | s> \r\n | |
426 | s> 13\r\n |
|
426 | s> 13\r\n | |
427 | s> \x0b\x00\x00\x01\x00\x02\x041 |
|
427 | s> \x0b\x00\x00\x01\x00\x02\x041 | |
428 | s> \xa1FstatusBok |
|
428 | s> \xa1FstatusBok | |
429 | s> \r\n |
|
429 | s> \r\n | |
430 | s> 6f9\r\n |
|
430 | s> 6f9\r\n | |
431 | s> \xf1\x06\x00\x01\x00\x02\x041 |
|
431 | s> \xf1\x06\x00\x01\x00\x02\x041 | |
432 | 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/ |
|
432 | 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/ | |
433 | s> \r\n |
|
433 | s> \r\n | |
434 | s> 8\r\n |
|
434 | s> 8\r\n | |
435 | s> \x00\x00\x00\x01\x00\x02\x002 |
|
435 | s> \x00\x00\x00\x01\x00\x02\x002 | |
436 | s> \r\n |
|
436 | s> \r\n | |
437 | s> 0\r\n |
|
437 | s> 0\r\n | |
438 | s> \r\n |
|
438 | s> \r\n | |
439 | response: gen[ |
|
439 | response: gen[ | |
440 | { |
|
440 | { | |
441 | b'commands': { |
|
441 | b'commands': { | |
442 | b'branchmap': { |
|
442 | b'branchmap': { | |
443 | b'args': {}, |
|
443 | b'args': {}, | |
444 | b'permissions': [ |
|
444 | b'permissions': [ | |
445 | b'pull' |
|
445 | b'pull' | |
446 | ] |
|
446 | ] | |
447 | }, |
|
447 | }, | |
448 | b'capabilities': { |
|
448 | b'capabilities': { | |
449 | b'args': {}, |
|
449 | b'args': {}, | |
450 | b'permissions': [ |
|
450 | b'permissions': [ | |
451 | b'pull' |
|
451 | b'pull' | |
452 | ] |
|
452 | ] | |
453 | }, |
|
453 | }, | |
454 | b'changesetdata': { |
|
454 | b'changesetdata': { | |
455 | b'args': { |
|
455 | b'args': { | |
456 | b'fields': { |
|
456 | b'fields': { | |
457 | b'default': set([]), |
|
457 | b'default': set([]), | |
458 | b'required': False, |
|
458 | b'required': False, | |
459 | b'type': b'set', |
|
459 | b'type': b'set', | |
460 | b'validvalues': set([ |
|
460 | b'validvalues': set([ | |
461 | b'bookmarks', |
|
461 | b'bookmarks', | |
462 | b'parents', |
|
462 | b'parents', | |
463 | b'phase', |
|
463 | b'phase', | |
464 | b'revision' |
|
464 | b'revision' | |
465 | ]) |
|
465 | ]) | |
466 | }, |
|
466 | }, | |
467 | b'revisions': { |
|
467 | b'revisions': { | |
468 | b'required': True, |
|
468 | b'required': True, | |
469 | b'type': b'list' |
|
469 | b'type': b'list' | |
470 | } |
|
470 | } | |
471 | }, |
|
471 | }, | |
472 | b'permissions': [ |
|
472 | b'permissions': [ | |
473 | b'pull' |
|
473 | b'pull' | |
474 | ] |
|
474 | ] | |
475 | }, |
|
475 | }, | |
476 | b'filedata': { |
|
476 | b'filedata': { | |
477 | b'args': { |
|
477 | b'args': { | |
478 | b'fields': { |
|
478 | b'fields': { | |
479 | b'default': set([]), |
|
479 | b'default': set([]), | |
480 | b'required': False, |
|
480 | b'required': False, | |
481 | b'type': b'set', |
|
481 | b'type': b'set', | |
482 | b'validvalues': set([ |
|
482 | b'validvalues': set([ | |
483 | b'linknode', |
|
483 | b'linknode', | |
484 | b'parents', |
|
484 | b'parents', | |
485 | b'revision' |
|
485 | b'revision' | |
486 | ]) |
|
486 | ]) | |
487 | }, |
|
487 | }, | |
488 | b'haveparents': { |
|
488 | b'haveparents': { | |
489 | b'default': False, |
|
489 | b'default': False, | |
490 | b'required': False, |
|
490 | b'required': False, | |
491 | b'type': b'bool' |
|
491 | b'type': b'bool' | |
492 | }, |
|
492 | }, | |
493 | b'nodes': { |
|
493 | b'nodes': { | |
494 | b'required': True, |
|
494 | b'required': True, | |
495 | b'type': b'list' |
|
495 | b'type': b'list' | |
496 | }, |
|
496 | }, | |
497 | b'path': { |
|
497 | b'path': { | |
498 | b'required': True, |
|
498 | b'required': True, | |
499 | b'type': b'bytes' |
|
499 | b'type': b'bytes' | |
500 | } |
|
500 | } | |
501 | }, |
|
501 | }, | |
502 | b'permissions': [ |
|
502 | b'permissions': [ | |
503 | b'pull' |
|
503 | b'pull' | |
504 | ] |
|
504 | ] | |
505 | }, |
|
505 | }, | |
506 | b'filesdata': { |
|
506 | b'filesdata': { | |
507 | b'args': { |
|
507 | b'args': { | |
508 | b'fields': { |
|
508 | b'fields': { | |
509 | b'default': set([]), |
|
509 | b'default': set([]), | |
510 | b'required': False, |
|
510 | b'required': False, | |
511 | b'type': b'set', |
|
511 | b'type': b'set', | |
512 | b'validvalues': set([ |
|
512 | b'validvalues': set([ | |
513 | b'firstchangeset', |
|
513 | b'firstchangeset', | |
514 | b'linknode', |
|
514 | b'linknode', | |
515 | b'parents', |
|
515 | b'parents', | |
516 | b'revision' |
|
516 | b'revision' | |
517 | ]) |
|
517 | ]) | |
518 | }, |
|
518 | }, | |
519 | b'haveparents': { |
|
519 | b'haveparents': { | |
520 | b'default': False, |
|
520 | b'default': False, | |
521 | b'required': False, |
|
521 | b'required': False, | |
522 | b'type': b'bool' |
|
522 | b'type': b'bool' | |
523 | }, |
|
523 | }, | |
524 | b'pathfilter': { |
|
524 | b'pathfilter': { | |
525 | b'default': None, |
|
525 | b'default': None, | |
526 | b'required': False, |
|
526 | b'required': False, | |
527 | b'type': b'dict' |
|
527 | b'type': b'dict' | |
528 | }, |
|
528 | }, | |
529 | b'revisions': { |
|
529 | b'revisions': { | |
530 | b'required': True, |
|
530 | b'required': True, | |
531 | b'type': b'list' |
|
531 | b'type': b'list' | |
532 | } |
|
532 | } | |
533 | }, |
|
533 | }, | |
534 | b'permissions': [ |
|
534 | b'permissions': [ | |
535 | b'pull' |
|
535 | b'pull' | |
536 | ], |
|
536 | ], | |
537 | b'recommendedbatchsize': 50000 |
|
537 | b'recommendedbatchsize': 50000 | |
538 | }, |
|
538 | }, | |
539 | b'heads': { |
|
539 | b'heads': { | |
540 | b'args': { |
|
540 | b'args': { | |
541 | b'publiconly': { |
|
541 | b'publiconly': { | |
542 | b'default': False, |
|
542 | b'default': False, | |
543 | b'required': False, |
|
543 | b'required': False, | |
544 | b'type': b'bool' |
|
544 | b'type': b'bool' | |
545 | } |
|
545 | } | |
546 | }, |
|
546 | }, | |
547 | b'permissions': [ |
|
547 | b'permissions': [ | |
548 | b'pull' |
|
548 | b'pull' | |
549 | ] |
|
549 | ] | |
550 | }, |
|
550 | }, | |
551 | b'known': { |
|
551 | b'known': { | |
552 | b'args': { |
|
552 | b'args': { | |
553 | b'nodes': { |
|
553 | b'nodes': { | |
554 | b'default': [], |
|
554 | b'default': [], | |
555 | b'required': False, |
|
555 | b'required': False, | |
556 | b'type': b'list' |
|
556 | b'type': b'list' | |
557 | } |
|
557 | } | |
558 | }, |
|
558 | }, | |
559 | b'permissions': [ |
|
559 | b'permissions': [ | |
560 | b'pull' |
|
560 | b'pull' | |
561 | ] |
|
561 | ] | |
562 | }, |
|
562 | }, | |
563 | b'listkeys': { |
|
563 | b'listkeys': { | |
564 | b'args': { |
|
564 | b'args': { | |
565 | b'namespace': { |
|
565 | b'namespace': { | |
566 | b'required': True, |
|
566 | b'required': True, | |
567 | b'type': b'bytes' |
|
567 | b'type': b'bytes' | |
568 | } |
|
568 | } | |
569 | }, |
|
569 | }, | |
570 | b'permissions': [ |
|
570 | b'permissions': [ | |
571 | b'pull' |
|
571 | b'pull' | |
572 | ] |
|
572 | ] | |
573 | }, |
|
573 | }, | |
574 | b'lookup': { |
|
574 | b'lookup': { | |
575 | b'args': { |
|
575 | b'args': { | |
576 | b'key': { |
|
576 | b'key': { | |
577 | b'required': True, |
|
577 | b'required': True, | |
578 | b'type': b'bytes' |
|
578 | b'type': b'bytes' | |
579 | } |
|
579 | } | |
580 | }, |
|
580 | }, | |
581 | b'permissions': [ |
|
581 | b'permissions': [ | |
582 | b'pull' |
|
582 | b'pull' | |
583 | ] |
|
583 | ] | |
584 | }, |
|
584 | }, | |
585 | b'manifestdata': { |
|
585 | b'manifestdata': { | |
586 | b'args': { |
|
586 | b'args': { | |
587 | b'fields': { |
|
587 | b'fields': { | |
588 | b'default': set([]), |
|
588 | b'default': set([]), | |
589 | b'required': False, |
|
589 | b'required': False, | |
590 | b'type': b'set', |
|
590 | b'type': b'set', | |
591 | b'validvalues': set([ |
|
591 | b'validvalues': set([ | |
592 | b'parents', |
|
592 | b'parents', | |
593 | b'revision' |
|
593 | b'revision' | |
594 | ]) |
|
594 | ]) | |
595 | }, |
|
595 | }, | |
596 | b'haveparents': { |
|
596 | b'haveparents': { | |
597 | b'default': False, |
|
597 | b'default': False, | |
598 | b'required': False, |
|
598 | b'required': False, | |
599 | b'type': b'bool' |
|
599 | b'type': b'bool' | |
600 | }, |
|
600 | }, | |
601 | b'nodes': { |
|
601 | b'nodes': { | |
602 | b'required': True, |
|
602 | b'required': True, | |
603 | b'type': b'list' |
|
603 | b'type': b'list' | |
604 | }, |
|
604 | }, | |
605 | b'tree': { |
|
605 | b'tree': { | |
606 | b'required': True, |
|
606 | b'required': True, | |
607 | b'type': b'bytes' |
|
607 | b'type': b'bytes' | |
608 | } |
|
608 | } | |
609 | }, |
|
609 | }, | |
610 | b'permissions': [ |
|
610 | b'permissions': [ | |
611 | b'pull' |
|
611 | b'pull' | |
612 | ], |
|
612 | ], | |
613 | b'recommendedbatchsize': 100000 |
|
613 | b'recommendedbatchsize': 100000 | |
614 | }, |
|
614 | }, | |
615 | b'pushkey': { |
|
615 | b'pushkey': { | |
616 | b'args': { |
|
616 | b'args': { | |
617 | b'key': { |
|
617 | b'key': { | |
618 | b'required': True, |
|
618 | b'required': True, | |
619 | b'type': b'bytes' |
|
619 | b'type': b'bytes' | |
620 | }, |
|
620 | }, | |
621 | b'namespace': { |
|
621 | b'namespace': { | |
622 | b'required': True, |
|
622 | b'required': True, | |
623 | b'type': b'bytes' |
|
623 | b'type': b'bytes' | |
624 | }, |
|
624 | }, | |
625 | b'new': { |
|
625 | b'new': { | |
626 | b'required': True, |
|
626 | b'required': True, | |
627 | b'type': b'bytes' |
|
627 | b'type': b'bytes' | |
628 | }, |
|
628 | }, | |
629 | b'old': { |
|
629 | b'old': { | |
630 | b'required': True, |
|
630 | b'required': True, | |
631 | b'type': b'bytes' |
|
631 | b'type': b'bytes' | |
632 | } |
|
632 | } | |
633 | }, |
|
633 | }, | |
634 | b'permissions': [ |
|
634 | b'permissions': [ | |
635 | b'push' |
|
635 | b'push' | |
636 | ] |
|
636 | ] | |
637 | }, |
|
637 | }, | |
638 | b'rawstorefiledata': { |
|
638 | b'rawstorefiledata': { | |
639 | b'args': { |
|
639 | b'args': { | |
640 | b'files': { |
|
640 | b'files': { | |
641 | b'required': True, |
|
641 | b'required': True, | |
642 | b'type': b'list' |
|
642 | b'type': b'list' | |
643 | }, |
|
643 | }, | |
644 | b'pathfilter': { |
|
644 | b'pathfilter': { | |
645 | b'default': None, |
|
645 | b'default': None, | |
646 | b'required': False, |
|
646 | b'required': False, | |
647 | b'type': b'list' |
|
647 | b'type': b'list' | |
648 | } |
|
648 | } | |
649 | }, |
|
649 | }, | |
650 | b'permissions': [ |
|
650 | b'permissions': [ | |
651 | b'pull' |
|
651 | b'pull' | |
652 | ] |
|
652 | ] | |
653 | } |
|
653 | } | |
654 | }, |
|
654 | }, | |
655 | b'framingmediatypes': [ |
|
655 | b'framingmediatypes': [ | |
656 | b'application/mercurial-exp-framing-0006' |
|
656 | b'application/mercurial-exp-framing-0006' | |
657 | ], |
|
657 | ], | |
658 | b'pathfilterprefixes': set([ |
|
658 | b'pathfilterprefixes': set([ | |
659 | b'path:', |
|
659 | b'path:', | |
660 | b'rootfilesin:' |
|
660 | b'rootfilesin:' | |
661 | ]), |
|
661 | ]), | |
662 | b'rawrepoformats': [ |
|
662 | b'rawrepoformats': [ | |
663 | b'generaldelta', |
|
663 | b'generaldelta', | |
664 | b'revlogv1', |
|
664 | b'revlogv1', | |
665 | b'sparserevlog' |
|
665 | b'sparserevlog' | |
666 | ], |
|
666 | ], | |
667 | b'redirect': { |
|
667 | b'redirect': { | |
668 | b'hashes': [ |
|
668 | b'hashes': [ | |
669 | b'sha256', |
|
669 | b'sha256', | |
670 | b'sha1' |
|
670 | b'sha1' | |
671 | ], |
|
671 | ], | |
672 | b'targets': [ |
|
672 | b'targets': [ | |
673 | { |
|
673 | { | |
674 | b'name': b'target-a', |
|
674 | b'name': b'target-a', | |
675 | b'protocol': b'http', |
|
675 | b'protocol': b'http', | |
676 | b'uris': [ |
|
676 | b'uris': [ | |
677 | b'http://example.com/' |
|
677 | b'http://example.com/' | |
678 | ] |
|
678 | ] | |
679 | }, |
|
679 | }, | |
680 | { |
|
680 | { | |
681 | b'name': b'target-b', |
|
681 | b'name': b'target-b', | |
682 | b'protocol': b'unknown', |
|
682 | b'protocol': b'unknown', | |
683 | b'uris': [ |
|
683 | b'uris': [ | |
684 | b'unknown://example.com/' |
|
684 | b'unknown://example.com/' | |
685 | ] |
|
685 | ] | |
686 | } |
|
686 | } | |
687 | ] |
|
687 | ] | |
688 | } |
|
688 | } | |
689 | } |
|
689 | } | |
690 | ] |
|
690 | ] | |
691 | (sent 2 HTTP requests and * bytes; received * bytes in responses) (glob) |
|
691 | (sent 2 HTTP requests and * bytes; received * bytes in responses) (glob) | |
692 |
|
692 | |||
693 | Missing SNI support filters targets that require SNI |
|
693 | Missing SNI support filters targets that require SNI | |
694 |
|
694 | |||
695 | $ cat > nosni.py << EOF |
|
695 | $ cat > nosni.py << EOF | |
696 | > from mercurial import sslutil |
|
696 | > from mercurial import sslutil | |
697 | > sslutil.hassni = False |
|
697 | > sslutil.hassni = False | |
698 | > EOF |
|
698 | > EOF | |
699 | $ cat >> $HGRCPATH << EOF |
|
699 | $ cat >> $HGRCPATH << EOF | |
700 | > [extensions] |
|
700 | > [extensions] | |
701 | > nosni=`pwd`/nosni.py |
|
701 | > nosni=`pwd`/nosni.py | |
702 | > EOF |
|
702 | > EOF | |
703 |
|
703 | |||
704 | $ cat > redirects.py << EOF |
|
704 | $ cat > redirects.py << EOF | |
705 | > [ |
|
705 | > [ | |
706 | > { |
|
706 | > { | |
707 | > b'name': b'target-bad-tls', |
|
707 | > b'name': b'target-bad-tls', | |
708 | > b'protocol': b'https', |
|
708 | > b'protocol': b'https', | |
709 | > b'uris': [b'https://example.com/'], |
|
709 | > b'uris': [b'https://example.com/'], | |
710 | > b'snirequired': True, |
|
710 | > b'snirequired': True, | |
711 | > }, |
|
711 | > }, | |
712 | > ] |
|
712 | > ] | |
713 | > EOF |
|
713 | > EOF | |
714 |
|
714 | |||
715 | $ sendhttpv2peerhandshake << EOF |
|
715 | $ sendhttpv2peerhandshake << EOF | |
716 | > command capabilities |
|
716 | > command capabilities | |
717 | > EOF |
|
717 | > EOF | |
718 | creating http peer for wire protocol version 2 |
|
718 | creating http peer for wire protocol version 2 | |
719 |
s> setsockopt(6, 1, 1) -> None ( |
|
719 | s> setsockopt(6, 1, 1) -> None (?) | |
720 | s> GET /?cmd=capabilities HTTP/1.1\r\n |
|
720 | s> GET /?cmd=capabilities HTTP/1.1\r\n | |
721 | s> Accept-Encoding: identity\r\n |
|
721 | s> Accept-Encoding: identity\r\n | |
722 | s> vary: X-HgProto-1,X-HgUpgrade-1\r\n |
|
722 | s> vary: X-HgProto-1,X-HgUpgrade-1\r\n | |
723 | s> x-hgproto-1: cbor\r\n |
|
723 | s> x-hgproto-1: cbor\r\n | |
724 | s> x-hgupgrade-1: exp-http-v2-0003\r\n |
|
724 | s> x-hgupgrade-1: exp-http-v2-0003\r\n | |
725 | s> accept: application/mercurial-0.1\r\n |
|
725 | s> accept: application/mercurial-0.1\r\n | |
726 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
726 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
727 | s> user-agent: Mercurial debugwireproto\r\n |
|
727 | s> user-agent: Mercurial debugwireproto\r\n | |
728 | s> \r\n |
|
728 | s> \r\n | |
729 | s> makefile('rb', None) |
|
729 | s> makefile('rb', None) | |
730 | s> HTTP/1.1 200 OK\r\n |
|
730 | s> HTTP/1.1 200 OK\r\n | |
731 | s> Server: testing stub value\r\n |
|
731 | s> Server: testing stub value\r\n | |
732 | s> Date: $HTTP_DATE$\r\n |
|
732 | s> Date: $HTTP_DATE$\r\n | |
733 | s> Content-Type: application/mercurial-cbor\r\n |
|
733 | s> Content-Type: application/mercurial-cbor\r\n | |
734 | s> Content-Length: 2272\r\n |
|
734 | s> Content-Length: 2272\r\n | |
735 | s> \r\n |
|
735 | s> \r\n | |
736 | 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 |
|
736 | 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 | |
737 | (redirect target target-bad-tls requires SNI, which is unsupported) |
|
737 | (redirect target target-bad-tls requires SNI, which is unsupported) | |
738 | sending capabilities command |
|
738 | sending capabilities command | |
739 |
s> setsockopt(6, 1, 1) -> None ( |
|
739 | s> setsockopt(6, 1, 1) -> None (?) | |
740 | s> POST /api/exp-http-v2-0003/ro/capabilities HTTP/1.1\r\n |
|
740 | s> POST /api/exp-http-v2-0003/ro/capabilities HTTP/1.1\r\n | |
741 | s> Accept-Encoding: identity\r\n |
|
741 | s> Accept-Encoding: identity\r\n | |
742 | s> accept: application/mercurial-exp-framing-0006\r\n |
|
742 | s> accept: application/mercurial-exp-framing-0006\r\n | |
743 | s> content-type: 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 |
|
744 | s> content-length: 102\r\n | |
745 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
745 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
746 | s> user-agent: Mercurial debugwireproto\r\n |
|
746 | s> user-agent: Mercurial debugwireproto\r\n | |
747 | s> \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 |
|
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) |
|
749 | s> makefile('rb', None) | |
750 | s> HTTP/1.1 200 OK\r\n |
|
750 | s> HTTP/1.1 200 OK\r\n | |
751 | s> Server: testing stub value\r\n |
|
751 | s> Server: testing stub value\r\n | |
752 | s> Date: $HTTP_DATE$\r\n |
|
752 | s> Date: $HTTP_DATE$\r\n | |
753 | s> Content-Type: application/mercurial-exp-framing-0006\r\n |
|
753 | s> Content-Type: application/mercurial-exp-framing-0006\r\n | |
754 | s> Transfer-Encoding: chunked\r\n |
|
754 | s> Transfer-Encoding: chunked\r\n | |
755 | s> \r\n |
|
755 | s> \r\n | |
756 | s> 11\r\n |
|
756 | s> 11\r\n | |
757 | s> \t\x00\x00\x01\x00\x02\x01\x92 |
|
757 | s> \t\x00\x00\x01\x00\x02\x01\x92 | |
758 | s> Hidentity |
|
758 | s> Hidentity | |
759 | s> \r\n |
|
759 | s> \r\n | |
760 | s> 13\r\n |
|
760 | s> 13\r\n | |
761 | s> \x0b\x00\x00\x01\x00\x02\x041 |
|
761 | s> \x0b\x00\x00\x01\x00\x02\x041 | |
762 | s> \xa1FstatusBok |
|
762 | s> \xa1FstatusBok | |
763 | s> \r\n |
|
763 | s> \r\n | |
764 | s> 6d1\r\n |
|
764 | s> 6d1\r\n | |
765 | s> \xc9\x06\x00\x01\x00\x02\x041 |
|
765 | s> \xc9\x06\x00\x01\x00\x02\x041 | |
766 | 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/ |
|
766 | 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/ | |
767 | s> \r\n |
|
767 | s> \r\n | |
768 | s> 8\r\n |
|
768 | s> 8\r\n | |
769 | s> \x00\x00\x00\x01\x00\x02\x002 |
|
769 | s> \x00\x00\x00\x01\x00\x02\x002 | |
770 | s> \r\n |
|
770 | s> \r\n | |
771 | s> 0\r\n |
|
771 | s> 0\r\n | |
772 | s> \r\n |
|
772 | s> \r\n | |
773 | response: gen[ |
|
773 | response: gen[ | |
774 | { |
|
774 | { | |
775 | b'commands': { |
|
775 | b'commands': { | |
776 | b'branchmap': { |
|
776 | b'branchmap': { | |
777 | b'args': {}, |
|
777 | b'args': {}, | |
778 | b'permissions': [ |
|
778 | b'permissions': [ | |
779 | b'pull' |
|
779 | b'pull' | |
780 | ] |
|
780 | ] | |
781 | }, |
|
781 | }, | |
782 | b'capabilities': { |
|
782 | b'capabilities': { | |
783 | b'args': {}, |
|
783 | b'args': {}, | |
784 | b'permissions': [ |
|
784 | b'permissions': [ | |
785 | b'pull' |
|
785 | b'pull' | |
786 | ] |
|
786 | ] | |
787 | }, |
|
787 | }, | |
788 | b'changesetdata': { |
|
788 | b'changesetdata': { | |
789 | b'args': { |
|
789 | b'args': { | |
790 | b'fields': { |
|
790 | b'fields': { | |
791 | b'default': set([]), |
|
791 | b'default': set([]), | |
792 | b'required': False, |
|
792 | b'required': False, | |
793 | b'type': b'set', |
|
793 | b'type': b'set', | |
794 | b'validvalues': set([ |
|
794 | b'validvalues': set([ | |
795 | b'bookmarks', |
|
795 | b'bookmarks', | |
796 | b'parents', |
|
796 | b'parents', | |
797 | b'phase', |
|
797 | b'phase', | |
798 | b'revision' |
|
798 | b'revision' | |
799 | ]) |
|
799 | ]) | |
800 | }, |
|
800 | }, | |
801 | b'revisions': { |
|
801 | b'revisions': { | |
802 | b'required': True, |
|
802 | b'required': True, | |
803 | b'type': b'list' |
|
803 | b'type': b'list' | |
804 | } |
|
804 | } | |
805 | }, |
|
805 | }, | |
806 | b'permissions': [ |
|
806 | b'permissions': [ | |
807 | b'pull' |
|
807 | b'pull' | |
808 | ] |
|
808 | ] | |
809 | }, |
|
809 | }, | |
810 | b'filedata': { |
|
810 | b'filedata': { | |
811 | b'args': { |
|
811 | b'args': { | |
812 | b'fields': { |
|
812 | b'fields': { | |
813 | b'default': set([]), |
|
813 | b'default': set([]), | |
814 | b'required': False, |
|
814 | b'required': False, | |
815 | b'type': b'set', |
|
815 | b'type': b'set', | |
816 | b'validvalues': set([ |
|
816 | b'validvalues': set([ | |
817 | b'linknode', |
|
817 | b'linknode', | |
818 | b'parents', |
|
818 | b'parents', | |
819 | b'revision' |
|
819 | b'revision' | |
820 | ]) |
|
820 | ]) | |
821 | }, |
|
821 | }, | |
822 | b'haveparents': { |
|
822 | b'haveparents': { | |
823 | b'default': False, |
|
823 | b'default': False, | |
824 | b'required': False, |
|
824 | b'required': False, | |
825 | b'type': b'bool' |
|
825 | b'type': b'bool' | |
826 | }, |
|
826 | }, | |
827 | b'nodes': { |
|
827 | b'nodes': { | |
828 | b'required': True, |
|
828 | b'required': True, | |
829 | b'type': b'list' |
|
829 | b'type': b'list' | |
830 | }, |
|
830 | }, | |
831 | b'path': { |
|
831 | b'path': { | |
832 | b'required': True, |
|
832 | b'required': True, | |
833 | b'type': b'bytes' |
|
833 | b'type': b'bytes' | |
834 | } |
|
834 | } | |
835 | }, |
|
835 | }, | |
836 | b'permissions': [ |
|
836 | b'permissions': [ | |
837 | b'pull' |
|
837 | b'pull' | |
838 | ] |
|
838 | ] | |
839 | }, |
|
839 | }, | |
840 | b'filesdata': { |
|
840 | b'filesdata': { | |
841 | b'args': { |
|
841 | b'args': { | |
842 | b'fields': { |
|
842 | b'fields': { | |
843 | b'default': set([]), |
|
843 | b'default': set([]), | |
844 | b'required': False, |
|
844 | b'required': False, | |
845 | b'type': b'set', |
|
845 | b'type': b'set', | |
846 | b'validvalues': set([ |
|
846 | b'validvalues': set([ | |
847 | b'firstchangeset', |
|
847 | b'firstchangeset', | |
848 | b'linknode', |
|
848 | b'linknode', | |
849 | b'parents', |
|
849 | b'parents', | |
850 | b'revision' |
|
850 | b'revision' | |
851 | ]) |
|
851 | ]) | |
852 | }, |
|
852 | }, | |
853 | b'haveparents': { |
|
853 | b'haveparents': { | |
854 | b'default': False, |
|
854 | b'default': False, | |
855 | b'required': False, |
|
855 | b'required': False, | |
856 | b'type': b'bool' |
|
856 | b'type': b'bool' | |
857 | }, |
|
857 | }, | |
858 | b'pathfilter': { |
|
858 | b'pathfilter': { | |
859 | b'default': None, |
|
859 | b'default': None, | |
860 | b'required': False, |
|
860 | b'required': False, | |
861 | b'type': b'dict' |
|
861 | b'type': b'dict' | |
862 | }, |
|
862 | }, | |
863 | b'revisions': { |
|
863 | b'revisions': { | |
864 | b'required': True, |
|
864 | b'required': True, | |
865 | b'type': b'list' |
|
865 | b'type': b'list' | |
866 | } |
|
866 | } | |
867 | }, |
|
867 | }, | |
868 | b'permissions': [ |
|
868 | b'permissions': [ | |
869 | b'pull' |
|
869 | b'pull' | |
870 | ], |
|
870 | ], | |
871 | b'recommendedbatchsize': 50000 |
|
871 | b'recommendedbatchsize': 50000 | |
872 | }, |
|
872 | }, | |
873 | b'heads': { |
|
873 | b'heads': { | |
874 | b'args': { |
|
874 | b'args': { | |
875 | b'publiconly': { |
|
875 | b'publiconly': { | |
876 | b'default': False, |
|
876 | b'default': False, | |
877 | b'required': False, |
|
877 | b'required': False, | |
878 | b'type': b'bool' |
|
878 | b'type': b'bool' | |
879 | } |
|
879 | } | |
880 | }, |
|
880 | }, | |
881 | b'permissions': [ |
|
881 | b'permissions': [ | |
882 | b'pull' |
|
882 | b'pull' | |
883 | ] |
|
883 | ] | |
884 | }, |
|
884 | }, | |
885 | b'known': { |
|
885 | b'known': { | |
886 | b'args': { |
|
886 | b'args': { | |
887 | b'nodes': { |
|
887 | b'nodes': { | |
888 | b'default': [], |
|
888 | b'default': [], | |
889 | b'required': False, |
|
889 | b'required': False, | |
890 | b'type': b'list' |
|
890 | b'type': b'list' | |
891 | } |
|
891 | } | |
892 | }, |
|
892 | }, | |
893 | b'permissions': [ |
|
893 | b'permissions': [ | |
894 | b'pull' |
|
894 | b'pull' | |
895 | ] |
|
895 | ] | |
896 | }, |
|
896 | }, | |
897 | b'listkeys': { |
|
897 | b'listkeys': { | |
898 | b'args': { |
|
898 | b'args': { | |
899 | b'namespace': { |
|
899 | b'namespace': { | |
900 | b'required': True, |
|
900 | b'required': True, | |
901 | b'type': b'bytes' |
|
901 | b'type': b'bytes' | |
902 | } |
|
902 | } | |
903 | }, |
|
903 | }, | |
904 | b'permissions': [ |
|
904 | b'permissions': [ | |
905 | b'pull' |
|
905 | b'pull' | |
906 | ] |
|
906 | ] | |
907 | }, |
|
907 | }, | |
908 | b'lookup': { |
|
908 | b'lookup': { | |
909 | b'args': { |
|
909 | b'args': { | |
910 | b'key': { |
|
910 | b'key': { | |
911 | b'required': True, |
|
911 | b'required': True, | |
912 | b'type': b'bytes' |
|
912 | b'type': b'bytes' | |
913 | } |
|
913 | } | |
914 | }, |
|
914 | }, | |
915 | b'permissions': [ |
|
915 | b'permissions': [ | |
916 | b'pull' |
|
916 | b'pull' | |
917 | ] |
|
917 | ] | |
918 | }, |
|
918 | }, | |
919 | b'manifestdata': { |
|
919 | b'manifestdata': { | |
920 | b'args': { |
|
920 | b'args': { | |
921 | b'fields': { |
|
921 | b'fields': { | |
922 | b'default': set([]), |
|
922 | b'default': set([]), | |
923 | b'required': False, |
|
923 | b'required': False, | |
924 | b'type': b'set', |
|
924 | b'type': b'set', | |
925 | b'validvalues': set([ |
|
925 | b'validvalues': set([ | |
926 | b'parents', |
|
926 | b'parents', | |
927 | b'revision' |
|
927 | b'revision' | |
928 | ]) |
|
928 | ]) | |
929 | }, |
|
929 | }, | |
930 | b'haveparents': { |
|
930 | b'haveparents': { | |
931 | b'default': False, |
|
931 | b'default': False, | |
932 | b'required': False, |
|
932 | b'required': False, | |
933 | b'type': b'bool' |
|
933 | b'type': b'bool' | |
934 | }, |
|
934 | }, | |
935 | b'nodes': { |
|
935 | b'nodes': { | |
936 | b'required': True, |
|
936 | b'required': True, | |
937 | b'type': b'list' |
|
937 | b'type': b'list' | |
938 | }, |
|
938 | }, | |
939 | b'tree': { |
|
939 | b'tree': { | |
940 | b'required': True, |
|
940 | b'required': True, | |
941 | b'type': b'bytes' |
|
941 | b'type': b'bytes' | |
942 | } |
|
942 | } | |
943 | }, |
|
943 | }, | |
944 | b'permissions': [ |
|
944 | b'permissions': [ | |
945 | b'pull' |
|
945 | b'pull' | |
946 | ], |
|
946 | ], | |
947 | b'recommendedbatchsize': 100000 |
|
947 | b'recommendedbatchsize': 100000 | |
948 | }, |
|
948 | }, | |
949 | b'pushkey': { |
|
949 | b'pushkey': { | |
950 | b'args': { |
|
950 | b'args': { | |
951 | b'key': { |
|
951 | b'key': { | |
952 | b'required': True, |
|
952 | b'required': True, | |
953 | b'type': b'bytes' |
|
953 | b'type': b'bytes' | |
954 | }, |
|
954 | }, | |
955 | b'namespace': { |
|
955 | b'namespace': { | |
956 | b'required': True, |
|
956 | b'required': True, | |
957 | b'type': b'bytes' |
|
957 | b'type': b'bytes' | |
958 | }, |
|
958 | }, | |
959 | b'new': { |
|
959 | b'new': { | |
960 | b'required': True, |
|
960 | b'required': True, | |
961 | b'type': b'bytes' |
|
961 | b'type': b'bytes' | |
962 | }, |
|
962 | }, | |
963 | b'old': { |
|
963 | b'old': { | |
964 | b'required': True, |
|
964 | b'required': True, | |
965 | b'type': b'bytes' |
|
965 | b'type': b'bytes' | |
966 | } |
|
966 | } | |
967 | }, |
|
967 | }, | |
968 | b'permissions': [ |
|
968 | b'permissions': [ | |
969 | b'push' |
|
969 | b'push' | |
970 | ] |
|
970 | ] | |
971 | }, |
|
971 | }, | |
972 | b'rawstorefiledata': { |
|
972 | b'rawstorefiledata': { | |
973 | b'args': { |
|
973 | b'args': { | |
974 | b'files': { |
|
974 | b'files': { | |
975 | b'required': True, |
|
975 | b'required': True, | |
976 | b'type': b'list' |
|
976 | b'type': b'list' | |
977 | }, |
|
977 | }, | |
978 | b'pathfilter': { |
|
978 | b'pathfilter': { | |
979 | b'default': None, |
|
979 | b'default': None, | |
980 | b'required': False, |
|
980 | b'required': False, | |
981 | b'type': b'list' |
|
981 | b'type': b'list' | |
982 | } |
|
982 | } | |
983 | }, |
|
983 | }, | |
984 | b'permissions': [ |
|
984 | b'permissions': [ | |
985 | b'pull' |
|
985 | b'pull' | |
986 | ] |
|
986 | ] | |
987 | } |
|
987 | } | |
988 | }, |
|
988 | }, | |
989 | b'framingmediatypes': [ |
|
989 | b'framingmediatypes': [ | |
990 | b'application/mercurial-exp-framing-0006' |
|
990 | b'application/mercurial-exp-framing-0006' | |
991 | ], |
|
991 | ], | |
992 | b'pathfilterprefixes': set([ |
|
992 | b'pathfilterprefixes': set([ | |
993 | b'path:', |
|
993 | b'path:', | |
994 | b'rootfilesin:' |
|
994 | b'rootfilesin:' | |
995 | ]), |
|
995 | ]), | |
996 | b'rawrepoformats': [ |
|
996 | b'rawrepoformats': [ | |
997 | b'generaldelta', |
|
997 | b'generaldelta', | |
998 | b'revlogv1', |
|
998 | b'revlogv1', | |
999 | b'sparserevlog' |
|
999 | b'sparserevlog' | |
1000 | ], |
|
1000 | ], | |
1001 | b'redirect': { |
|
1001 | b'redirect': { | |
1002 | b'hashes': [ |
|
1002 | b'hashes': [ | |
1003 | b'sha256', |
|
1003 | b'sha256', | |
1004 | b'sha1' |
|
1004 | b'sha1' | |
1005 | ], |
|
1005 | ], | |
1006 | b'targets': [ |
|
1006 | b'targets': [ | |
1007 | { |
|
1007 | { | |
1008 | b'name': b'target-bad-tls', |
|
1008 | b'name': b'target-bad-tls', | |
1009 | b'protocol': b'https', |
|
1009 | b'protocol': b'https', | |
1010 | b'snirequired': True, |
|
1010 | b'snirequired': True, | |
1011 | b'uris': [ |
|
1011 | b'uris': [ | |
1012 | b'https://example.com/' |
|
1012 | b'https://example.com/' | |
1013 | ] |
|
1013 | ] | |
1014 | } |
|
1014 | } | |
1015 | ] |
|
1015 | ] | |
1016 | } |
|
1016 | } | |
1017 | } |
|
1017 | } | |
1018 | ] |
|
1018 | ] | |
1019 | (sent 2 HTTP requests and * bytes; received * bytes in responses) (glob) |
|
1019 | (sent 2 HTTP requests and * bytes; received * bytes in responses) (glob) | |
1020 |
|
1020 | |||
1021 | $ cat >> $HGRCPATH << EOF |
|
1021 | $ cat >> $HGRCPATH << EOF | |
1022 | > [extensions] |
|
1022 | > [extensions] | |
1023 | > nosni=! |
|
1023 | > nosni=! | |
1024 | > EOF |
|
1024 | > EOF | |
1025 |
|
1025 | |||
1026 | Unknown tls value is filtered from compatible targets |
|
1026 | Unknown tls value is filtered from compatible targets | |
1027 |
|
1027 | |||
1028 | $ cat > redirects.py << EOF |
|
1028 | $ cat > redirects.py << EOF | |
1029 | > [ |
|
1029 | > [ | |
1030 | > { |
|
1030 | > { | |
1031 | > b'name': b'target-bad-tls', |
|
1031 | > b'name': b'target-bad-tls', | |
1032 | > b'protocol': b'https', |
|
1032 | > b'protocol': b'https', | |
1033 | > b'uris': [b'https://example.com/'], |
|
1033 | > b'uris': [b'https://example.com/'], | |
1034 | > b'tlsversions': [b'42', b'39'], |
|
1034 | > b'tlsversions': [b'42', b'39'], | |
1035 | > }, |
|
1035 | > }, | |
1036 | > ] |
|
1036 | > ] | |
1037 | > EOF |
|
1037 | > EOF | |
1038 |
|
1038 | |||
1039 | $ sendhttpv2peerhandshake << EOF |
|
1039 | $ sendhttpv2peerhandshake << EOF | |
1040 | > command capabilities |
|
1040 | > command capabilities | |
1041 | > EOF |
|
1041 | > EOF | |
1042 | creating http peer for wire protocol version 2 |
|
1042 | creating http peer for wire protocol version 2 | |
1043 |
s> setsockopt(6, 1, 1) -> None ( |
|
1043 | s> setsockopt(6, 1, 1) -> None (?) | |
1044 | s> GET /?cmd=capabilities HTTP/1.1\r\n |
|
1044 | s> GET /?cmd=capabilities HTTP/1.1\r\n | |
1045 | s> Accept-Encoding: identity\r\n |
|
1045 | s> Accept-Encoding: identity\r\n | |
1046 | s> vary: X-HgProto-1,X-HgUpgrade-1\r\n |
|
1046 | s> vary: X-HgProto-1,X-HgUpgrade-1\r\n | |
1047 | s> x-hgproto-1: cbor\r\n |
|
1047 | s> x-hgproto-1: cbor\r\n | |
1048 | s> x-hgupgrade-1: exp-http-v2-0003\r\n |
|
1048 | s> x-hgupgrade-1: exp-http-v2-0003\r\n | |
1049 | s> accept: application/mercurial-0.1\r\n |
|
1049 | s> accept: application/mercurial-0.1\r\n | |
1050 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
1050 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
1051 | s> user-agent: Mercurial debugwireproto\r\n |
|
1051 | s> user-agent: Mercurial debugwireproto\r\n | |
1052 | s> \r\n |
|
1052 | s> \r\n | |
1053 | s> makefile('rb', None) |
|
1053 | s> makefile('rb', None) | |
1054 | s> HTTP/1.1 200 OK\r\n |
|
1054 | s> HTTP/1.1 200 OK\r\n | |
1055 | s> Server: testing stub value\r\n |
|
1055 | s> Server: testing stub value\r\n | |
1056 | s> Date: $HTTP_DATE$\r\n |
|
1056 | s> Date: $HTTP_DATE$\r\n | |
1057 | s> Content-Type: application/mercurial-cbor\r\n |
|
1057 | s> Content-Type: application/mercurial-cbor\r\n | |
1058 | s> Content-Length: 2278\r\n |
|
1058 | s> Content-Length: 2278\r\n | |
1059 | s> \r\n |
|
1059 | s> \r\n | |
1060 | 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 |
|
1060 | 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 | |
1061 | (remote redirect target target-bad-tls requires unsupported TLS versions: 39, 42) |
|
1061 | (remote redirect target target-bad-tls requires unsupported TLS versions: 39, 42) | |
1062 | sending capabilities command |
|
1062 | sending capabilities command | |
1063 |
s> setsockopt(6, 1, 1) -> None ( |
|
1063 | s> setsockopt(6, 1, 1) -> None (?) | |
1064 | s> POST /api/exp-http-v2-0003/ro/capabilities HTTP/1.1\r\n |
|
1064 | s> POST /api/exp-http-v2-0003/ro/capabilities HTTP/1.1\r\n | |
1065 | s> Accept-Encoding: identity\r\n |
|
1065 | s> Accept-Encoding: identity\r\n | |
1066 | s> accept: application/mercurial-exp-framing-0006\r\n |
|
1066 | s> accept: application/mercurial-exp-framing-0006\r\n | |
1067 | s> content-type: application/mercurial-exp-framing-0006\r\n |
|
1067 | s> content-type: application/mercurial-exp-framing-0006\r\n | |
1068 | s> content-length: 102\r\n |
|
1068 | s> content-length: 102\r\n | |
1069 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
1069 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
1070 | s> user-agent: Mercurial debugwireproto\r\n |
|
1070 | s> user-agent: Mercurial debugwireproto\r\n | |
1071 | s> \r\n |
|
1071 | s> \r\n | |
1072 | s> \x1c\x00\x00\x01\x00\x01\x01\x82\xa1Pcontentencodings\x81Hidentity:\x00\x00\x01\x00\x01\x00\x11\xa2DnameLcapabilitiesHredirect\xa2Fhashes\x82Fsha256Dsha1Gtargets\x80 |
|
1072 | s> \x1c\x00\x00\x01\x00\x01\x01\x82\xa1Pcontentencodings\x81Hidentity:\x00\x00\x01\x00\x01\x00\x11\xa2DnameLcapabilitiesHredirect\xa2Fhashes\x82Fsha256Dsha1Gtargets\x80 | |
1073 | s> makefile('rb', None) |
|
1073 | s> makefile('rb', None) | |
1074 | s> HTTP/1.1 200 OK\r\n |
|
1074 | s> HTTP/1.1 200 OK\r\n | |
1075 | s> Server: testing stub value\r\n |
|
1075 | s> Server: testing stub value\r\n | |
1076 | s> Date: $HTTP_DATE$\r\n |
|
1076 | s> Date: $HTTP_DATE$\r\n | |
1077 | s> Content-Type: application/mercurial-exp-framing-0006\r\n |
|
1077 | s> Content-Type: application/mercurial-exp-framing-0006\r\n | |
1078 | s> Transfer-Encoding: chunked\r\n |
|
1078 | s> Transfer-Encoding: chunked\r\n | |
1079 | s> \r\n |
|
1079 | s> \r\n | |
1080 | s> 11\r\n |
|
1080 | s> 11\r\n | |
1081 | s> \t\x00\x00\x01\x00\x02\x01\x92 |
|
1081 | s> \t\x00\x00\x01\x00\x02\x01\x92 | |
1082 | s> Hidentity |
|
1082 | s> Hidentity | |
1083 | s> \r\n |
|
1083 | s> \r\n | |
1084 | s> 13\r\n |
|
1084 | s> 13\r\n | |
1085 | s> \x0b\x00\x00\x01\x00\x02\x041 |
|
1085 | s> \x0b\x00\x00\x01\x00\x02\x041 | |
1086 | s> \xa1FstatusBok |
|
1086 | s> \xa1FstatusBok | |
1087 | s> \r\n |
|
1087 | s> \r\n | |
1088 | s> 6d7\r\n |
|
1088 | s> 6d7\r\n | |
1089 | s> \xcf\x06\x00\x01\x00\x02\x041 |
|
1089 | s> \xcf\x06\x00\x01\x00\x02\x041 | |
1090 | 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/ |
|
1090 | 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/ | |
1091 | s> \r\n |
|
1091 | s> \r\n | |
1092 | s> 8\r\n |
|
1092 | s> 8\r\n | |
1093 | s> \x00\x00\x00\x01\x00\x02\x002 |
|
1093 | s> \x00\x00\x00\x01\x00\x02\x002 | |
1094 | s> \r\n |
|
1094 | s> \r\n | |
1095 | s> 0\r\n |
|
1095 | s> 0\r\n | |
1096 | s> \r\n |
|
1096 | s> \r\n | |
1097 | response: gen[ |
|
1097 | response: gen[ | |
1098 | { |
|
1098 | { | |
1099 | b'commands': { |
|
1099 | b'commands': { | |
1100 | b'branchmap': { |
|
1100 | b'branchmap': { | |
1101 | b'args': {}, |
|
1101 | b'args': {}, | |
1102 | b'permissions': [ |
|
1102 | b'permissions': [ | |
1103 | b'pull' |
|
1103 | b'pull' | |
1104 | ] |
|
1104 | ] | |
1105 | }, |
|
1105 | }, | |
1106 | b'capabilities': { |
|
1106 | b'capabilities': { | |
1107 | b'args': {}, |
|
1107 | b'args': {}, | |
1108 | b'permissions': [ |
|
1108 | b'permissions': [ | |
1109 | b'pull' |
|
1109 | b'pull' | |
1110 | ] |
|
1110 | ] | |
1111 | }, |
|
1111 | }, | |
1112 | b'changesetdata': { |
|
1112 | b'changesetdata': { | |
1113 | b'args': { |
|
1113 | b'args': { | |
1114 | b'fields': { |
|
1114 | b'fields': { | |
1115 | b'default': set([]), |
|
1115 | b'default': set([]), | |
1116 | b'required': False, |
|
1116 | b'required': False, | |
1117 | b'type': b'set', |
|
1117 | b'type': b'set', | |
1118 | b'validvalues': set([ |
|
1118 | b'validvalues': set([ | |
1119 | b'bookmarks', |
|
1119 | b'bookmarks', | |
1120 | b'parents', |
|
1120 | b'parents', | |
1121 | b'phase', |
|
1121 | b'phase', | |
1122 | b'revision' |
|
1122 | b'revision' | |
1123 | ]) |
|
1123 | ]) | |
1124 | }, |
|
1124 | }, | |
1125 | b'revisions': { |
|
1125 | b'revisions': { | |
1126 | b'required': True, |
|
1126 | b'required': True, | |
1127 | b'type': b'list' |
|
1127 | b'type': b'list' | |
1128 | } |
|
1128 | } | |
1129 | }, |
|
1129 | }, | |
1130 | b'permissions': [ |
|
1130 | b'permissions': [ | |
1131 | b'pull' |
|
1131 | b'pull' | |
1132 | ] |
|
1132 | ] | |
1133 | }, |
|
1133 | }, | |
1134 | b'filedata': { |
|
1134 | b'filedata': { | |
1135 | b'args': { |
|
1135 | b'args': { | |
1136 | b'fields': { |
|
1136 | b'fields': { | |
1137 | b'default': set([]), |
|
1137 | b'default': set([]), | |
1138 | b'required': False, |
|
1138 | b'required': False, | |
1139 | b'type': b'set', |
|
1139 | b'type': b'set', | |
1140 | b'validvalues': set([ |
|
1140 | b'validvalues': set([ | |
1141 | b'linknode', |
|
1141 | b'linknode', | |
1142 | b'parents', |
|
1142 | b'parents', | |
1143 | b'revision' |
|
1143 | b'revision' | |
1144 | ]) |
|
1144 | ]) | |
1145 | }, |
|
1145 | }, | |
1146 | b'haveparents': { |
|
1146 | b'haveparents': { | |
1147 | b'default': False, |
|
1147 | b'default': False, | |
1148 | b'required': False, |
|
1148 | b'required': False, | |
1149 | b'type': b'bool' |
|
1149 | b'type': b'bool' | |
1150 | }, |
|
1150 | }, | |
1151 | b'nodes': { |
|
1151 | b'nodes': { | |
1152 | b'required': True, |
|
1152 | b'required': True, | |
1153 | b'type': b'list' |
|
1153 | b'type': b'list' | |
1154 | }, |
|
1154 | }, | |
1155 | b'path': { |
|
1155 | b'path': { | |
1156 | b'required': True, |
|
1156 | b'required': True, | |
1157 | b'type': b'bytes' |
|
1157 | b'type': b'bytes' | |
1158 | } |
|
1158 | } | |
1159 | }, |
|
1159 | }, | |
1160 | b'permissions': [ |
|
1160 | b'permissions': [ | |
1161 | b'pull' |
|
1161 | b'pull' | |
1162 | ] |
|
1162 | ] | |
1163 | }, |
|
1163 | }, | |
1164 | b'filesdata': { |
|
1164 | b'filesdata': { | |
1165 | b'args': { |
|
1165 | b'args': { | |
1166 | b'fields': { |
|
1166 | b'fields': { | |
1167 | b'default': set([]), |
|
1167 | b'default': set([]), | |
1168 | b'required': False, |
|
1168 | b'required': False, | |
1169 | b'type': b'set', |
|
1169 | b'type': b'set', | |
1170 | b'validvalues': set([ |
|
1170 | b'validvalues': set([ | |
1171 | b'firstchangeset', |
|
1171 | b'firstchangeset', | |
1172 | b'linknode', |
|
1172 | b'linknode', | |
1173 | b'parents', |
|
1173 | b'parents', | |
1174 | b'revision' |
|
1174 | b'revision' | |
1175 | ]) |
|
1175 | ]) | |
1176 | }, |
|
1176 | }, | |
1177 | b'haveparents': { |
|
1177 | b'haveparents': { | |
1178 | b'default': False, |
|
1178 | b'default': False, | |
1179 | b'required': False, |
|
1179 | b'required': False, | |
1180 | b'type': b'bool' |
|
1180 | b'type': b'bool' | |
1181 | }, |
|
1181 | }, | |
1182 | b'pathfilter': { |
|
1182 | b'pathfilter': { | |
1183 | b'default': None, |
|
1183 | b'default': None, | |
1184 | b'required': False, |
|
1184 | b'required': False, | |
1185 | b'type': b'dict' |
|
1185 | b'type': b'dict' | |
1186 | }, |
|
1186 | }, | |
1187 | b'revisions': { |
|
1187 | b'revisions': { | |
1188 | b'required': True, |
|
1188 | b'required': True, | |
1189 | b'type': b'list' |
|
1189 | b'type': b'list' | |
1190 | } |
|
1190 | } | |
1191 | }, |
|
1191 | }, | |
1192 | b'permissions': [ |
|
1192 | b'permissions': [ | |
1193 | b'pull' |
|
1193 | b'pull' | |
1194 | ], |
|
1194 | ], | |
1195 | b'recommendedbatchsize': 50000 |
|
1195 | b'recommendedbatchsize': 50000 | |
1196 | }, |
|
1196 | }, | |
1197 | b'heads': { |
|
1197 | b'heads': { | |
1198 | b'args': { |
|
1198 | b'args': { | |
1199 | b'publiconly': { |
|
1199 | b'publiconly': { | |
1200 | b'default': False, |
|
1200 | b'default': False, | |
1201 | b'required': False, |
|
1201 | b'required': False, | |
1202 | b'type': b'bool' |
|
1202 | b'type': b'bool' | |
1203 | } |
|
1203 | } | |
1204 | }, |
|
1204 | }, | |
1205 | b'permissions': [ |
|
1205 | b'permissions': [ | |
1206 | b'pull' |
|
1206 | b'pull' | |
1207 | ] |
|
1207 | ] | |
1208 | }, |
|
1208 | }, | |
1209 | b'known': { |
|
1209 | b'known': { | |
1210 | b'args': { |
|
1210 | b'args': { | |
1211 | b'nodes': { |
|
1211 | b'nodes': { | |
1212 | b'default': [], |
|
1212 | b'default': [], | |
1213 | b'required': False, |
|
1213 | b'required': False, | |
1214 | b'type': b'list' |
|
1214 | b'type': b'list' | |
1215 | } |
|
1215 | } | |
1216 | }, |
|
1216 | }, | |
1217 | b'permissions': [ |
|
1217 | b'permissions': [ | |
1218 | b'pull' |
|
1218 | b'pull' | |
1219 | ] |
|
1219 | ] | |
1220 | }, |
|
1220 | }, | |
1221 | b'listkeys': { |
|
1221 | b'listkeys': { | |
1222 | b'args': { |
|
1222 | b'args': { | |
1223 | b'namespace': { |
|
1223 | b'namespace': { | |
1224 | b'required': True, |
|
1224 | b'required': True, | |
1225 | b'type': b'bytes' |
|
1225 | b'type': b'bytes' | |
1226 | } |
|
1226 | } | |
1227 | }, |
|
1227 | }, | |
1228 | b'permissions': [ |
|
1228 | b'permissions': [ | |
1229 | b'pull' |
|
1229 | b'pull' | |
1230 | ] |
|
1230 | ] | |
1231 | }, |
|
1231 | }, | |
1232 | b'lookup': { |
|
1232 | b'lookup': { | |
1233 | b'args': { |
|
1233 | b'args': { | |
1234 | b'key': { |
|
1234 | b'key': { | |
1235 | b'required': True, |
|
1235 | b'required': True, | |
1236 | b'type': b'bytes' |
|
1236 | b'type': b'bytes' | |
1237 | } |
|
1237 | } | |
1238 | }, |
|
1238 | }, | |
1239 | b'permissions': [ |
|
1239 | b'permissions': [ | |
1240 | b'pull' |
|
1240 | b'pull' | |
1241 | ] |
|
1241 | ] | |
1242 | }, |
|
1242 | }, | |
1243 | b'manifestdata': { |
|
1243 | b'manifestdata': { | |
1244 | b'args': { |
|
1244 | b'args': { | |
1245 | b'fields': { |
|
1245 | b'fields': { | |
1246 | b'default': set([]), |
|
1246 | b'default': set([]), | |
1247 | b'required': False, |
|
1247 | b'required': False, | |
1248 | b'type': b'set', |
|
1248 | b'type': b'set', | |
1249 | b'validvalues': set([ |
|
1249 | b'validvalues': set([ | |
1250 | b'parents', |
|
1250 | b'parents', | |
1251 | b'revision' |
|
1251 | b'revision' | |
1252 | ]) |
|
1252 | ]) | |
1253 | }, |
|
1253 | }, | |
1254 | b'haveparents': { |
|
1254 | b'haveparents': { | |
1255 | b'default': False, |
|
1255 | b'default': False, | |
1256 | b'required': False, |
|
1256 | b'required': False, | |
1257 | b'type': b'bool' |
|
1257 | b'type': b'bool' | |
1258 | }, |
|
1258 | }, | |
1259 | b'nodes': { |
|
1259 | b'nodes': { | |
1260 | b'required': True, |
|
1260 | b'required': True, | |
1261 | b'type': b'list' |
|
1261 | b'type': b'list' | |
1262 | }, |
|
1262 | }, | |
1263 | b'tree': { |
|
1263 | b'tree': { | |
1264 | b'required': True, |
|
1264 | b'required': True, | |
1265 | b'type': b'bytes' |
|
1265 | b'type': b'bytes' | |
1266 | } |
|
1266 | } | |
1267 | }, |
|
1267 | }, | |
1268 | b'permissions': [ |
|
1268 | b'permissions': [ | |
1269 | b'pull' |
|
1269 | b'pull' | |
1270 | ], |
|
1270 | ], | |
1271 | b'recommendedbatchsize': 100000 |
|
1271 | b'recommendedbatchsize': 100000 | |
1272 | }, |
|
1272 | }, | |
1273 | b'pushkey': { |
|
1273 | b'pushkey': { | |
1274 | b'args': { |
|
1274 | b'args': { | |
1275 | b'key': { |
|
1275 | b'key': { | |
1276 | b'required': True, |
|
1276 | b'required': True, | |
1277 | b'type': b'bytes' |
|
1277 | b'type': b'bytes' | |
1278 | }, |
|
1278 | }, | |
1279 | b'namespace': { |
|
1279 | b'namespace': { | |
1280 | b'required': True, |
|
1280 | b'required': True, | |
1281 | b'type': b'bytes' |
|
1281 | b'type': b'bytes' | |
1282 | }, |
|
1282 | }, | |
1283 | b'new': { |
|
1283 | b'new': { | |
1284 | b'required': True, |
|
1284 | b'required': True, | |
1285 | b'type': b'bytes' |
|
1285 | b'type': b'bytes' | |
1286 | }, |
|
1286 | }, | |
1287 | b'old': { |
|
1287 | b'old': { | |
1288 | b'required': True, |
|
1288 | b'required': True, | |
1289 | b'type': b'bytes' |
|
1289 | b'type': b'bytes' | |
1290 | } |
|
1290 | } | |
1291 | }, |
|
1291 | }, | |
1292 | b'permissions': [ |
|
1292 | b'permissions': [ | |
1293 | b'push' |
|
1293 | b'push' | |
1294 | ] |
|
1294 | ] | |
1295 | }, |
|
1295 | }, | |
1296 | b'rawstorefiledata': { |
|
1296 | b'rawstorefiledata': { | |
1297 | b'args': { |
|
1297 | b'args': { | |
1298 | b'files': { |
|
1298 | b'files': { | |
1299 | b'required': True, |
|
1299 | b'required': True, | |
1300 | b'type': b'list' |
|
1300 | b'type': b'list' | |
1301 | }, |
|
1301 | }, | |
1302 | b'pathfilter': { |
|
1302 | b'pathfilter': { | |
1303 | b'default': None, |
|
1303 | b'default': None, | |
1304 | b'required': False, |
|
1304 | b'required': False, | |
1305 | b'type': b'list' |
|
1305 | b'type': b'list' | |
1306 | } |
|
1306 | } | |
1307 | }, |
|
1307 | }, | |
1308 | b'permissions': [ |
|
1308 | b'permissions': [ | |
1309 | b'pull' |
|
1309 | b'pull' | |
1310 | ] |
|
1310 | ] | |
1311 | } |
|
1311 | } | |
1312 | }, |
|
1312 | }, | |
1313 | b'framingmediatypes': [ |
|
1313 | b'framingmediatypes': [ | |
1314 | b'application/mercurial-exp-framing-0006' |
|
1314 | b'application/mercurial-exp-framing-0006' | |
1315 | ], |
|
1315 | ], | |
1316 | b'pathfilterprefixes': set([ |
|
1316 | b'pathfilterprefixes': set([ | |
1317 | b'path:', |
|
1317 | b'path:', | |
1318 | b'rootfilesin:' |
|
1318 | b'rootfilesin:' | |
1319 | ]), |
|
1319 | ]), | |
1320 | b'rawrepoformats': [ |
|
1320 | b'rawrepoformats': [ | |
1321 | b'generaldelta', |
|
1321 | b'generaldelta', | |
1322 | b'revlogv1', |
|
1322 | b'revlogv1', | |
1323 | b'sparserevlog' |
|
1323 | b'sparserevlog' | |
1324 | ], |
|
1324 | ], | |
1325 | b'redirect': { |
|
1325 | b'redirect': { | |
1326 | b'hashes': [ |
|
1326 | b'hashes': [ | |
1327 | b'sha256', |
|
1327 | b'sha256', | |
1328 | b'sha1' |
|
1328 | b'sha1' | |
1329 | ], |
|
1329 | ], | |
1330 | b'targets': [ |
|
1330 | b'targets': [ | |
1331 | { |
|
1331 | { | |
1332 | b'name': b'target-bad-tls', |
|
1332 | b'name': b'target-bad-tls', | |
1333 | b'protocol': b'https', |
|
1333 | b'protocol': b'https', | |
1334 | b'tlsversions': [ |
|
1334 | b'tlsversions': [ | |
1335 | b'42', |
|
1335 | b'42', | |
1336 | b'39' |
|
1336 | b'39' | |
1337 | ], |
|
1337 | ], | |
1338 | b'uris': [ |
|
1338 | b'uris': [ | |
1339 | b'https://example.com/' |
|
1339 | b'https://example.com/' | |
1340 | ] |
|
1340 | ] | |
1341 | } |
|
1341 | } | |
1342 | ] |
|
1342 | ] | |
1343 | } |
|
1343 | } | |
1344 | } |
|
1344 | } | |
1345 | ] |
|
1345 | ] | |
1346 | (sent 2 HTTP requests and * bytes; received * bytes in responses) (glob) |
|
1346 | (sent 2 HTTP requests and * bytes; received * bytes in responses) (glob) | |
1347 |
|
1347 | |||
1348 | Set up the server to issue content redirects to its built-in API server. |
|
1348 | Set up the server to issue content redirects to its built-in API server. | |
1349 |
|
1349 | |||
1350 | $ cat > redirects.py << EOF |
|
1350 | $ cat > redirects.py << EOF | |
1351 | > [ |
|
1351 | > [ | |
1352 | > { |
|
1352 | > { | |
1353 | > b'name': b'local', |
|
1353 | > b'name': b'local', | |
1354 | > b'protocol': b'http', |
|
1354 | > b'protocol': b'http', | |
1355 | > b'uris': [b'http://example.com/'], |
|
1355 | > b'uris': [b'http://example.com/'], | |
1356 | > }, |
|
1356 | > }, | |
1357 | > ] |
|
1357 | > ] | |
1358 | > EOF |
|
1358 | > EOF | |
1359 |
|
1359 | |||
1360 | Request to eventual cache URL should return 404 (validating the cache server works) |
|
1360 | Request to eventual cache URL should return 404 (validating the cache server works) | |
1361 |
|
1361 | |||
1362 | $ sendhttpraw << EOF |
|
1362 | $ sendhttpraw << EOF | |
1363 | > httprequest GET api/simplecache/missingkey |
|
1363 | > httprequest GET api/simplecache/missingkey | |
1364 | > user-agent: test |
|
1364 | > user-agent: test | |
1365 | > EOF |
|
1365 | > EOF | |
1366 | using raw connection to peer |
|
1366 | using raw connection to peer | |
1367 |
s> setsockopt(6, 1, 1) -> None ( |
|
1367 | s> setsockopt(6, 1, 1) -> None (?) | |
1368 | s> GET /api/simplecache/missingkey HTTP/1.1\r\n |
|
1368 | s> GET /api/simplecache/missingkey HTTP/1.1\r\n | |
1369 | s> Accept-Encoding: identity\r\n |
|
1369 | s> Accept-Encoding: identity\r\n | |
1370 | s> user-agent: test\r\n |
|
1370 | s> user-agent: test\r\n | |
1371 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
1371 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
1372 | s> \r\n |
|
1372 | s> \r\n | |
1373 | s> makefile('rb', None) |
|
1373 | s> makefile('rb', None) | |
1374 | s> HTTP/1.1 404 Not Found\r\n |
|
1374 | s> HTTP/1.1 404 Not Found\r\n | |
1375 | s> Server: testing stub value\r\n |
|
1375 | s> Server: testing stub value\r\n | |
1376 | s> Date: $HTTP_DATE$\r\n |
|
1376 | s> Date: $HTTP_DATE$\r\n | |
1377 | s> Content-Type: text/plain\r\n |
|
1377 | s> Content-Type: text/plain\r\n | |
1378 | s> Content-Length: 22\r\n |
|
1378 | s> Content-Length: 22\r\n | |
1379 | s> \r\n |
|
1379 | s> \r\n | |
1380 | s> key not found in cache |
|
1380 | s> key not found in cache | |
1381 |
|
1381 | |||
1382 | Send a cacheable request |
|
1382 | Send a cacheable request | |
1383 |
|
1383 | |||
1384 | $ sendhttpv2peer << EOF |
|
1384 | $ sendhttpv2peer << EOF | |
1385 | > command manifestdata |
|
1385 | > command manifestdata | |
1386 | > nodes eval:[b'\x99\x2f\x47\x79\x02\x9a\x3d\xf8\xd0\x66\x6d\x00\xbb\x92\x4f\x69\x63\x4e\x26\x41'] |
|
1386 | > nodes eval:[b'\x99\x2f\x47\x79\x02\x9a\x3d\xf8\xd0\x66\x6d\x00\xbb\x92\x4f\x69\x63\x4e\x26\x41'] | |
1387 | > tree eval:b'' |
|
1387 | > tree eval:b'' | |
1388 | > fields eval:[b'parents'] |
|
1388 | > fields eval:[b'parents'] | |
1389 | > EOF |
|
1389 | > EOF | |
1390 | creating http peer for wire protocol version 2 |
|
1390 | creating http peer for wire protocol version 2 | |
1391 | sending manifestdata command |
|
1391 | sending manifestdata command | |
1392 | response: gen[ |
|
1392 | response: gen[ | |
1393 | { |
|
1393 | { | |
1394 | b'totalitems': 1 |
|
1394 | b'totalitems': 1 | |
1395 | }, |
|
1395 | }, | |
1396 | { |
|
1396 | { | |
1397 | b'node': b'\x99/Gy\x02\x9a=\xf8\xd0fm\x00\xbb\x92OicN&A', |
|
1397 | b'node': b'\x99/Gy\x02\x9a=\xf8\xd0fm\x00\xbb\x92OicN&A', | |
1398 | b'parents': [ |
|
1398 | b'parents': [ | |
1399 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00', |
|
1399 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00', | |
1400 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' |
|
1400 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' | |
1401 | ] |
|
1401 | ] | |
1402 | } |
|
1402 | } | |
1403 | ] |
|
1403 | ] | |
1404 |
|
1404 | |||
1405 | Cached entry should be available on server |
|
1405 | Cached entry should be available on server | |
1406 |
|
1406 | |||
1407 | $ sendhttpraw << EOF |
|
1407 | $ sendhttpraw << EOF | |
1408 | > httprequest GET api/simplecache/47abb8efa5f01b8964d74917793ad2464db0fa2c |
|
1408 | > httprequest GET api/simplecache/47abb8efa5f01b8964d74917793ad2464db0fa2c | |
1409 | > user-agent: test |
|
1409 | > user-agent: test | |
1410 | > EOF |
|
1410 | > EOF | |
1411 | using raw connection to peer |
|
1411 | using raw connection to peer | |
1412 |
s> setsockopt(6, 1, 1) -> None ( |
|
1412 | s> setsockopt(6, 1, 1) -> None (?) | |
1413 | s> GET /api/simplecache/47abb8efa5f01b8964d74917793ad2464db0fa2c HTTP/1.1\r\n |
|
1413 | s> GET /api/simplecache/47abb8efa5f01b8964d74917793ad2464db0fa2c HTTP/1.1\r\n | |
1414 | s> Accept-Encoding: identity\r\n |
|
1414 | s> Accept-Encoding: identity\r\n | |
1415 | s> user-agent: test\r\n |
|
1415 | s> user-agent: test\r\n | |
1416 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
1416 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
1417 | s> \r\n |
|
1417 | s> \r\n | |
1418 | s> makefile('rb', None) |
|
1418 | s> makefile('rb', None) | |
1419 | s> HTTP/1.1 200 OK\r\n |
|
1419 | s> HTTP/1.1 200 OK\r\n | |
1420 | s> Server: testing stub value\r\n |
|
1420 | s> Server: testing stub value\r\n | |
1421 | s> Date: $HTTP_DATE$\r\n |
|
1421 | s> Date: $HTTP_DATE$\r\n | |
1422 | s> Content-Type: application/mercurial-cbor\r\n |
|
1422 | s> Content-Type: application/mercurial-cbor\r\n | |
1423 | s> Content-Length: 91\r\n |
|
1423 | s> Content-Length: 91\r\n | |
1424 | s> \r\n |
|
1424 | s> \r\n | |
1425 | 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 |
|
1425 | 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 | |
1426 | cbor> [ |
|
1426 | cbor> [ | |
1427 | { |
|
1427 | { | |
1428 | b'totalitems': 1 |
|
1428 | b'totalitems': 1 | |
1429 | }, |
|
1429 | }, | |
1430 | { |
|
1430 | { | |
1431 | b'node': b'\x99/Gy\x02\x9a=\xf8\xd0fm\x00\xbb\x92OicN&A', |
|
1431 | b'node': b'\x99/Gy\x02\x9a=\xf8\xd0fm\x00\xbb\x92OicN&A', | |
1432 | b'parents': [ |
|
1432 | b'parents': [ | |
1433 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00', |
|
1433 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00', | |
1434 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' |
|
1434 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' | |
1435 | ] |
|
1435 | ] | |
1436 | } |
|
1436 | } | |
1437 | ] |
|
1437 | ] | |
1438 |
|
1438 | |||
1439 | 2nd request should result in content redirect response |
|
1439 | 2nd request should result in content redirect response | |
1440 |
|
1440 | |||
1441 | $ sendhttpv2peer << EOF |
|
1441 | $ sendhttpv2peer << EOF | |
1442 | > command manifestdata |
|
1442 | > command manifestdata | |
1443 | > nodes eval:[b'\x99\x2f\x47\x79\x02\x9a\x3d\xf8\xd0\x66\x6d\x00\xbb\x92\x4f\x69\x63\x4e\x26\x41'] |
|
1443 | > nodes eval:[b'\x99\x2f\x47\x79\x02\x9a\x3d\xf8\xd0\x66\x6d\x00\xbb\x92\x4f\x69\x63\x4e\x26\x41'] | |
1444 | > tree eval:b'' |
|
1444 | > tree eval:b'' | |
1445 | > fields eval:[b'parents'] |
|
1445 | > fields eval:[b'parents'] | |
1446 | > EOF |
|
1446 | > EOF | |
1447 | creating http peer for wire protocol version 2 |
|
1447 | creating http peer for wire protocol version 2 | |
1448 | sending manifestdata command |
|
1448 | sending manifestdata command | |
1449 | response: gen[ |
|
1449 | response: gen[ | |
1450 | { |
|
1450 | { | |
1451 | b'totalitems': 1 |
|
1451 | b'totalitems': 1 | |
1452 | }, |
|
1452 | }, | |
1453 | { |
|
1453 | { | |
1454 | b'node': b'\x99/Gy\x02\x9a=\xf8\xd0fm\x00\xbb\x92OicN&A', |
|
1454 | b'node': b'\x99/Gy\x02\x9a=\xf8\xd0fm\x00\xbb\x92OicN&A', | |
1455 | b'parents': [ |
|
1455 | b'parents': [ | |
1456 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00', |
|
1456 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00', | |
1457 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' |
|
1457 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' | |
1458 | ] |
|
1458 | ] | |
1459 | } |
|
1459 | } | |
1460 | ] |
|
1460 | ] | |
1461 |
|
1461 | |||
1462 | $ cat error.log |
|
1462 | $ cat error.log | |
1463 | $ killdaemons.py |
|
1463 | $ killdaemons.py | |
1464 |
|
1464 | |||
1465 | $ cat .hg/blackbox.log |
|
1465 | $ cat .hg/blackbox.log | |
1466 | *> cacher constructed for manifestdata (glob) |
|
1466 | *> cacher constructed for manifestdata (glob) | |
1467 | *> cache miss for 47abb8efa5f01b8964d74917793ad2464db0fa2c (glob) |
|
1467 | *> cache miss for 47abb8efa5f01b8964d74917793ad2464db0fa2c (glob) | |
1468 | *> storing cache entry for 47abb8efa5f01b8964d74917793ad2464db0fa2c (glob) |
|
1468 | *> storing cache entry for 47abb8efa5f01b8964d74917793ad2464db0fa2c (glob) | |
1469 | *> cacher constructed for manifestdata (glob) |
|
1469 | *> cacher constructed for manifestdata (glob) | |
1470 | *> cache hit for 47abb8efa5f01b8964d74917793ad2464db0fa2c (glob) |
|
1470 | *> cache hit for 47abb8efa5f01b8964d74917793ad2464db0fa2c (glob) | |
1471 | *> sending content redirect for 47abb8efa5f01b8964d74917793ad2464db0fa2c to http://*:$HGPORT/api/simplecache/47abb8efa5f01b8964d74917793ad2464db0fa2c (glob) |
|
1471 | *> 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