--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-pullbundle.t Sun Sep 23 23:53:23 2018 +0200
@@ -0,0 +1,208 @@
+ $ . "$TESTDIR/testlib/pythonpath.sh"
+
+ $ cat << EOF >> $HGRCPATH
+ > [extensions]
+ > pullbundle=
+ > EOF
+
+basic setup
+
+ $ hg init server
+ $ hg -R server debugbuilddag '.+898:branchpoint+352:mergepoint+267<branchpoint+145/mergepoint+467'
+ $ hg init client
+
+simple initial pull
+-------------------
+
+ $ hg -R client pull server -r 1234 --debug --config devel.bundle2.debug=yes | grep -v 'add changeset'
+ pulling from server
+ query 1; heads
+ 1235 changesets found
+ listing keys for "bookmarks"
+ bundle2-output-bundle: "HG20", 4 parts total
+ bundle2-output: start emission of HG20 stream
+ bundle2-output: bundle parameter:
+ bundle2-output: start of parts
+ bundle2-output: bundle part: "changegroup"
+ bundle2-output-part: "changegroup" (params: 1 mandatory 1 advisory) streamed payload
+ bundle2-output: part 0: "CHANGEGROUP"
+ bundle2-output: header chunk size: 44
+ bundle2-output: payload chunk size: 32768
+ bundle2-output: payload chunk size: 32768
+ bundle2-output: payload chunk size: 32768
+ bundle2-output: payload chunk size: 32768
+ bundle2-output: payload chunk size: 32768
+ bundle2-output: payload chunk size: 32768
+ bundle2-output: payload chunk size: 28424
+ bundle2-output: closing payload chunk
+ bundle2-output: bundle part: "listkeys"
+ bundle2-output-part: "listkeys" (params: 1 mandatory) empty payload
+ bundle2-output: part 1: "LISTKEYS"
+ bundle2-output: header chunk size: 35
+ bundle2-output: closing payload chunk
+ bundle2-output: bundle part: "phase-heads"
+ bundle2-output-part: "phase-heads" 24 bytes payload
+ bundle2-output: part 2: "PHASE-HEADS"
+ bundle2-output: header chunk size: 18
+ bundle2-output: payload chunk size: 24
+ bundle2-output: closing payload chunk
+ bundle2-output: bundle part: "cache:rev-branch-cache"
+ bundle2-output-part: "cache:rev-branch-cache" (advisory) streamed payload
+ bundle2-output: part 3: "cache:rev-branch-cache"
+ bundle2-output: header chunk size: 29
+ bundle2-output: payload chunk size: 24719
+ bundle2-output: closing payload chunk
+ bundle2-output: end of bundle
+ bundle2-input: start processing of HG20 stream
+ bundle2-input: reading bundle2 stream parameters
+ bundle2-input-bundle: with-transaction
+ bundle2-input: start extraction of bundle2 parts
+ bundle2-input: part header size: 44
+ bundle2-input: part type: "CHANGEGROUP"
+ bundle2-input: part id: "0"
+ bundle2-input: part parameters: 2
+ bundle2-input: found a handler for part changegroup
+ bundle2-input-part: "changegroup" (params: 1 mandatory 1 advisory) supported
+ adding changesets
+ bundle2-input: payload chunk size: 32768
+ bundle2-input: payload chunk size: 32768
+ bundle2-input: payload chunk size: 32768
+ bundle2-input: payload chunk size: 32768
+ bundle2-input: payload chunk size: 32768
+ bundle2-input: payload chunk size: 32768
+ bundle2-input: payload chunk size: 28424
+ bundle2-input: payload chunk size: 0
+ adding manifests
+ adding file changes
+ added 1235 changesets with 0 changes to 0 files
+ bundle2-input-part: total payload size 225032
+ bundle2-input: part header size: 35
+ bundle2-input: part type: "LISTKEYS"
+ bundle2-input: part id: "1"
+ bundle2-input: part parameters: 1
+ bundle2-input: found a handler for part listkeys
+ bundle2-input-part: "listkeys" (params: 1 mandatory) supported
+ bundle2-input: payload chunk size: 0
+ bundle2-input: part header size: 18
+ bundle2-input: part type: "PHASE-HEADS"
+ bundle2-input: part id: "2"
+ bundle2-input: part parameters: 0
+ bundle2-input: found a handler for part phase-heads
+ bundle2-input-part: "phase-heads" supported
+ bundle2-input: payload chunk size: 24
+ bundle2-input: payload chunk size: 0
+ bundle2-input-part: total payload size 24
+ bundle2-input: part header size: 29
+ bundle2-input: part type: "cache:rev-branch-cache"
+ bundle2-input: part id: "3"
+ bundle2-input: part parameters: 0
+ bundle2-input: found a handler for part cache:rev-branch-cache
+ bundle2-input-part: "cache:rev-branch-cache" (advisory) supported
+ bundle2-input: payload chunk size: 24719
+ bundle2-input: payload chunk size: 0
+ bundle2-input-part: total payload size 24719
+ bundle2-input: part header size: 0
+ bundle2-input: end of bundle2 stream
+ bundle2-input-bundle: 3 parts total
+ checking for updated bookmarks
+ updating the branch cache
+ new changesets 1ea73414a91b:f864bc82f6a2
+ (run 'hg update' to get a working copy)
+
+pull the other missing entries (multiple heads pulled)
+------------------------------------------------------
+
+ $ hg -R client pull server --debug --config devel.bundle2.debug=yes | grep -v 'add changeset'
+ pulling from server
+ query 1; heads
+ searching for changes
+ all local heads known remotely
+ 896 changesets found
+ listing keys for "bookmarks"
+ bundle2-output-bundle: "HG20", 4 parts total
+ bundle2-output: start emission of HG20 stream
+ bundle2-output: bundle parameter:
+ bundle2-output: start of parts
+ bundle2-output: bundle part: "changegroup"
+ bundle2-output-part: "changegroup" (params: 1 mandatory 1 advisory) streamed payload
+ bundle2-output: part 0: "CHANGEGROUP"
+ bundle2-output: header chunk size: 43
+ bundle2-output: payload chunk size: 32768
+ bundle2-output: payload chunk size: 32768
+ bundle2-output: payload chunk size: 32768
+ bundle2-output: payload chunk size: 32768
+ bundle2-output: payload chunk size: 32768
+ bundle2-output: payload chunk size: 1036
+ bundle2-output: closing payload chunk
+ bundle2-output: bundle part: "listkeys"
+ bundle2-output-part: "listkeys" (params: 1 mandatory) empty payload
+ bundle2-output: part 1: "LISTKEYS"
+ bundle2-output: header chunk size: 35
+ bundle2-output: closing payload chunk
+ bundle2-output: bundle part: "phase-heads"
+ bundle2-output-part: "phase-heads" 48 bytes payload
+ bundle2-output: part 2: "PHASE-HEADS"
+ bundle2-output: header chunk size: 18
+ bundle2-output: payload chunk size: 48
+ bundle2-output: closing payload chunk
+ bundle2-output: bundle part: "cache:rev-branch-cache"
+ bundle2-output-part: "cache:rev-branch-cache" (advisory) streamed payload
+ bundle2-output: part 3: "cache:rev-branch-cache"
+ bundle2-output: header chunk size: 29
+ bundle2-output: payload chunk size: 17939
+ bundle2-output: closing payload chunk
+ bundle2-output: end of bundle
+ bundle2-input: start processing of HG20 stream
+ bundle2-input: reading bundle2 stream parameters
+ bundle2-input-bundle: with-transaction
+ bundle2-input: start extraction of bundle2 parts
+ bundle2-input: part header size: 43
+ bundle2-input: part type: "CHANGEGROUP"
+ bundle2-input: part id: "0"
+ bundle2-input: part parameters: 2
+ bundle2-input: found a handler for part changegroup
+ bundle2-input-part: "changegroup" (params: 1 mandatory 1 advisory) supported
+ adding changesets
+ bundle2-input: payload chunk size: 32768
+ bundle2-input: payload chunk size: 32768
+ bundle2-input: payload chunk size: 32768
+ bundle2-input: payload chunk size: 32768
+ bundle2-input: payload chunk size: 32768
+ bundle2-input: payload chunk size: 1036
+ bundle2-input: payload chunk size: 0
+ adding manifests
+ adding file changes
+ added 896 changesets with 0 changes to 0 files (+1 heads)
+ bundle2-input-part: total payload size 164876
+ bundle2-input: part header size: 35
+ bundle2-input: part type: "LISTKEYS"
+ bundle2-input: part id: "1"
+ bundle2-input: part parameters: 1
+ bundle2-input: found a handler for part listkeys
+ bundle2-input-part: "listkeys" (params: 1 mandatory) supported
+ bundle2-input: payload chunk size: 0
+ bundle2-input: part header size: 18
+ bundle2-input: part type: "PHASE-HEADS"
+ bundle2-input: part id: "2"
+ bundle2-input: part parameters: 0
+ bundle2-input: found a handler for part phase-heads
+ bundle2-input-part: "phase-heads" supported
+ bundle2-input: payload chunk size: 48
+ bundle2-input: payload chunk size: 0
+ bundle2-input-part: total payload size 48
+ bundle2-input: part header size: 29
+ bundle2-input: part type: "cache:rev-branch-cache"
+ bundle2-input: part id: "3"
+ bundle2-input: part parameters: 0
+ bundle2-input: found a handler for part cache:rev-branch-cache
+ bundle2-input-part: "cache:rev-branch-cache" (advisory) supported
+ bundle2-input: payload chunk size: 17939
+ bundle2-input: payload chunk size: 0
+ bundle2-input-part: total payload size 17939
+ bundle2-input: part header size: 0
+ bundle2-input: end of bundle2 stream
+ bundle2-input-bundle: 3 parts total
+ checking for updated bookmarks
+ updating the branch cache
+ new changesets 17185c1c22f1:0f376356904f
+ (run 'hg heads' to see heads, 'hg merge' to merge)