comparison tests/test-clonebundles.t @ 39722:4bd6e444c76f

bundle2: make server.bundle2.stream default to True Support for bundle2 streaming clones has been shipped in Mercurial 4.5 (7eedbd5d4880), but was never activated by default. It's time to have more people use it. The new format allows streaming clones to transport cache (hooray for speed) and phaseroots (fixes phase-related issues). Changes in tests: bundle2 capabilities now have "stream=v2" (plus a '\n' as a separator) and therefore take 14 bytes more: "%0Astream%3Dv2". Tip for tests that have data encoded with CBOR: 0xd3 - 0xc5 = 14. $USUAL_BUNDLE2_CAPS$ replaces $USUAL_BUNDLE2_CAPS_SERVER$, which is the same thing, but without "stream=v2". Since streaming clones now also transfer caches, the reported byte and file counts are higher (e.g. 816 bytes in 9 files instead of 613 bytes in 4 files, a bit of --debug and manual math confirms that the caches take these extra 203 bytes in 5 files). Differential Revision: https://phab.mercurial-scm.org/D4680
author Anton Shestakov <av6@dwimlabs.net>
date Mon, 17 Sep 2018 17:47:24 +0800
parents c9e6ca31cfe7
children 393e44324037
comparison
equal deleted inserted replaced
39721:1b5880352314 39722:4bd6e444c76f
463 463
464 $ hg clone -U --stream http://localhost:$HGPORT uncompressed-gzip 464 $ hg clone -U --stream http://localhost:$HGPORT uncompressed-gzip
465 no compatible clone bundles available on server; falling back to regular clone 465 no compatible clone bundles available on server; falling back to regular clone
466 (you may want to report this to the server operator) 466 (you may want to report this to the server operator)
467 streaming all changes 467 streaming all changes
468 4 files to transfer, 613 bytes of data 468 9 files to transfer, 816 bytes of data
469 transferred 613 bytes in * seconds (*) (glob) 469 transferred 816 bytes in * seconds (*) (glob)
470 searching for changes
471 no changes found
472 470
473 A manifest with a stream clone but no BUNDLESPEC 471 A manifest with a stream clone but no BUNDLESPEC
474 472
475 $ cat > server/.hg/clonebundles.manifest << EOF 473 $ cat > server/.hg/clonebundles.manifest << EOF
476 > http://localhost:$HGPORT1/packed.hg 474 > http://localhost:$HGPORT1/packed.hg
478 476
479 $ hg clone -U --stream http://localhost:$HGPORT uncompressed-no-bundlespec 477 $ hg clone -U --stream http://localhost:$HGPORT uncompressed-no-bundlespec
480 no compatible clone bundles available on server; falling back to regular clone 478 no compatible clone bundles available on server; falling back to regular clone
481 (you may want to report this to the server operator) 479 (you may want to report this to the server operator)
482 streaming all changes 480 streaming all changes
483 4 files to transfer, 613 bytes of data 481 9 files to transfer, 816 bytes of data
484 transferred 613 bytes in * seconds (*) (glob) 482 transferred 816 bytes in * seconds (*) (glob)
485 searching for changes
486 no changes found
487 483
488 A manifest with a gzip bundle and a stream clone 484 A manifest with a gzip bundle and a stream clone
489 485
490 $ cat > server/.hg/clonebundles.manifest << EOF 486 $ cat > server/.hg/clonebundles.manifest << EOF
491 > http://localhost:$HGPORT1/gz-a.hg BUNDLESPEC=gzip-v2 487 > http://localhost:$HGPORT1/gz-a.hg BUNDLESPEC=gzip-v2
524 520
525 $ hg clone -U --stream http://localhost:$HGPORT uncompressed-gzip-packed-unsupported-requirements 521 $ hg clone -U --stream http://localhost:$HGPORT uncompressed-gzip-packed-unsupported-requirements
526 no compatible clone bundles available on server; falling back to regular clone 522 no compatible clone bundles available on server; falling back to regular clone
527 (you may want to report this to the server operator) 523 (you may want to report this to the server operator)
528 streaming all changes 524 streaming all changes
529 4 files to transfer, 613 bytes of data 525 9 files to transfer, 816 bytes of data
530 transferred 613 bytes in * seconds (*) (glob) 526 transferred 816 bytes in * seconds (*) (glob)
531 searching for changes
532 no changes found
533 527
534 Test clone bundle retrieved through bundle2 528 Test clone bundle retrieved through bundle2
535 529
536 $ cat << EOF >> $HGRCPATH 530 $ cat << EOF >> $HGRCPATH
537 > [extensions] 531 > [extensions]