##// END OF EJS Templates
tests: glob over a difference between Windows 7 and Window 10...
Matt Harbison -
r40407:5a81c4aa default
parent child Browse files
Show More
@@ -1,556 +1,556 b''
1 1 #require no-reposimplestore no-chg
2 2
3 3 Set up a server
4 4
5 5 $ hg init server
6 6 $ cd server
7 7 $ cat >> .hg/hgrc << EOF
8 8 > [extensions]
9 9 > clonebundles =
10 10 > EOF
11 11
12 12 $ touch foo
13 13 $ hg -q commit -A -m 'add foo'
14 14 $ touch bar
15 15 $ hg -q commit -A -m 'add bar'
16 16
17 17 $ hg serve -d -p $HGPORT --pid-file hg.pid --accesslog access.log
18 18 $ cat hg.pid >> $DAEMON_PIDS
19 19 $ cd ..
20 20
21 21 Missing manifest should not result in server lookup
22 22
23 23 $ hg --verbose clone -U http://localhost:$HGPORT no-manifest
24 24 requesting all changes
25 25 adding changesets
26 26 adding manifests
27 27 adding file changes
28 28 added 2 changesets with 2 changes to 2 files
29 29 new changesets 53245c60e682:aaff8d2ffbbf
30 30 (sent 3 HTTP requests and * bytes; received * bytes in responses) (glob)
31 31
32 32 $ cat server/access.log
33 33 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
34 34 $LOCALIP - - [$LOGDATE$] "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
35 35 $LOCALIP - - [$LOGDATE$] "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bookmarks=1&$USUAL_BUNDLE_CAPS$&cg=1&common=0000000000000000000000000000000000000000&heads=aaff8d2ffbbf07a46dd1f05d8ae7877e3f56e2a2&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
36 36
37 37 Empty manifest file results in retrieval
38 38 (the extension only checks if the manifest file exists)
39 39
40 40 $ touch server/.hg/clonebundles.manifest
41 41 $ hg --verbose clone -U http://localhost:$HGPORT empty-manifest
42 42 no clone bundles available on remote; falling back to regular clone
43 43 requesting all changes
44 44 adding changesets
45 45 adding manifests
46 46 adding file changes
47 47 added 2 changesets with 2 changes to 2 files
48 48 new changesets 53245c60e682:aaff8d2ffbbf
49 49 (sent 4 HTTP requests and * bytes; received * bytes in responses) (glob)
50 50
51 51 Manifest file with invalid URL aborts
52 52
53 53 $ echo 'http://does.not.exist/bundle.hg' > server/.hg/clonebundles.manifest
54 54 $ hg clone http://localhost:$HGPORT 404-url
55 55 applying clone bundle from http://does.not.exist/bundle.hg
56 56 error fetching bundle: (.* not known|(\[Errno -?\d+])? No address associated with hostname) (re) (no-windows !)
57 error fetching bundle: [Errno 11004] getaddrinfo failed (windows !)
57 error fetching bundle: [Errno 1100*] getaddrinfo failed (glob) (windows !)
58 58 abort: error applying bundle
59 59 (if this error persists, consider contacting the server operator or disable clone bundles via "--config ui.clonebundles=false")
60 60 [255]
61 61
62 62 Server is not running aborts
63 63
64 64 $ echo "http://localhost:$HGPORT1/bundle.hg" > server/.hg/clonebundles.manifest
65 65 $ hg clone http://localhost:$HGPORT server-not-runner
66 66 applying clone bundle from http://localhost:$HGPORT1/bundle.hg
67 67 error fetching bundle: (.* refused.*|Protocol not supported|(.* )?Cannot assign requested address) (re)
68 68 abort: error applying bundle
69 69 (if this error persists, consider contacting the server operator or disable clone bundles via "--config ui.clonebundles=false")
70 70 [255]
71 71
72 72 Server returns 404
73 73
74 74 $ "$PYTHON" $TESTDIR/dumbhttp.py -p $HGPORT1 --pid http.pid
75 75 $ cat http.pid >> $DAEMON_PIDS
76 76 $ hg clone http://localhost:$HGPORT running-404
77 77 applying clone bundle from http://localhost:$HGPORT1/bundle.hg
78 78 HTTP error fetching bundle: HTTP Error 404: File not found
79 79 abort: error applying bundle
80 80 (if this error persists, consider contacting the server operator or disable clone bundles via "--config ui.clonebundles=false")
81 81 [255]
82 82
83 83 We can override failure to fall back to regular clone
84 84
85 85 $ hg --config ui.clonebundlefallback=true clone -U http://localhost:$HGPORT 404-fallback
86 86 applying clone bundle from http://localhost:$HGPORT1/bundle.hg
87 87 HTTP error fetching bundle: HTTP Error 404: File not found
88 88 falling back to normal clone
89 89 requesting all changes
90 90 adding changesets
91 91 adding manifests
92 92 adding file changes
93 93 added 2 changesets with 2 changes to 2 files
94 94 new changesets 53245c60e682:aaff8d2ffbbf
95 95
96 96 Bundle with partial content works
97 97
98 98 $ hg -R server bundle --type gzip-v1 --base null -r 53245c60e682 partial.hg
99 99 1 changesets found
100 100
101 101 We verify exact bundle content as an extra check against accidental future
102 102 changes. If this output changes, we could break old clients.
103 103
104 104 $ f --size --hexdump partial.hg
105 105 partial.hg: size=207
106 106 0000: 48 47 31 30 47 5a 78 9c 63 60 60 98 17 ac 12 93 |HG10GZx.c``.....|
107 107 0010: f0 ac a9 23 45 70 cb bf 0d 5f 59 4e 4a 7f 79 21 |...#Ep..._YNJ.y!|
108 108 0020: 9b cc 40 24 20 a0 d7 ce 2c d1 38 25 cd 24 25 d5 |..@$ ...,.8%.$%.|
109 109 0030: d8 c2 22 cd 38 d9 24 cd 22 d5 c8 22 cd 24 cd 32 |..".8.$."..".$.2|
110 110 0040: d1 c2 d0 c4 c8 d2 32 d1 38 39 29 c9 34 cd d4 80 |......2.89).4...|
111 111 0050: ab 24 b5 b8 84 cb 40 c1 80 2b 2d 3f 9f 8b 2b 31 |.$....@..+-?..+1|
112 112 0060: 25 45 01 c8 80 9a d2 9b 65 fb e5 9e 45 bf 8d 7f |%E......e...E...|
113 113 0070: 9f c6 97 9f 2b 44 34 67 d9 ec 8e 0f a0 92 0b 75 |....+D4g.......u|
114 114 0080: 41 d6 24 59 18 a4 a4 9a a6 18 1a 5b 98 9b 5a 98 |A.$Y.......[..Z.|
115 115 0090: 9a 18 26 9b a6 19 98 1a 99 99 26 a6 18 9a 98 24 |..&.......&....$|
116 116 00a0: 26 59 a6 25 5a 98 a5 18 a6 24 71 41 35 b1 43 dc |&Y.%Z....$qA5.C.|
117 117 00b0: 16 b2 83 f7 e9 45 8b d2 56 c7 a3 1f 82 52 d7 8a |.....E..V....R..|
118 118 00c0: 78 ed fc d5 76 f1 36 35 dc 05 00 36 ed 5e c7 |x...v.65...6.^.|
119 119
120 120 $ echo "http://localhost:$HGPORT1/partial.hg" > server/.hg/clonebundles.manifest
121 121 $ hg clone -U http://localhost:$HGPORT partial-bundle
122 122 applying clone bundle from http://localhost:$HGPORT1/partial.hg
123 123 adding changesets
124 124 adding manifests
125 125 adding file changes
126 126 added 1 changesets with 1 changes to 1 files
127 127 finished applying clone bundle
128 128 searching for changes
129 129 adding changesets
130 130 adding manifests
131 131 adding file changes
132 132 added 1 changesets with 1 changes to 1 files
133 133 new changesets aaff8d2ffbbf
134 134 1 local changesets published
135 135
136 136 Incremental pull doesn't fetch bundle
137 137
138 138 $ hg clone -r 53245c60e682 -U http://localhost:$HGPORT partial-clone
139 139 adding changesets
140 140 adding manifests
141 141 adding file changes
142 142 added 1 changesets with 1 changes to 1 files
143 143 new changesets 53245c60e682
144 144
145 145 $ cd partial-clone
146 146 $ hg pull
147 147 pulling from http://localhost:$HGPORT/
148 148 searching for changes
149 149 adding changesets
150 150 adding manifests
151 151 adding file changes
152 152 added 1 changesets with 1 changes to 1 files
153 153 new changesets aaff8d2ffbbf
154 154 (run 'hg update' to get a working copy)
155 155 $ cd ..
156 156
157 157 Bundle with full content works
158 158
159 159 $ hg -R server bundle --type gzip-v2 --base null -r tip full.hg
160 160 2 changesets found
161 161
162 162 Again, we perform an extra check against bundle content changes. If this content
163 163 changes, clone bundles produced by new Mercurial versions may not be readable
164 164 by old clients.
165 165
166 166 $ f --size --hexdump full.hg
167 167 full.hg: size=442
168 168 0000: 48 47 32 30 00 00 00 0e 43 6f 6d 70 72 65 73 73 |HG20....Compress|
169 169 0010: 69 6f 6e 3d 47 5a 78 9c 63 60 60 d0 e4 76 f6 70 |ion=GZx.c``..v.p|
170 170 0020: f4 73 77 75 0f f2 0f 0d 60 00 02 46 46 76 26 4e |.swu....`..FFv&N|
171 171 0030: c6 b2 d4 a2 e2 cc fc 3c 03 a3 bc a4 e4 8c c4 bc |.......<........|
172 172 0040: f4 d4 62 23 06 06 e6 19 40 f9 4d c1 2a 31 09 cf |..b#....@.M.*1..|
173 173 0050: 9a 3a 52 04 b7 fc db f0 95 e5 a4 f4 97 17 b2 c9 |.:R.............|
174 174 0060: 0c 14 00 02 e6 d9 99 25 1a a7 a4 99 a4 a4 1a 5b |.......%.......[|
175 175 0070: 58 a4 19 27 9b a4 59 a4 1a 59 a4 99 a4 59 26 5a |X..'..Y..Y...Y&Z|
176 176 0080: 18 9a 18 59 5a 26 1a 27 27 25 99 a6 99 1a 70 95 |...YZ&.''%....p.|
177 177 0090: a4 16 97 70 19 28 18 70 a5 e5 e7 73 71 25 a6 a4 |...p.(.p...sq%..|
178 178 00a0: 28 00 19 20 17 af fa df ab ff 7b 3f fb 92 dc 8b |(.. ......{?....|
179 179 00b0: 1f 62 bb 9e b7 d7 d9 87 3d 5a 44 89 2f b0 99 87 |.b......=ZD./...|
180 180 00c0: ec e2 54 63 43 e3 b4 64 43 73 23 33 43 53 0b 63 |..TcC..dCs#3CS.c|
181 181 00d0: d3 14 23 03 a0 fb 2c 2c 0c d3 80 1e 30 49 49 b1 |..#...,,....0II.|
182 182 00e0: 4c 4a 32 48 33 30 b0 34 42 b8 38 29 b1 08 e2 62 |LJ2H30.4B.8)...b|
183 183 00f0: 20 03 6a ca c2 2c db 2f f7 2c fa 6d fc fb 34 be | .j..,./.,.m..4.|
184 184 0100: fc 5c 21 a2 39 cb 66 77 7c 00 0d c3 59 17 14 58 |.\!.9.fw|...Y..X|
185 185 0110: 49 16 06 29 a9 a6 29 86 c6 16 e6 a6 16 a6 26 86 |I..)..).......&.|
186 186 0120: c9 a6 69 06 a6 46 66 a6 89 29 86 26 26 89 49 96 |..i..Ff..).&&.I.|
187 187 0130: 69 89 16 66 29 86 29 49 5c 20 07 3e 16 fe 23 ae |i..f).)I\ .>..#.|
188 188 0140: 26 da 1c ab 10 1f d1 f8 e3 b3 ef cd dd fc 0c 93 |&...............|
189 189 0150: 88 75 34 36 75 04 82 55 17 14 36 a4 38 10 04 d8 |.u46u..U..6.8...|
190 190 0160: 21 01 9a b1 83 f7 e9 45 8b d2 56 c7 a3 1f 82 52 |!......E..V....R|
191 191 0170: d7 8a 78 ed fc d5 76 f1 36 25 81 89 c7 ad ec 90 |..x...v.6%......|
192 192 0180: 54 47 75 2b 89 48 b1 b2 62 c9 89 c9 19 a9 56 45 |TGu+.H..b.....VE|
193 193 0190: a9 65 ba 49 45 89 79 c9 19 ba 60 01 a0 14 23 58 |.e.IE.y...`...#X|
194 194 01a0: 81 35 c8 7d 40 cc 04 e2 a4 a4 a6 25 96 e6 94 60 |.5.}@......%...`|
195 195 01b0: 33 17 5f 54 00 00 d3 1b 0d 4c |3._T.....L|
196 196
197 197 $ echo "http://localhost:$HGPORT1/full.hg" > server/.hg/clonebundles.manifest
198 198 $ hg clone -U http://localhost:$HGPORT full-bundle
199 199 applying clone bundle from http://localhost:$HGPORT1/full.hg
200 200 adding changesets
201 201 adding manifests
202 202 adding file changes
203 203 added 2 changesets with 2 changes to 2 files
204 204 finished applying clone bundle
205 205 searching for changes
206 206 no changes found
207 207 2 local changesets published
208 208
209 209 Feature works over SSH
210 210
211 211 $ hg clone -U -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/server ssh-full-clone
212 212 applying clone bundle from http://localhost:$HGPORT1/full.hg
213 213 adding changesets
214 214 adding manifests
215 215 adding file changes
216 216 added 2 changesets with 2 changes to 2 files
217 217 finished applying clone bundle
218 218 searching for changes
219 219 no changes found
220 220 2 local changesets published
221 221
222 222 Entry with unknown BUNDLESPEC is filtered and not used
223 223
224 224 $ cat > server/.hg/clonebundles.manifest << EOF
225 225 > http://bad.entry1 BUNDLESPEC=UNKNOWN
226 226 > http://bad.entry2 BUNDLESPEC=xz-v1
227 227 > http://bad.entry3 BUNDLESPEC=none-v100
228 228 > http://localhost:$HGPORT1/full.hg BUNDLESPEC=gzip-v2
229 229 > EOF
230 230
231 231 $ hg clone -U http://localhost:$HGPORT filter-unknown-type
232 232 applying clone bundle from http://localhost:$HGPORT1/full.hg
233 233 adding changesets
234 234 adding manifests
235 235 adding file changes
236 236 added 2 changesets with 2 changes to 2 files
237 237 finished applying clone bundle
238 238 searching for changes
239 239 no changes found
240 240 2 local changesets published
241 241
242 242 Automatic fallback when all entries are filtered
243 243
244 244 $ cat > server/.hg/clonebundles.manifest << EOF
245 245 > http://bad.entry BUNDLESPEC=UNKNOWN
246 246 > EOF
247 247
248 248 $ hg clone -U http://localhost:$HGPORT filter-all
249 249 no compatible clone bundles available on server; falling back to regular clone
250 250 (you may want to report this to the server operator)
251 251 requesting all changes
252 252 adding changesets
253 253 adding manifests
254 254 adding file changes
255 255 added 2 changesets with 2 changes to 2 files
256 256 new changesets 53245c60e682:aaff8d2ffbbf
257 257
258 258 URLs requiring SNI are filtered in Python <2.7.9
259 259
260 260 $ cp full.hg sni.hg
261 261 $ cat > server/.hg/clonebundles.manifest << EOF
262 262 > http://localhost:$HGPORT1/sni.hg REQUIRESNI=true
263 263 > http://localhost:$HGPORT1/full.hg
264 264 > EOF
265 265
266 266 #if sslcontext
267 267 Python 2.7.9+ support SNI
268 268
269 269 $ hg clone -U http://localhost:$HGPORT sni-supported
270 270 applying clone bundle from http://localhost:$HGPORT1/sni.hg
271 271 adding changesets
272 272 adding manifests
273 273 adding file changes
274 274 added 2 changesets with 2 changes to 2 files
275 275 finished applying clone bundle
276 276 searching for changes
277 277 no changes found
278 278 2 local changesets published
279 279 #else
280 280 Python <2.7.9 will filter SNI URLs
281 281
282 282 $ hg clone -U http://localhost:$HGPORT sni-unsupported
283 283 applying clone bundle from http://localhost:$HGPORT1/full.hg
284 284 adding changesets
285 285 adding manifests
286 286 adding file changes
287 287 added 2 changesets with 2 changes to 2 files
288 288 finished applying clone bundle
289 289 searching for changes
290 290 no changes found
291 291 2 local changesets published
292 292 #endif
293 293
294 294 Stream clone bundles are supported
295 295
296 296 $ hg -R server debugcreatestreamclonebundle packed.hg
297 297 writing 613 bytes for 4 files
298 298 bundle requirements: generaldelta, revlogv1
299 299
300 300 No bundle spec should work
301 301
302 302 $ cat > server/.hg/clonebundles.manifest << EOF
303 303 > http://localhost:$HGPORT1/packed.hg
304 304 > EOF
305 305
306 306 $ hg clone -U http://localhost:$HGPORT stream-clone-no-spec
307 307 applying clone bundle from http://localhost:$HGPORT1/packed.hg
308 308 4 files to transfer, 613 bytes of data
309 309 transferred 613 bytes in *.* seconds (*) (glob)
310 310 finished applying clone bundle
311 311 searching for changes
312 312 no changes found
313 313
314 314 Bundle spec without parameters should work
315 315
316 316 $ cat > server/.hg/clonebundles.manifest << EOF
317 317 > http://localhost:$HGPORT1/packed.hg BUNDLESPEC=none-packed1
318 318 > EOF
319 319
320 320 $ hg clone -U http://localhost:$HGPORT stream-clone-vanilla-spec
321 321 applying clone bundle from http://localhost:$HGPORT1/packed.hg
322 322 4 files to transfer, 613 bytes of data
323 323 transferred 613 bytes in *.* seconds (*) (glob)
324 324 finished applying clone bundle
325 325 searching for changes
326 326 no changes found
327 327
328 328 Bundle spec with format requirements should work
329 329
330 330 $ cat > server/.hg/clonebundles.manifest << EOF
331 331 > http://localhost:$HGPORT1/packed.hg BUNDLESPEC=none-packed1;requirements%3Drevlogv1
332 332 > EOF
333 333
334 334 $ hg clone -U http://localhost:$HGPORT stream-clone-supported-requirements
335 335 applying clone bundle from http://localhost:$HGPORT1/packed.hg
336 336 4 files to transfer, 613 bytes of data
337 337 transferred 613 bytes in *.* seconds (*) (glob)
338 338 finished applying clone bundle
339 339 searching for changes
340 340 no changes found
341 341
342 342 Stream bundle spec with unknown requirements should be filtered out
343 343
344 344 $ cat > server/.hg/clonebundles.manifest << EOF
345 345 > http://localhost:$HGPORT1/packed.hg BUNDLESPEC=none-packed1;requirements%3Drevlogv42
346 346 > EOF
347 347
348 348 $ hg clone -U http://localhost:$HGPORT stream-clone-unsupported-requirements
349 349 no compatible clone bundles available on server; falling back to regular clone
350 350 (you may want to report this to the server operator)
351 351 requesting all changes
352 352 adding changesets
353 353 adding manifests
354 354 adding file changes
355 355 added 2 changesets with 2 changes to 2 files
356 356 new changesets 53245c60e682:aaff8d2ffbbf
357 357
358 358 Set up manifest for testing preferences
359 359 (Remember, the TYPE does not have to match reality - the URL is
360 360 important)
361 361
362 362 $ cp full.hg gz-a.hg
363 363 $ cp full.hg gz-b.hg
364 364 $ cp full.hg bz2-a.hg
365 365 $ cp full.hg bz2-b.hg
366 366 $ cat > server/.hg/clonebundles.manifest << EOF
367 367 > http://localhost:$HGPORT1/gz-a.hg BUNDLESPEC=gzip-v2 extra=a
368 368 > http://localhost:$HGPORT1/bz2-a.hg BUNDLESPEC=bzip2-v2 extra=a
369 369 > http://localhost:$HGPORT1/gz-b.hg BUNDLESPEC=gzip-v2 extra=b
370 370 > http://localhost:$HGPORT1/bz2-b.hg BUNDLESPEC=bzip2-v2 extra=b
371 371 > EOF
372 372
373 373 Preferring an undefined attribute will take first entry
374 374
375 375 $ hg --config ui.clonebundleprefers=foo=bar clone -U http://localhost:$HGPORT prefer-foo
376 376 applying clone bundle from http://localhost:$HGPORT1/gz-a.hg
377 377 adding changesets
378 378 adding manifests
379 379 adding file changes
380 380 added 2 changesets with 2 changes to 2 files
381 381 finished applying clone bundle
382 382 searching for changes
383 383 no changes found
384 384 2 local changesets published
385 385
386 386 Preferring bz2 type will download first entry of that type
387 387
388 388 $ hg --config ui.clonebundleprefers=COMPRESSION=bzip2 clone -U http://localhost:$HGPORT prefer-bz
389 389 applying clone bundle from http://localhost:$HGPORT1/bz2-a.hg
390 390 adding changesets
391 391 adding manifests
392 392 adding file changes
393 393 added 2 changesets with 2 changes to 2 files
394 394 finished applying clone bundle
395 395 searching for changes
396 396 no changes found
397 397 2 local changesets published
398 398
399 399 Preferring multiple values of an option works
400 400
401 401 $ hg --config ui.clonebundleprefers=COMPRESSION=unknown,COMPRESSION=bzip2 clone -U http://localhost:$HGPORT prefer-multiple-bz
402 402 applying clone bundle from http://localhost:$HGPORT1/bz2-a.hg
403 403 adding changesets
404 404 adding manifests
405 405 adding file changes
406 406 added 2 changesets with 2 changes to 2 files
407 407 finished applying clone bundle
408 408 searching for changes
409 409 no changes found
410 410 2 local changesets published
411 411
412 412 Sorting multiple values should get us back to original first entry
413 413
414 414 $ hg --config ui.clonebundleprefers=BUNDLESPEC=unknown,BUNDLESPEC=gzip-v2,BUNDLESPEC=bzip2-v2 clone -U http://localhost:$HGPORT prefer-multiple-gz
415 415 applying clone bundle from http://localhost:$HGPORT1/gz-a.hg
416 416 adding changesets
417 417 adding manifests
418 418 adding file changes
419 419 added 2 changesets with 2 changes to 2 files
420 420 finished applying clone bundle
421 421 searching for changes
422 422 no changes found
423 423 2 local changesets published
424 424
425 425 Preferring multiple attributes has correct order
426 426
427 427 $ hg --config ui.clonebundleprefers=extra=b,BUNDLESPEC=bzip2-v2 clone -U http://localhost:$HGPORT prefer-separate-attributes
428 428 applying clone bundle from http://localhost:$HGPORT1/bz2-b.hg
429 429 adding changesets
430 430 adding manifests
431 431 adding file changes
432 432 added 2 changesets with 2 changes to 2 files
433 433 finished applying clone bundle
434 434 searching for changes
435 435 no changes found
436 436 2 local changesets published
437 437
438 438 Test where attribute is missing from some entries
439 439
440 440 $ cat > server/.hg/clonebundles.manifest << EOF
441 441 > http://localhost:$HGPORT1/gz-a.hg BUNDLESPEC=gzip-v2
442 442 > http://localhost:$HGPORT1/bz2-a.hg BUNDLESPEC=bzip2-v2
443 443 > http://localhost:$HGPORT1/gz-b.hg BUNDLESPEC=gzip-v2 extra=b
444 444 > http://localhost:$HGPORT1/bz2-b.hg BUNDLESPEC=bzip2-v2 extra=b
445 445 > EOF
446 446
447 447 $ hg --config ui.clonebundleprefers=extra=b clone -U http://localhost:$HGPORT prefer-partially-defined-attribute
448 448 applying clone bundle from http://localhost:$HGPORT1/gz-b.hg
449 449 adding changesets
450 450 adding manifests
451 451 adding file changes
452 452 added 2 changesets with 2 changes to 2 files
453 453 finished applying clone bundle
454 454 searching for changes
455 455 no changes found
456 456 2 local changesets published
457 457
458 458 Test interaction between clone bundles and --stream
459 459
460 460 A manifest with just a gzip bundle
461 461
462 462 $ cat > server/.hg/clonebundles.manifest << EOF
463 463 > http://localhost:$HGPORT1/gz-a.hg BUNDLESPEC=gzip-v2
464 464 > EOF
465 465
466 466 $ hg clone -U --stream http://localhost:$HGPORT uncompressed-gzip
467 467 no compatible clone bundles available on server; falling back to regular clone
468 468 (you may want to report this to the server operator)
469 469 streaming all changes
470 470 9 files to transfer, 816 bytes of data
471 471 transferred 816 bytes in * seconds (*) (glob)
472 472
473 473 A manifest with a stream clone but no BUNDLESPEC
474 474
475 475 $ cat > server/.hg/clonebundles.manifest << EOF
476 476 > http://localhost:$HGPORT1/packed.hg
477 477 > EOF
478 478
479 479 $ hg clone -U --stream http://localhost:$HGPORT uncompressed-no-bundlespec
480 480 no compatible clone bundles available on server; falling back to regular clone
481 481 (you may want to report this to the server operator)
482 482 streaming all changes
483 483 9 files to transfer, 816 bytes of data
484 484 transferred 816 bytes in * seconds (*) (glob)
485 485
486 486 A manifest with a gzip bundle and a stream clone
487 487
488 488 $ cat > server/.hg/clonebundles.manifest << EOF
489 489 > http://localhost:$HGPORT1/gz-a.hg BUNDLESPEC=gzip-v2
490 490 > http://localhost:$HGPORT1/packed.hg BUNDLESPEC=none-packed1
491 491 > EOF
492 492
493 493 $ hg clone -U --stream http://localhost:$HGPORT uncompressed-gzip-packed
494 494 applying clone bundle from http://localhost:$HGPORT1/packed.hg
495 495 4 files to transfer, 613 bytes of data
496 496 transferred 613 bytes in * seconds (*) (glob)
497 497 finished applying clone bundle
498 498 searching for changes
499 499 no changes found
500 500
501 501 A manifest with a gzip bundle and stream clone with supported requirements
502 502
503 503 $ cat > server/.hg/clonebundles.manifest << EOF
504 504 > http://localhost:$HGPORT1/gz-a.hg BUNDLESPEC=gzip-v2
505 505 > http://localhost:$HGPORT1/packed.hg BUNDLESPEC=none-packed1;requirements%3Drevlogv1
506 506 > EOF
507 507
508 508 $ hg clone -U --stream http://localhost:$HGPORT uncompressed-gzip-packed-requirements
509 509 applying clone bundle from http://localhost:$HGPORT1/packed.hg
510 510 4 files to transfer, 613 bytes of data
511 511 transferred 613 bytes in * seconds (*) (glob)
512 512 finished applying clone bundle
513 513 searching for changes
514 514 no changes found
515 515
516 516 A manifest with a gzip bundle and a stream clone with unsupported requirements
517 517
518 518 $ cat > server/.hg/clonebundles.manifest << EOF
519 519 > http://localhost:$HGPORT1/gz-a.hg BUNDLESPEC=gzip-v2
520 520 > http://localhost:$HGPORT1/packed.hg BUNDLESPEC=none-packed1;requirements%3Drevlogv42
521 521 > EOF
522 522
523 523 $ hg clone -U --stream http://localhost:$HGPORT uncompressed-gzip-packed-unsupported-requirements
524 524 no compatible clone bundles available on server; falling back to regular clone
525 525 (you may want to report this to the server operator)
526 526 streaming all changes
527 527 9 files to transfer, 816 bytes of data
528 528 transferred 816 bytes in * seconds (*) (glob)
529 529
530 530 Test clone bundle retrieved through bundle2
531 531
532 532 $ cat << EOF >> $HGRCPATH
533 533 > [extensions]
534 534 > largefiles=
535 535 > EOF
536 536 $ killdaemons.py
537 537 $ hg -R server serve -d -p $HGPORT --pid-file hg.pid --accesslog access.log
538 538 $ cat hg.pid >> $DAEMON_PIDS
539 539
540 540 $ hg -R server debuglfput gz-a.hg
541 541 1f74b3d08286b9b3a16fb3fa185dd29219cbc6ae
542 542
543 543 $ cat > server/.hg/clonebundles.manifest << EOF
544 544 > largefile://1f74b3d08286b9b3a16fb3fa185dd29219cbc6ae BUNDLESPEC=gzip-v2
545 545 > EOF
546 546
547 547 $ hg clone -U http://localhost:$HGPORT largefile-provided --traceback
548 548 applying clone bundle from largefile://1f74b3d08286b9b3a16fb3fa185dd29219cbc6ae
549 549 adding changesets
550 550 adding manifests
551 551 adding file changes
552 552 added 2 changesets with 2 changes to 2 files
553 553 finished applying clone bundle
554 554 searching for changes
555 555 no changes found
556 556 2 local changesets published
General Comments 0
You need to be logged in to leave comments. Login now