##// END OF EJS Templates
exchange: support streaming clone bundles in clone bundles...
Gregory Szorc -
r26761:8270ee35 default
parent child Browse files
Show More
@@ -1832,6 +1832,8 b' def trypullbundlefromurl(ui, repo, url):'
1832
1832
1833 if isinstance(cg, bundle2.unbundle20):
1833 if isinstance(cg, bundle2.unbundle20):
1834 bundle2.processbundle(repo, cg, lambda: tr)
1834 bundle2.processbundle(repo, cg, lambda: tr)
1835 elif isinstance(cg, streamclone.streamcloneapplier):
1836 cg.apply(repo)
1835 else:
1837 else:
1836 cg.apply(repo, 'clonebundles', url)
1838 cg.apply(repo, 'clonebundles', url)
1837 tr.close()
1839 tr.close()
@@ -273,6 +273,69 b' Python <2.7.9 will filter SNI URLs'
273 no changes found
273 no changes found
274 #endif
274 #endif
275
275
276 Stream clone bundles are supported
277
278 $ hg -R server debugcreatestreamclonebundle packed.hg
279 writing 613 bytes for 4 files
280 bundle requirements: revlogv1
281
282 No bundle spec should work
283
284 $ cat > server/.hg/clonebundles.manifest << EOF
285 > http://localhost:$HGPORT1/packed.hg
286 > EOF
287
288 $ hg clone -U http://localhost:$HGPORT stream-clone-no-spec
289 applying clone bundle from http://localhost:$HGPORT1/packed.hg
290 4 files to transfer, 613 bytes of data
291 transferred 613 bytes in *.* seconds (*) (glob)
292 finished applying clone bundle
293 searching for changes
294 no changes found
295
296 Bundle spec without parameters should work
297
298 $ cat > server/.hg/clonebundles.manifest << EOF
299 > http://localhost:$HGPORT1/packed.hg BUNDLESPEC=none-packed1
300 > EOF
301
302 $ hg clone -U http://localhost:$HGPORT stream-clone-vanilla-spec
303 applying clone bundle from http://localhost:$HGPORT1/packed.hg
304 4 files to transfer, 613 bytes of data
305 transferred 613 bytes in *.* seconds (*) (glob)
306 finished applying clone bundle
307 searching for changes
308 no changes found
309
310 Bundle spec with format requirements should work
311
312 $ cat > server/.hg/clonebundles.manifest << EOF
313 > http://localhost:$HGPORT1/packed.hg BUNDLESPEC=none-packed1;requirements%3Drevlogv1
314 > EOF
315
316 $ hg clone -U http://localhost:$HGPORT stream-clone-supported-requirements
317 applying clone bundle from http://localhost:$HGPORT1/packed.hg
318 4 files to transfer, 613 bytes of data
319 transferred 613 bytes in *.* seconds (*) (glob)
320 finished applying clone bundle
321 searching for changes
322 no changes found
323
324 Stream bundle spec with unknown requirements should be filtered out
325
326 $ cat > server/.hg/clonebundles.manifest << EOF
327 > http://localhost:$HGPORT1/packed.hg BUNDLESPEC=none-packed1;requirements%3Drevlogv42
328 > EOF
329
330 $ hg clone -U http://localhost:$HGPORT stream-clone-unsupported-requirements
331 no compatible clone bundles available on server; falling back to regular clone
332 (you may want to report this to the server operator)
333 requesting all changes
334 adding changesets
335 adding manifests
336 adding file changes
337 added 2 changesets with 2 changes to 2 files
338
276 Set up manifest for testing preferences
339 Set up manifest for testing preferences
277 (Remember, the TYPE does not have to match reality - the URL is
340 (Remember, the TYPE does not have to match reality - the URL is
278 important)
341 important)
General Comments 0
You need to be logged in to leave comments. Login now