Show More
@@ -1,759 +1,765 b'' | |||
|
1 | TRANSITIONAL CONFIG | |
|
2 | $ cat << EOF >> $HGRCPATH | |
|
3 | > [format] | |
|
4 | > sparse-revlog = yes | |
|
5 | > EOF | |
|
6 | ||
|
1 | 7 | #require no-chg |
|
2 | 8 | |
|
3 | 9 |
$ |
|
4 | 10 | |
|
5 | 11 |
$ |
|
6 | 12 | > [web] |
|
7 | 13 | > push_ssl = false |
|
8 | 14 | > allow_push = * |
|
9 | 15 | > EOF |
|
10 | 16 | |
|
11 | 17 |
$ |
|
12 | 18 | $ cd server |
|
13 | 19 | $ touch a |
|
14 | 20 | $ hg -q commit -A -m initial |
|
15 | 21 | $ cd .. |
|
16 | 22 | |
|
17 | 23 | $ hg serve -R server -p $HGPORT -d --pid-file hg.pid |
|
18 | 24 | $ cat hg.pid >> $DAEMON_PIDS |
|
19 | 25 | |
|
20 | 26 | compression formats are advertised in compression capability |
|
21 | 27 | |
|
22 | 28 | #if zstd |
|
23 | 29 | $ get-with-headers.py $LOCALIP:$HGPORT '?cmd=capabilities' | tr ' ' '\n' | grep '^compression=zstd,zlib$' > /dev/null |
|
24 | 30 | #else |
|
25 | 31 | $ get-with-headers.py $LOCALIP:$HGPORT '?cmd=capabilities' | tr ' ' '\n' | grep '^compression=zlib$' > /dev/null |
|
26 | 32 | #endif |
|
27 | 33 | |
|
28 | 34 | $ killdaemons.py |
|
29 | 35 | |
|
30 | 36 | server.compressionengines can replace engines list wholesale |
|
31 | 37 | |
|
32 | 38 | $ hg serve --config server.compressionengines=none -R server -p $HGPORT -d --pid-file hg.pid |
|
33 | 39 | $ cat hg.pid > $DAEMON_PIDS |
|
34 | 40 | $ get-with-headers.py $LOCALIP:$HGPORT '?cmd=capabilities' | tr ' ' '\n' | grep '^compression=none$' > /dev/null |
|
35 | 41 | |
|
36 | 42 | $ killdaemons.py |
|
37 | 43 | |
|
38 | 44 | Order of engines can also change |
|
39 | 45 | |
|
40 | 46 | $ hg serve --config server.compressionengines=none,zlib -R server -p $HGPORT -d --pid-file hg.pid |
|
41 | 47 | $ cat hg.pid > $DAEMON_PIDS |
|
42 | 48 | $ get-with-headers.py $LOCALIP:$HGPORT '?cmd=capabilities' | tr ' ' '\n' | grep '^compression=none,zlib$' > /dev/null |
|
43 | 49 | |
|
44 | 50 | $ killdaemons.py |
|
45 | 51 | |
|
46 | 52 | Start a default server again |
|
47 | 53 | |
|
48 | 54 | $ hg serve -R server -p $HGPORT -d --pid-file hg.pid |
|
49 | 55 | $ cat hg.pid > $DAEMON_PIDS |
|
50 | 56 | |
|
51 | 57 | Server should send application/mercurial-0.1 to clients if no Accept is used |
|
52 | 58 | |
|
53 | 59 | $ get-with-headers.py --headeronly $LOCALIP:$HGPORT '?cmd=getbundle&heads=e93700bd72895c5addab234c56d4024b487a362f&common=0000000000000000000000000000000000000000' - |
|
54 | 60 | 200 Script output follows |
|
55 | 61 | content-type: application/mercurial-0.1 |
|
56 | 62 | date: $HTTP_DATE$ |
|
57 | 63 | server: testing stub value |
|
58 | 64 | transfer-encoding: chunked |
|
59 | 65 | |
|
60 | 66 | Server should send application/mercurial-0.1 when client says it wants it |
|
61 | 67 | |
|
62 | 68 | $ get-with-headers.py --hgproto '0.1' --headeronly $LOCALIP:$HGPORT '?cmd=getbundle&heads=e93700bd72895c5addab234c56d4024b487a362f&common=0000000000000000000000000000000000000000' - |
|
63 | 69 | 200 Script output follows |
|
64 | 70 | content-type: application/mercurial-0.1 |
|
65 | 71 | date: $HTTP_DATE$ |
|
66 | 72 | server: testing stub value |
|
67 | 73 | transfer-encoding: chunked |
|
68 | 74 | |
|
69 | 75 | Server should send application/mercurial-0.2 when client says it wants it |
|
70 | 76 | |
|
71 | 77 | $ get-with-headers.py --hgproto '0.2' --headeronly $LOCALIP:$HGPORT '?cmd=getbundle&heads=e93700bd72895c5addab234c56d4024b487a362f&common=0000000000000000000000000000000000000000' - |
|
72 | 78 | 200 Script output follows |
|
73 | 79 | content-type: application/mercurial-0.2 |
|
74 | 80 | date: $HTTP_DATE$ |
|
75 | 81 | server: testing stub value |
|
76 | 82 | transfer-encoding: chunked |
|
77 | 83 | |
|
78 | 84 | $ get-with-headers.py --hgproto '0.1 0.2' --headeronly $LOCALIP:$HGPORT '?cmd=getbundle&heads=e93700bd72895c5addab234c56d4024b487a362f&common=0000000000000000000000000000000000000000' - |
|
79 | 85 | 200 Script output follows |
|
80 | 86 | content-type: application/mercurial-0.2 |
|
81 | 87 | date: $HTTP_DATE$ |
|
82 | 88 | server: testing stub value |
|
83 | 89 | transfer-encoding: chunked |
|
84 | 90 | |
|
85 | 91 | Requesting a compression format that server doesn't support results will fall back to 0.1 |
|
86 | 92 | |
|
87 | 93 | $ get-with-headers.py --hgproto '0.2 comp=aa' --headeronly $LOCALIP:$HGPORT '?cmd=getbundle&heads=e93700bd72895c5addab234c56d4024b487a362f&common=0000000000000000000000000000000000000000' - |
|
88 | 94 | 200 Script output follows |
|
89 | 95 | content-type: application/mercurial-0.1 |
|
90 | 96 | date: $HTTP_DATE$ |
|
91 | 97 | server: testing stub value |
|
92 | 98 | transfer-encoding: chunked |
|
93 | 99 | |
|
94 | 100 | #if zstd |
|
95 | 101 | zstd is used if available |
|
96 | 102 | |
|
97 | 103 | $ get-with-headers.py --hgproto '0.2 comp=zstd' $LOCALIP:$HGPORT '?cmd=getbundle&heads=e93700bd72895c5addab234c56d4024b487a362f&common=0000000000000000000000000000000000000000' > resp |
|
98 | 104 | $ f --size --hexdump --bytes 36 --sha1 resp |
|
99 | 105 | resp: size=248, sha1=4d8d8f87fb82bd542ce52881fdc94f850748 |
|
100 | 106 | 0000: 32 30 30 20 53 63 72 69 70 74 20 6f 75 74 70 75 |200 Script outpu| |
|
101 | 107 | 0010: 74 20 66 6f 6c 6c 6f 77 73 0a 0a 04 7a 73 74 64 |t follows...zstd| |
|
102 | 108 | 0020: 28 b5 2f fd |(./.| |
|
103 | 109 | |
|
104 | 110 | #endif |
|
105 | 111 | |
|
106 | 112 | application/mercurial-0.2 is not yet used on non-streaming responses |
|
107 | 113 | |
|
108 | 114 | $ get-with-headers.py --hgproto '0.2' $LOCALIP:$HGPORT '?cmd=heads' - |
|
109 | 115 | 200 Script output follows |
|
110 | 116 | content-length: 41 |
|
111 | 117 | content-type: application/mercurial-0.1 |
|
112 | 118 | date: $HTTP_DATE$ |
|
113 | 119 | server: testing stub value |
|
114 | 120 | |
|
115 | 121 | e93700bd72895c5addab234c56d4024b487a362f |
|
116 | 122 | |
|
117 | 123 | Now test protocol preference usage |
|
118 | 124 | |
|
119 | 125 | $ killdaemons.py |
|
120 | 126 | $ hg serve --config server.compressionengines=none,zlib -R server -p $HGPORT -d --pid-file hg.pid |
|
121 | 127 | $ cat hg.pid > $DAEMON_PIDS |
|
122 | 128 | |
|
123 | 129 | No Accept will send 0.1+zlib, even though "none" is preferred b/c "none" isn't supported on 0.1 |
|
124 | 130 | |
|
125 | 131 | $ get-with-headers.py --headeronly $LOCALIP:$HGPORT '?cmd=getbundle&heads=e93700bd72895c5addab234c56d4024b487a362f&common=0000000000000000000000000000000000000000' Content-Type |
|
126 | 132 | 200 Script output follows |
|
127 | 133 | content-type: application/mercurial-0.1 |
|
128 | 134 | |
|
129 | 135 | $ get-with-headers.py $LOCALIP:$HGPORT '?cmd=getbundle&heads=e93700bd72895c5addab234c56d4024b487a362f&common=0000000000000000000000000000000000000000' > resp |
|
130 | 136 | $ f --size --hexdump --bytes 28 --sha1 resp |
|
131 | 137 | resp: size=227, sha1=35a4c074da74f32f5440da3cbf04 |
|
132 | 138 | 0000: 32 30 30 20 53 63 72 69 70 74 20 6f 75 74 70 75 |200 Script outpu| |
|
133 | 139 | 0010: 74 20 66 6f 6c 6c 6f 77 73 0a 0a 78 |t follows..x| |
|
134 | 140 | |
|
135 | 141 | Explicit 0.1 will send zlib because "none" isn't supported on 0.1 |
|
136 | 142 | |
|
137 | 143 | $ get-with-headers.py --hgproto '0.1' $LOCALIP:$HGPORT '?cmd=getbundle&heads=e93700bd72895c5addab234c56d4024b487a362f&common=0000000000000000000000000000000000000000' > resp |
|
138 | 144 | $ f --size --hexdump --bytes 28 --sha1 resp |
|
139 | 145 | resp: size=227, sha1=35a4c074da74f32f5440da3cbf04 |
|
140 | 146 | 0000: 32 30 30 20 53 63 72 69 70 74 20 6f 75 74 70 75 |200 Script outpu| |
|
141 | 147 | 0010: 74 20 66 6f 6c 6c 6f 77 73 0a 0a 78 |t follows..x| |
|
142 | 148 | |
|
143 | 149 | 0.2 with no compression will get "none" because that is server's preference |
|
144 | 150 | (spec says ZL and UN are implicitly supported) |
|
145 | 151 | |
|
146 | 152 | $ get-with-headers.py --hgproto '0.2' $LOCALIP:$HGPORT '?cmd=getbundle&heads=e93700bd72895c5addab234c56d4024b487a362f&common=0000000000000000000000000000000000000000' > resp |
|
147 | 153 | $ f --size --hexdump --bytes 32 --sha1 resp |
|
148 | 154 | resp: size=432, sha1=ac931b412ec185a02e0e5bcff98dac83 |
|
149 | 155 | 0000: 32 30 30 20 53 63 72 69 70 74 20 6f 75 74 70 75 |200 Script outpu| |
|
150 | 156 | 0010: 74 20 66 6f 6c 6c 6f 77 73 0a 0a 04 6e 6f 6e 65 |t follows...none| |
|
151 | 157 | |
|
152 | 158 | Client receives server preference even if local order doesn't match |
|
153 | 159 | |
|
154 | 160 | $ get-with-headers.py --hgproto '0.2 comp=zlib,none' $LOCALIP:$HGPORT '?cmd=getbundle&heads=e93700bd72895c5addab234c56d4024b487a362f&common=0000000000000000000000000000000000000000' > resp |
|
155 | 161 | $ f --size --hexdump --bytes 32 --sha1 resp |
|
156 | 162 | resp: size=432, sha1=ac931b412ec185a02e0e5bcff98dac83 |
|
157 | 163 | 0000: 32 30 30 20 53 63 72 69 70 74 20 6f 75 74 70 75 |200 Script outpu| |
|
158 | 164 | 0010: 74 20 66 6f 6c 6c 6f 77 73 0a 0a 04 6e 6f 6e 65 |t follows...none| |
|
159 | 165 | |
|
160 | 166 | Client receives only supported format even if not server preferred format |
|
161 | 167 | |
|
162 | 168 | $ get-with-headers.py --hgproto '0.2 comp=zlib' $LOCALIP:$HGPORT '?cmd=getbundle&heads=e93700bd72895c5addab234c56d4024b487a362f&common=0000000000000000000000000000000000000000' > resp |
|
163 | 169 | $ f --size --hexdump --bytes 33 --sha1 resp |
|
164 | 170 | resp: size=232, sha1=a1c727f0c9693ca15742a75c30419bc36 |
|
165 | 171 | 0000: 32 30 30 20 53 63 72 69 70 74 20 6f 75 74 70 75 |200 Script outpu| |
|
166 | 172 | 0010: 74 20 66 6f 6c 6c 6f 77 73 0a 0a 04 7a 6c 69 62 |t follows...zlib| |
|
167 | 173 | 0020: 78 |x| |
|
168 | 174 | |
|
169 | 175 | $ killdaemons.py |
|
170 | 176 | $ cd .. |
|
171 | 177 | |
|
172 | 178 | Test listkeys for listing namespaces |
|
173 | 179 | |
|
174 | 180 | $ hg init empty |
|
175 | 181 | $ hg -R empty serve -p $HGPORT -d --pid-file hg.pid |
|
176 | 182 | $ cat hg.pid > $DAEMON_PIDS |
|
177 | 183 | |
|
178 | 184 | $ hg --verbose debugwireproto http://$LOCALIP:$HGPORT << EOF |
|
179 | 185 | > command listkeys |
|
180 | 186 | > namespace namespaces |
|
181 | 187 | > EOF |
|
182 | 188 | s> GET /?cmd=capabilities HTTP/1.1\r\n |
|
183 | 189 | s> Accept-Encoding: identity\r\n |
|
184 | 190 | s> accept: application/mercurial-0.1\r\n |
|
185 | 191 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
186 | 192 | s> user-agent: Mercurial debugwireproto\r\n |
|
187 | 193 | s> \r\n |
|
188 | 194 | s> makefile('rb', None) |
|
189 | 195 | s> HTTP/1.1 200 Script output follows\r\n |
|
190 | 196 | s> Server: testing stub value\r\n |
|
191 | 197 | s> Date: $HTTP_DATE$\r\n |
|
192 | 198 | s> Content-Type: application/mercurial-0.1\r\n |
|
193 | 199 | s> Content-Length: *\r\n (glob) |
|
194 | 200 | s> \r\n |
|
195 | 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 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash | |
|
201 | 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 | 202 | sending listkeys command |
|
197 | 203 | s> GET /?cmd=listkeys HTTP/1.1\r\n |
|
198 | 204 | s> Accept-Encoding: identity\r\n |
|
199 | 205 | s> vary: X-HgArg-1,X-HgProto-1\r\n |
|
200 | 206 | s> x-hgarg-1: namespace=namespaces\r\n |
|
201 | 207 | s> x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull\r\n |
|
202 | 208 | s> accept: application/mercurial-0.1\r\n |
|
203 | 209 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
204 | 210 | s> user-agent: Mercurial debugwireproto\r\n |
|
205 | 211 | s> \r\n |
|
206 | 212 | s> makefile('rb', None) |
|
207 | 213 | s> HTTP/1.1 200 Script output follows\r\n |
|
208 | 214 | s> Server: testing stub value\r\n |
|
209 | 215 | s> Date: $HTTP_DATE$\r\n |
|
210 | 216 | s> Content-Type: application/mercurial-0.1\r\n |
|
211 | 217 | s> Content-Length: 30\r\n |
|
212 | 218 | s> \r\n |
|
213 | 219 | s> bookmarks\t\n |
|
214 | 220 | s> namespaces\t\n |
|
215 | 221 | s> phases\t |
|
216 | 222 | response: { |
|
217 | 223 | b'bookmarks': b'', |
|
218 | 224 | b'namespaces': b'', |
|
219 | 225 | b'phases': b'' |
|
220 | 226 | } |
|
221 | 227 | (sent 2 HTTP requests and * bytes; received * bytes in responses) (glob) |
|
222 | 228 | |
|
223 | 229 | Same thing, but with "httprequest" command |
|
224 | 230 | |
|
225 | 231 | $ hg --verbose debugwireproto --peer raw http://$LOCALIP:$HGPORT << EOF |
|
226 | 232 | > httprequest GET ?cmd=listkeys |
|
227 | 233 | > user-agent: test |
|
228 | 234 | > x-hgarg-1: namespace=namespaces |
|
229 | 235 | > EOF |
|
230 | 236 | using raw connection to peer |
|
231 | 237 | s> GET /?cmd=listkeys HTTP/1.1\r\n |
|
232 | 238 | s> Accept-Encoding: identity\r\n |
|
233 | 239 | s> user-agent: test\r\n |
|
234 | 240 | s> x-hgarg-1: namespace=namespaces\r\n |
|
235 | 241 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
236 | 242 | s> \r\n |
|
237 | 243 | s> makefile('rb', None) |
|
238 | 244 | s> HTTP/1.1 200 Script output follows\r\n |
|
239 | 245 | s> Server: testing stub value\r\n |
|
240 | 246 | s> Date: $HTTP_DATE$\r\n |
|
241 | 247 | s> Content-Type: application/mercurial-0.1\r\n |
|
242 | 248 | s> Content-Length: 30\r\n |
|
243 | 249 | s> \r\n |
|
244 | 250 | s> bookmarks\t\n |
|
245 | 251 | s> namespaces\t\n |
|
246 | 252 | s> phases\t |
|
247 | 253 | |
|
248 | 254 | Client with HTTPv2 enabled advertises that and gets old capabilities response from old server |
|
249 | 255 | |
|
250 | 256 | $ hg --config experimental.httppeer.advertise-v2=true --verbose debugwireproto http://$LOCALIP:$HGPORT << EOF |
|
251 | 257 | > command heads |
|
252 | 258 | > EOF |
|
253 | 259 | s> GET /?cmd=capabilities HTTP/1.1\r\n |
|
254 | 260 | s> Accept-Encoding: identity\r\n |
|
255 | 261 | s> vary: X-HgProto-1,X-HgUpgrade-1\r\n |
|
256 | 262 | s> x-hgproto-1: cbor\r\n |
|
257 | 263 | s> x-hgupgrade-1: exp-http-v2-0003\r\n |
|
258 | 264 | s> accept: application/mercurial-0.1\r\n |
|
259 | 265 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
260 | 266 | s> user-agent: Mercurial debugwireproto\r\n |
|
261 | 267 | s> \r\n |
|
262 | 268 | s> makefile('rb', None) |
|
263 | 269 | s> HTTP/1.1 200 Script output follows\r\n |
|
264 | 270 | s> Server: testing stub value\r\n |
|
265 | 271 | s> Date: $HTTP_DATE$\r\n |
|
266 | 272 | s> Content-Type: application/mercurial-0.1\r\n |
|
267 | 273 | s> Content-Length: *\r\n (glob) |
|
268 | 274 | s> \r\n |
|
269 | 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 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash | |
|
275 | 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 | |
|
270 | 276 | sending heads command |
|
271 | 277 | s> GET /?cmd=heads HTTP/1.1\r\n |
|
272 | 278 | s> Accept-Encoding: identity\r\n |
|
273 | 279 | s> vary: X-HgProto-1\r\n |
|
274 | 280 | s> x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull\r\n |
|
275 | 281 | s> accept: application/mercurial-0.1\r\n |
|
276 | 282 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
277 | 283 | s> user-agent: Mercurial debugwireproto\r\n |
|
278 | 284 | s> \r\n |
|
279 | 285 | s> makefile('rb', None) |
|
280 | 286 | s> HTTP/1.1 200 Script output follows\r\n |
|
281 | 287 | s> Server: testing stub value\r\n |
|
282 | 288 | s> Date: $HTTP_DATE$\r\n |
|
283 | 289 | s> Content-Type: application/mercurial-0.1\r\n |
|
284 | 290 | s> Content-Length: 41\r\n |
|
285 | 291 | s> \r\n |
|
286 | 292 | s> 0000000000000000000000000000000000000000\n |
|
287 | 293 | response: [ |
|
288 | 294 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' |
|
289 | 295 | ] |
|
290 | 296 | (sent 2 HTTP requests and * bytes; received * bytes in responses) (glob) |
|
291 | 297 | |
|
292 | 298 | $ killdaemons.py |
|
293 | 299 | $ enablehttpv2 empty |
|
294 | 300 | $ hg --config server.compressionengines=zlib -R empty serve -p $HGPORT -d --pid-file hg.pid |
|
295 | 301 | $ cat hg.pid > $DAEMON_PIDS |
|
296 | 302 | |
|
297 | 303 | Client with HTTPv2 enabled automatically upgrades if the server supports it |
|
298 | 304 | |
|
299 | 305 | $ hg --config experimental.httppeer.advertise-v2=true --config experimental.httppeer.v2-encoder-order=identity --verbose debugwireproto http://$LOCALIP:$HGPORT << EOF |
|
300 | 306 | > command heads |
|
301 | 307 | > EOF |
|
302 | 308 | s> GET /?cmd=capabilities HTTP/1.1\r\n |
|
303 | 309 | s> Accept-Encoding: identity\r\n |
|
304 | 310 | s> vary: X-HgProto-1,X-HgUpgrade-1\r\n |
|
305 | 311 | s> x-hgproto-1: cbor\r\n |
|
306 | 312 | s> x-hgupgrade-1: exp-http-v2-0003\r\n |
|
307 | 313 | s> accept: application/mercurial-0.1\r\n |
|
308 | 314 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
309 | 315 | s> user-agent: Mercurial debugwireproto\r\n |
|
310 | 316 | s> \r\n |
|
311 | 317 | s> makefile('rb', None) |
|
312 | 318 | s> HTTP/1.1 200 OK\r\n |
|
313 | 319 | s> Server: testing stub value\r\n |
|
314 | 320 | s> Date: $HTTP_DATE$\r\n |
|
315 | 321 | s> Content-Type: application/mercurial-cbor\r\n |
|
316 | 322 | s> Content-Length: *\r\n (glob) |
|
317 | 323 | s> \r\n |
|
318 |
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\x8 |
|
|
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 | |
|
319 | 325 | sending heads command |
|
320 | 326 | s> POST /api/exp-http-v2-0003/ro/heads HTTP/1.1\r\n |
|
321 | 327 | s> Accept-Encoding: identity\r\n |
|
322 | 328 | s> accept: application/mercurial-exp-framing-0006\r\n |
|
323 | 329 | s> content-type: application/mercurial-exp-framing-0006\r\n |
|
324 | 330 | s> content-length: 56\r\n |
|
325 | 331 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
326 | 332 | s> user-agent: Mercurial debugwireproto\r\n |
|
327 | 333 | s> \r\n |
|
328 | 334 | s> \x1c\x00\x00\x01\x00\x01\x01\x82\xa1Pcontentencodings\x81Hidentity\x0c\x00\x00\x01\x00\x01\x00\x11\xa1DnameEheads |
|
329 | 335 | s> makefile('rb', None) |
|
330 | 336 | s> HTTP/1.1 200 OK\r\n |
|
331 | 337 | s> Server: testing stub value\r\n |
|
332 | 338 | s> Date: $HTTP_DATE$\r\n |
|
333 | 339 | s> Content-Type: application/mercurial-exp-framing-0006\r\n |
|
334 | 340 | s> Transfer-Encoding: chunked\r\n |
|
335 | 341 | s> \r\n |
|
336 | 342 | s> 11\r\n |
|
337 | 343 | s> \t\x00\x00\x01\x00\x02\x01\x92 |
|
338 | 344 | s> Hidentity |
|
339 | 345 | s> \r\n |
|
340 | 346 | received frame(size=9; request=1; stream=2; streamflags=stream-begin; type=stream-settings; flags=eos) |
|
341 | 347 | s> 13\r\n |
|
342 | 348 | s> \x0b\x00\x00\x01\x00\x02\x041 |
|
343 | 349 | s> \xa1FstatusBok |
|
344 | 350 | s> \r\n |
|
345 | 351 | received frame(size=11; request=1; stream=2; streamflags=encoded; type=command-response; flags=continuation) |
|
346 | 352 | s> 1e\r\n |
|
347 | 353 | s> \x16\x00\x00\x01\x00\x02\x041 |
|
348 | 354 | s> \x81T\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00 |
|
349 | 355 | s> \r\n |
|
350 | 356 | received frame(size=22; request=1; stream=2; streamflags=encoded; type=command-response; flags=continuation) |
|
351 | 357 | s> 8\r\n |
|
352 | 358 | s> \x00\x00\x00\x01\x00\x02\x002 |
|
353 | 359 | s> \r\n |
|
354 | 360 | s> 0\r\n |
|
355 | 361 | s> \r\n |
|
356 | 362 | received frame(size=0; request=1; stream=2; streamflags=; type=command-response; flags=eos) |
|
357 | 363 | response: [ |
|
358 | 364 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' |
|
359 | 365 | ] |
|
360 | 366 | (sent 2 HTTP requests and * bytes; received * bytes in responses) (glob) |
|
361 | 367 | |
|
362 | 368 | $ killdaemons.py |
|
363 | 369 | |
|
364 | 370 | HTTP client follows HTTP redirect on handshake to new repo |
|
365 | 371 | |
|
366 | 372 | $ cd $TESTTMP |
|
367 | 373 | |
|
368 | 374 | $ hg init redirector |
|
369 | 375 | $ hg init redirected |
|
370 | 376 | $ cd redirected |
|
371 | 377 | $ touch foo |
|
372 | 378 | $ hg -q commit -A -m initial |
|
373 | 379 | $ cd .. |
|
374 | 380 | |
|
375 | 381 | $ cat > paths.conf << EOF |
|
376 | 382 | > [paths] |
|
377 | 383 | > / = $TESTTMP/* |
|
378 | 384 | > EOF |
|
379 | 385 | |
|
380 | 386 | $ cat > redirectext.py << EOF |
|
381 | 387 | > from mercurial import extensions, wireprotoserver |
|
382 | 388 | > def wrappedcallhttp(orig, repo, req, res, proto, cmd): |
|
383 | 389 | > path = req.advertisedurl[len(req.advertisedbaseurl):] |
|
384 | 390 | > if not path.startswith(b'/redirector'): |
|
385 | 391 | > return orig(repo, req, res, proto, cmd) |
|
386 | 392 | > relpath = path[len(b'/redirector'):] |
|
387 | 393 | > res.status = b'301 Redirect' |
|
388 | 394 | > newurl = b'%s/redirected%s' % (req.baseurl, relpath) |
|
389 | 395 | > if not repo.ui.configbool('testing', 'redirectqs', True) and b'?' in newurl: |
|
390 | 396 | > newurl = newurl[0:newurl.index(b'?')] |
|
391 | 397 | > res.headers[b'Location'] = newurl |
|
392 | 398 | > res.headers[b'Content-Type'] = b'text/plain' |
|
393 | 399 | > res.setbodybytes(b'redirected') |
|
394 | 400 | > return True |
|
395 | 401 | > |
|
396 | 402 | > extensions.wrapfunction(wireprotoserver, '_callhttp', wrappedcallhttp) |
|
397 | 403 | > EOF |
|
398 | 404 | |
|
399 | 405 | $ hg --config extensions.redirect=$TESTTMP/redirectext.py \ |
|
400 | 406 | > --config server.compressionengines=zlib \ |
|
401 | 407 | > serve --web-conf paths.conf --pid-file hg.pid -p $HGPORT -d |
|
402 | 408 | $ cat hg.pid > $DAEMON_PIDS |
|
403 | 409 | |
|
404 | 410 | Verify our HTTP 301 is served properly |
|
405 | 411 | |
|
406 | 412 | $ hg --verbose debugwireproto --peer raw http://$LOCALIP:$HGPORT << EOF |
|
407 | 413 | > httprequest GET /redirector?cmd=capabilities |
|
408 | 414 | > user-agent: test |
|
409 | 415 | > EOF |
|
410 | 416 | using raw connection to peer |
|
411 | 417 | s> GET /redirector?cmd=capabilities HTTP/1.1\r\n |
|
412 | 418 | s> Accept-Encoding: identity\r\n |
|
413 | 419 | s> user-agent: test\r\n |
|
414 | 420 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
415 | 421 | s> \r\n |
|
416 | 422 | s> makefile('rb', None) |
|
417 | 423 | s> HTTP/1.1 301 Redirect\r\n |
|
418 | 424 | s> Server: testing stub value\r\n |
|
419 | 425 | s> Date: $HTTP_DATE$\r\n |
|
420 | 426 | s> Location: http://$LOCALIP:$HGPORT/redirected?cmd=capabilities\r\n (glob) |
|
421 | 427 | s> Content-Type: text/plain\r\n |
|
422 | 428 | s> Content-Length: 10\r\n |
|
423 | 429 | s> \r\n |
|
424 | 430 | s> redirected |
|
425 | 431 | s> GET /redirected?cmd=capabilities HTTP/1.1\r\n |
|
426 | 432 | s> Accept-Encoding: identity\r\n |
|
427 | 433 | s> user-agent: test\r\n |
|
428 | 434 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
429 | 435 | s> \r\n |
|
430 | 436 | s> makefile('rb', None) |
|
431 | 437 | s> HTTP/1.1 200 Script output follows\r\n |
|
432 | 438 | s> Server: testing stub value\r\n |
|
433 | 439 | s> Date: $HTTP_DATE$\r\n |
|
434 | 440 | s> Content-Type: application/mercurial-0.1\r\n |
|
435 |
s> Content-Length: 4 |
|
|
441 | s> Content-Length: 480\r\n | |
|
436 | 442 | s> \r\n |
|
437 | 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 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash | |
|
443 | 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 | |
|
438 | 444 | |
|
439 | 445 | Test with the HTTP peer |
|
440 | 446 | |
|
441 | 447 | $ hg --verbose debugwireproto http://$LOCALIP:$HGPORT/redirector << EOF |
|
442 | 448 | > command heads |
|
443 | 449 | > EOF |
|
444 | 450 | s> GET /redirector?cmd=capabilities HTTP/1.1\r\n |
|
445 | 451 | s> Accept-Encoding: identity\r\n |
|
446 | 452 | s> accept: application/mercurial-0.1\r\n |
|
447 | 453 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
448 | 454 | s> user-agent: Mercurial debugwireproto\r\n |
|
449 | 455 | s> \r\n |
|
450 | 456 | s> makefile('rb', None) |
|
451 | 457 | s> HTTP/1.1 301 Redirect\r\n |
|
452 | 458 | s> Server: testing stub value\r\n |
|
453 | 459 | s> Date: $HTTP_DATE$\r\n |
|
454 | 460 | s> Location: http://$LOCALIP:$HGPORT/redirected?cmd=capabilities\r\n (glob) |
|
455 | 461 | s> Content-Type: text/plain\r\n |
|
456 | 462 | s> Content-Length: 10\r\n |
|
457 | 463 | s> \r\n |
|
458 | 464 | s> redirected |
|
459 | 465 | s> GET /redirected?cmd=capabilities HTTP/1.1\r\n |
|
460 | 466 | s> Accept-Encoding: identity\r\n |
|
461 | 467 | s> accept: application/mercurial-0.1\r\n |
|
462 | 468 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
463 | 469 | s> user-agent: Mercurial debugwireproto\r\n |
|
464 | 470 | s> \r\n |
|
465 | 471 | s> makefile('rb', None) |
|
466 | 472 | s> HTTP/1.1 200 Script output follows\r\n |
|
467 | 473 | s> Server: testing stub value\r\n |
|
468 | 474 | s> Date: $HTTP_DATE$\r\n |
|
469 | 475 | s> Content-Type: application/mercurial-0.1\r\n |
|
470 |
s> Content-Length: 4 |
|
|
476 | s> Content-Length: 480\r\n | |
|
471 | 477 | s> \r\n |
|
472 | 478 | real URL is http://$LOCALIP:$HGPORT/redirected (glob) |
|
473 | 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 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash | |
|
479 | 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 | |
|
474 | 480 | sending heads command |
|
475 | 481 | s> GET /redirected?cmd=heads HTTP/1.1\r\n |
|
476 | 482 | s> Accept-Encoding: identity\r\n |
|
477 | 483 | s> vary: X-HgProto-1\r\n |
|
478 | 484 | s> x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull\r\n |
|
479 | 485 | s> accept: application/mercurial-0.1\r\n |
|
480 | 486 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
481 | 487 | s> user-agent: Mercurial debugwireproto\r\n |
|
482 | 488 | s> \r\n |
|
483 | 489 | s> makefile('rb', None) |
|
484 | 490 | s> HTTP/1.1 200 Script output follows\r\n |
|
485 | 491 | s> Server: testing stub value\r\n |
|
486 | 492 | s> Date: $HTTP_DATE$\r\n |
|
487 | 493 | s> Content-Type: application/mercurial-0.1\r\n |
|
488 | 494 | s> Content-Length: 41\r\n |
|
489 | 495 | s> \r\n |
|
490 | 496 | s> 96ee1d7354c4ad7372047672c36a1f561e3a6a4c\n |
|
491 | 497 | response: [ |
|
492 | 498 | b'\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL' |
|
493 | 499 | ] |
|
494 | 500 | (sent 3 HTTP requests and * bytes; received * bytes in responses) (glob) |
|
495 | 501 | |
|
496 | 502 | $ killdaemons.py |
|
497 | 503 | |
|
498 | 504 | Now test a variation where we strip the query string from the redirect URL. |
|
499 | 505 | (SCM Manager apparently did this and clients would recover from it) |
|
500 | 506 | |
|
501 | 507 | $ hg --config extensions.redirect=$TESTTMP/redirectext.py \ |
|
502 | 508 | > --config server.compressionengines=zlib \ |
|
503 | 509 | > --config testing.redirectqs=false \ |
|
504 | 510 | > serve --web-conf paths.conf --pid-file hg.pid -p $HGPORT -d |
|
505 | 511 | $ cat hg.pid > $DAEMON_PIDS |
|
506 | 512 | |
|
507 | 513 | $ hg --verbose debugwireproto --peer raw http://$LOCALIP:$HGPORT << EOF |
|
508 | 514 | > httprequest GET /redirector?cmd=capabilities |
|
509 | 515 | > user-agent: test |
|
510 | 516 | > EOF |
|
511 | 517 | using raw connection to peer |
|
512 | 518 | s> GET /redirector?cmd=capabilities HTTP/1.1\r\n |
|
513 | 519 | s> Accept-Encoding: identity\r\n |
|
514 | 520 | s> user-agent: test\r\n |
|
515 | 521 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
516 | 522 | s> \r\n |
|
517 | 523 | s> makefile('rb', None) |
|
518 | 524 | s> HTTP/1.1 301 Redirect\r\n |
|
519 | 525 | s> Server: testing stub value\r\n |
|
520 | 526 | s> Date: $HTTP_DATE$\r\n |
|
521 | 527 | s> Location: http://$LOCALIP:$HGPORT/redirected\r\n (glob) |
|
522 | 528 | s> Content-Type: text/plain\r\n |
|
523 | 529 | s> Content-Length: 10\r\n |
|
524 | 530 | s> \r\n |
|
525 | 531 | s> redirected |
|
526 | 532 | s> GET /redirected HTTP/1.1\r\n |
|
527 | 533 | s> Accept-Encoding: identity\r\n |
|
528 | 534 | s> user-agent: test\r\n |
|
529 | 535 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
530 | 536 | s> \r\n |
|
531 | 537 | s> makefile('rb', None) |
|
532 | 538 | s> HTTP/1.1 200 Script output follows\r\n |
|
533 | 539 | s> Server: testing stub value\r\n |
|
534 | 540 | s> Date: $HTTP_DATE$\r\n |
|
535 | 541 | s> ETag: W/"*"\r\n (glob) |
|
536 | 542 | s> Content-Type: text/html; charset=ascii\r\n |
|
537 | 543 | s> Transfer-Encoding: chunked\r\n |
|
538 | 544 | s> \r\n |
|
539 | 545 | s> 414\r\n |
|
540 | 546 | s> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">\n |
|
541 | 547 | s> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">\n |
|
542 | 548 | s> <head>\n |
|
543 | 549 | s> <link rel="icon" href="/redirected/static/hgicon.png" type="image/png" />\n |
|
544 | 550 | s> <meta name="robots" content="index, nofollow" />\n |
|
545 | 551 | s> <link rel="stylesheet" href="/redirected/static/style-paper.css" type="text/css" />\n |
|
546 | 552 | s> <script type="text/javascript" src="/redirected/static/mercurial.js"></script>\n |
|
547 | 553 | s> \n |
|
548 | 554 | s> <title>redirected: log</title>\n |
|
549 | 555 | s> <link rel="alternate" type="application/atom+xml"\n |
|
550 | 556 | s> href="/redirected/atom-log" title="Atom feed for redirected" />\n |
|
551 | 557 | s> <link rel="alternate" type="application/rss+xml"\n |
|
552 | 558 | s> href="/redirected/rss-log" title="RSS feed for redirected" />\n |
|
553 | 559 | s> </head>\n |
|
554 | 560 | s> <body>\n |
|
555 | 561 | s> \n |
|
556 | 562 | s> <div class="container">\n |
|
557 | 563 | s> <div class="menu">\n |
|
558 | 564 | s> <div class="logo">\n |
|
559 | 565 | s> <a href="https://mercurial-scm.org/">\n |
|
560 | 566 | s> <img src="/redirected/static/hglogo.png" alt="mercurial" /></a>\n |
|
561 | 567 | s> </div>\n |
|
562 | 568 | s> <ul>\n |
|
563 | 569 | s> <li class="active">log</li>\n |
|
564 | 570 | s> <li><a href="/redirected/graph/tip">graph</a></li>\n |
|
565 | 571 | s> <li><a href="/redirected/tags">tags</a></li>\n |
|
566 | 572 | s> <li><a href=" |
|
567 | 573 | s> \r\n |
|
568 | 574 | s> 810\r\n |
|
569 | 575 | s> /redirected/bookmarks">bookmarks</a></li>\n |
|
570 | 576 | s> <li><a href="/redirected/branches">branches</a></li>\n |
|
571 | 577 | s> </ul>\n |
|
572 | 578 | s> <ul>\n |
|
573 | 579 | s> <li><a href="/redirected/rev/tip">changeset</a></li>\n |
|
574 | 580 | s> <li><a href="/redirected/file/tip">browse</a></li>\n |
|
575 | 581 | s> </ul>\n |
|
576 | 582 | s> <ul>\n |
|
577 | 583 | s> \n |
|
578 | 584 | s> </ul>\n |
|
579 | 585 | s> <ul>\n |
|
580 | 586 | s> <li><a href="/redirected/help">help</a></li>\n |
|
581 | 587 | s> </ul>\n |
|
582 | 588 | s> <div class="atom-logo">\n |
|
583 | 589 | s> <a href="/redirected/atom-log" title="subscribe to atom feed">\n |
|
584 | 590 | s> <img class="atom-logo" src="/redirected/static/feed-icon-14x14.png" alt="atom feed" />\n |
|
585 | 591 | s> </a>\n |
|
586 | 592 | s> </div>\n |
|
587 | 593 | s> </div>\n |
|
588 | 594 | s> \n |
|
589 | 595 | s> <div class="main">\n |
|
590 | 596 | s> <h2 class="breadcrumb"><a href="/">Mercurial</a> > <a href="/redirected">redirected</a> </h2>\n |
|
591 | 597 | s> <h3>log</h3>\n |
|
592 | 598 | s> \n |
|
593 | 599 | s> \n |
|
594 | 600 | s> <form class="search" action="/redirected/log">\n |
|
595 | 601 | s> \n |
|
596 | 602 | s> <p><input name="rev" id="search1" type="text" size="30" value="" /></p>\n |
|
597 | 603 | s> <div id="hint">Find changesets by keywords (author, files, the commit message), revision\n |
|
598 | 604 | s> number or hash, or <a href="/redirected/help/revsets">revset expression</a>.</div>\n |
|
599 | 605 | s> </form>\n |
|
600 | 606 | s> \n |
|
601 | 607 | s> <div class="navigate">\n |
|
602 | 608 | s> <a href="/redirected/shortlog/tip?revcount=30">less</a>\n |
|
603 | 609 | s> <a href="/redirected/shortlog/tip?revcount=120">more</a>\n |
|
604 | 610 | s> | rev 0: <a href="/redirected/shortlog/96ee1d7354c4">(0)</a> <a href="/redirected/shortlog/tip">tip</a> \n |
|
605 | 611 | s> </div>\n |
|
606 | 612 | s> \n |
|
607 | 613 | s> <table class="bigtable">\n |
|
608 | 614 | s> <thead>\n |
|
609 | 615 | s> <tr>\n |
|
610 | 616 | s> <th class="age">age</th>\n |
|
611 | 617 | s> <th class="author">author</th>\n |
|
612 | 618 | s> <th class="description">description</th>\n |
|
613 | 619 | s> </tr>\n |
|
614 | 620 | s> </thead>\n |
|
615 | 621 | s> <tbody class="stripes2">\n |
|
616 | 622 | s> <tr>\n |
|
617 | 623 | s> <td class="age">Thu, 01 Jan 1970 00:00:00 +0000</td>\n |
|
618 | 624 | s> <td class="author">test</td>\n |
|
619 | 625 | s> <td class="description">\n |
|
620 | 626 | s> <a href="/redirected/rev/96ee1d7354c4">initial</a>\n |
|
621 | 627 | s> <span class="phase">draft</span> <span class="branchhead">default</span> <span class="tag">tip</span> \n |
|
622 | 628 | s> </td>\n |
|
623 | 629 | s> </tr>\n |
|
624 | 630 | s> \n |
|
625 | 631 | s> </tbody>\n |
|
626 | 632 | s> </table>\n |
|
627 | 633 | s> \n |
|
628 | 634 | s> <div class="navigate">\n |
|
629 | 635 | s> <a href="/redirected/shortlog/tip?revcount=30">less</a>\n |
|
630 | 636 | s> <a href="/redirected/shortlog/tip?revcount=120">more</a>\n |
|
631 | 637 | s> | rev 0: <a href="/redirected/shortlog/96ee1d7354c4">(0)</a> <a href="/redirected/shortlog/tip">tip</a> \n |
|
632 | 638 | s> </div>\n |
|
633 | 639 | s> \n |
|
634 | 640 | s> <script type="text/javascript">\n |
|
635 | 641 | s> ajaxScrollInit(\n |
|
636 | 642 | s> \'/redirected/shortlog/%next%\',\n |
|
637 | 643 | s> \'\', <!-- NEXTHASH\n |
|
638 | 644 | s> function (htmlText) { |
|
639 | 645 | s> \r\n |
|
640 | 646 | s> 14a\r\n |
|
641 | 647 | s> \n |
|
642 | 648 | s> var m = htmlText.match(/\'(\\w+)\', <!-- NEXTHASH/);\n |
|
643 | 649 | s> return m ? m[1] : null;\n |
|
644 | 650 | s> },\n |
|
645 | 651 | s> \'.bigtable > tbody\',\n |
|
646 | 652 | s> \'<tr class="%class%">\\\n |
|
647 | 653 | s> <td colspan="3" style="text-align: center;">%text%</td>\\\n |
|
648 | 654 | s> </tr>\'\n |
|
649 | 655 | s> );\n |
|
650 | 656 | s> </script>\n |
|
651 | 657 | s> \n |
|
652 | 658 | s> </div>\n |
|
653 | 659 | s> </div>\n |
|
654 | 660 | s> \n |
|
655 | 661 | s> \n |
|
656 | 662 | s> \n |
|
657 | 663 | s> </body>\n |
|
658 | 664 | s> </html>\n |
|
659 | 665 | s> \n |
|
660 | 666 | s> \r\n |
|
661 | 667 | s> 0\r\n |
|
662 | 668 | s> \r\n |
|
663 | 669 | |
|
664 | 670 | $ hg --verbose debugwireproto http://$LOCALIP:$HGPORT/redirector << EOF |
|
665 | 671 | > command heads |
|
666 | 672 | > EOF |
|
667 | 673 | s> GET /redirector?cmd=capabilities HTTP/1.1\r\n |
|
668 | 674 | s> Accept-Encoding: identity\r\n |
|
669 | 675 | s> accept: application/mercurial-0.1\r\n |
|
670 | 676 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
671 | 677 | s> user-agent: Mercurial debugwireproto\r\n |
|
672 | 678 | s> \r\n |
|
673 | 679 | s> makefile('rb', None) |
|
674 | 680 | s> HTTP/1.1 301 Redirect\r\n |
|
675 | 681 | s> Server: testing stub value\r\n |
|
676 | 682 | s> Date: $HTTP_DATE$\r\n |
|
677 | 683 | s> Location: http://$LOCALIP:$HGPORT/redirected\r\n (glob) |
|
678 | 684 | s> Content-Type: text/plain\r\n |
|
679 | 685 | s> Content-Length: 10\r\n |
|
680 | 686 | s> \r\n |
|
681 | 687 | s> redirected |
|
682 | 688 | s> GET /redirected HTTP/1.1\r\n |
|
683 | 689 | s> Accept-Encoding: identity\r\n |
|
684 | 690 | s> accept: application/mercurial-0.1\r\n |
|
685 | 691 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
686 | 692 | s> user-agent: Mercurial debugwireproto\r\n |
|
687 | 693 | s> \r\n |
|
688 | 694 | s> makefile('rb', None) |
|
689 | 695 | s> HTTP/1.1 200 Script output follows\r\n |
|
690 | 696 | s> Server: testing stub value\r\n |
|
691 | 697 | s> Date: $HTTP_DATE$\r\n |
|
692 | 698 | s> ETag: W/"*"\r\n (glob) |
|
693 | 699 | s> Content-Type: text/html; charset=ascii\r\n |
|
694 | 700 | s> Transfer-Encoding: chunked\r\n |
|
695 | 701 | s> \r\n |
|
696 | 702 | real URL is http://$LOCALIP:$HGPORT/redirected (glob) |
|
697 | 703 | s> 414\r\n |
|
698 | 704 | s> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">\n |
|
699 | 705 | s> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">\n |
|
700 | 706 | s> <head>\n |
|
701 | 707 | s> <link rel="icon" href="/redirected/static/hgicon.png" type="image/png" />\n |
|
702 | 708 | s> <meta name="robots" content="index, nofollow" />\n |
|
703 | 709 | s> <link rel="stylesheet" href="/redirected/static/style-paper.css" type="text/css" />\n |
|
704 | 710 | s> <script type="text/javascript" src="/redirected/static/mercurial.js"></script>\n |
|
705 | 711 | s> \n |
|
706 | 712 | s> <title>redirected: log</title>\n |
|
707 | 713 | s> <link rel="alternate" type="application/atom+xml"\n |
|
708 | 714 | s> href="/redirected/atom-log" title="Atom feed for redirected" />\n |
|
709 | 715 | s> <link rel="alternate" type="application/rss+xml"\n |
|
710 | 716 | s> href="/redirected/rss-log" title="RSS feed for redirected" />\n |
|
711 | 717 | s> </head>\n |
|
712 | 718 | s> <body>\n |
|
713 | 719 | s> \n |
|
714 | 720 | s> <div class="container">\n |
|
715 | 721 | s> <div class="menu">\n |
|
716 | 722 | s> <div class="logo">\n |
|
717 | 723 | s> <a href="https://mercurial-scm.org/">\n |
|
718 | 724 | s> <img src="/redirected/static/hglogo.png" alt="mercurial" /></a>\n |
|
719 | 725 | s> </div>\n |
|
720 | 726 | s> <ul>\n |
|
721 | 727 | s> <li class="active">log</li>\n |
|
722 | 728 | s> <li><a href="/redirected/graph/tip">graph</a></li>\n |
|
723 | 729 | s> <li><a href="/redirected/tags">tags</a |
|
724 | 730 | s> GET /redirected?cmd=capabilities HTTP/1.1\r\n |
|
725 | 731 | s> Accept-Encoding: identity\r\n |
|
726 | 732 | s> accept: application/mercurial-0.1\r\n |
|
727 | 733 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
728 | 734 | s> user-agent: Mercurial debugwireproto\r\n |
|
729 | 735 | s> \r\n |
|
730 | 736 | s> makefile('rb', None) |
|
731 | 737 | s> HTTP/1.1 200 Script output follows\r\n |
|
732 | 738 | s> Server: testing stub value\r\n |
|
733 | 739 | s> Date: $HTTP_DATE$\r\n |
|
734 | 740 | s> Content-Type: application/mercurial-0.1\r\n |
|
735 |
s> Content-Length: 4 |
|
|
741 | s> Content-Length: 480\r\n | |
|
736 | 742 | s> \r\n |
|
737 | 743 | real URL is http://$LOCALIP:$HGPORT/redirected (glob) |
|
738 | 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 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash | |
|
744 | 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 | |
|
739 | 745 | sending heads command |
|
740 | 746 | s> GET /redirected?cmd=heads HTTP/1.1\r\n |
|
741 | 747 | s> Accept-Encoding: identity\r\n |
|
742 | 748 | s> vary: X-HgProto-1\r\n |
|
743 | 749 | s> x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull\r\n |
|
744 | 750 | s> accept: application/mercurial-0.1\r\n |
|
745 | 751 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
746 | 752 | s> user-agent: Mercurial debugwireproto\r\n |
|
747 | 753 | s> \r\n |
|
748 | 754 | s> makefile('rb', None) |
|
749 | 755 | s> HTTP/1.1 200 Script output follows\r\n |
|
750 | 756 | s> Server: testing stub value\r\n |
|
751 | 757 | s> Date: $HTTP_DATE$\r\n |
|
752 | 758 | s> Content-Type: application/mercurial-0.1\r\n |
|
753 | 759 | s> Content-Length: 41\r\n |
|
754 | 760 | s> \r\n |
|
755 | 761 | s> 96ee1d7354c4ad7372047672c36a1f561e3a6a4c\n |
|
756 | 762 | response: [ |
|
757 | 763 | b'\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL' |
|
758 | 764 | ] |
|
759 | 765 | (sent 4 HTTP requests and * bytes; received * bytes in responses) (glob) |
General Comments 0
You need to be logged in to leave comments.
Login now