comparison tests/test-ssh.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 5abc47d4ca6b
children d059cb669632
comparison
equal deleted inserted replaced
39721:1b5880352314 39722:4bd6e444c76f
58 58
59 #if no-reposimplestore 59 #if no-reposimplestore
60 60
61 $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" --stream ssh://user@dummy/remote local-stream 61 $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" --stream ssh://user@dummy/remote local-stream
62 streaming all changes 62 streaming all changes
63 4 files to transfer, 602 bytes of data 63 8 files to transfer, 827 bytes of data
64 transferred 602 bytes in * seconds (*) (glob) 64 transferred 827 bytes in * seconds (*) (glob)
65 searching for changes
66 no changes found
67 updating to branch default 65 updating to branch default
68 2 files updated, 0 files merged, 0 files removed, 0 files unresolved 66 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
69 $ cd local-stream 67 $ cd local-stream
70 $ hg verify 68 $ hg verify
71 checking changesets 69 checking changesets
80 clone bookmarks via stream 78 clone bookmarks via stream
81 79
82 $ hg -R local-stream book mybook 80 $ hg -R local-stream book mybook
83 $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" --stream ssh://user@dummy/local-stream stream2 81 $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" --stream ssh://user@dummy/local-stream stream2
84 streaming all changes 82 streaming all changes
85 4 files to transfer, 602 bytes of data 83 9 files to transfer, 870 bytes of data
86 transferred 602 bytes in * seconds (*) (glob) 84 transferred 870 bytes in * seconds (*) (glob)
87 searching for changes
88 no changes found
89 updating to branch default 85 updating to branch default
90 2 files updated, 0 files merged, 0 files removed, 0 files unresolved 86 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
91 $ cd stream2 87 $ cd stream2
92 $ hg book 88 $ hg book
93 mybook 0:1160648e36ce 89 mybook 0:1160648e36ce
495 sending upgrade request: * proto=exp-ssh-v2-0001 (glob) (sshv2 !) 491 sending upgrade request: * proto=exp-ssh-v2-0001 (glob) (sshv2 !)
496 devel-peer-request: hello+between 492 devel-peer-request: hello+between
497 devel-peer-request: pairs: 81 bytes 493 devel-peer-request: pairs: 81 bytes
498 sending hello command 494 sending hello command
499 sending between command 495 sending between command
500 remote: 413 (sshv1 !) 496 remote: 427 (sshv1 !)
501 protocol upgraded to exp-ssh-v2-0001 (sshv2 !) 497 protocol upgraded to exp-ssh-v2-0001 (sshv2 !)
502 remote: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash 498 remote: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
503 remote: 1 (sshv1 !) 499 remote: 1 (sshv1 !)
504 devel-peer-request: protocaps 500 devel-peer-request: protocaps
505 devel-peer-request: caps: * bytes (glob) 501 devel-peer-request: caps: * bytes (glob)
506 sending protocaps command 502 sending protocaps command
507 query 1; heads 503 query 1; heads