changeset 4138:cfdc6f55599b

pullbundle: improve slicing of the lower part of range The previous method could get confuse by merge and overslice. The new method is better at using sticking on power of two boundaries.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Tue, 25 Sep 2018 12:20:26 +0200
parents 21a3c051ca6c
children 2bd652bece97
files hgext3rd/pullbundle.py tests/test-pullbundle.t
diffstat 2 files changed, 210 insertions(+), 1315 deletions(-) [+]
line wrap: on
line diff
--- a/hgext3rd/pullbundle.py	Tue Sep 25 12:19:41 2018 +0200
+++ b/hgext3rd/pullbundle.py	Tue Sep 25 12:20:26 2018 +0200
@@ -213,6 +213,16 @@
         size = rangelength(rangeid)
         slices.append((rangeid, nodes[idx:idx + size]))
         idx += size
+    ### slow code block to validate ranges content
+    # rev = repo.changelog.nodemap.get
+    # for ri, ns in slices:
+    #     a = set(rev(n) for n in ns)
+    #     b = set(repo.stablerange.revsfromrange(repo, ri))
+    #     l = repo.stablerange.rangelength(repo, ri)
+    #     repo.ui.write('range-length: %d-%d %s %s\n' % (ri[0], ri[1], l, len(a)))
+    #     if a != b:
+    #         d =  (ri[0], ri[1], b - a, a - b)
+    #         repo.ui.write("mismatching content: %d-%d -%s +%s\n" % d)
     return slices
 
 def canonicalsubranges(repo, stablerange, rangeid):
@@ -246,38 +256,51 @@
 
     # 2. optimise, bottom part
     if skip != cut:
-        tailranges = []
-        tailsize = cut - skip
+        currentsize = tailsize = cut - skip
         assert 0 < tailsize, tailsize
+
+        # we need to take several "standard cut" in the bottom part
+        #
+        # This is similar to what we will do for the top part, we reusing the
+        # existing structure is a bit more complex.
+        allcuts = list(reversed(standardcut(tailsize)))
         prerange = (headrev, precut)
-        size = stablerange.rangelength(repo, prerange)
-        sub = stablerange.subranges(repo, prerange)[:-1]
-        # This power of two check is too simplistic and misbehave when too many
-        # merge are involved. because de merge, there can be "canonical" range
-        # with various size.
-        while not poweroftwo(tailsize):
-            for prerange in reversed(sub):
-                if tailsize <= 0:
-                    break
+        ### slow code block to check we operate on the right data
+        # rev = repo.changelog.nodemap.get
+        # allrevs = [rev(n) for n in nodes]
+        # allrevs.reverse()
+        # prerevs = repo.stablerange.revsfromrange(repo, prerange)
+        # assert allrevs == prerevs[(len(prerevs) - len(allrevs)):]
+        # end of check
+        sub = list(stablerange.subranges(repo, prerange)[:-1])
 
-                assert stablerange.depthrev(repo, prerange[0]) != prerange[1], prerange
-                tailrev, tailskip = prerange
-                size = stablerange.rangelength(repo, (tailrev, tailskip))
-                if tailsize < size:
-                    tailskip += size - tailsize
-                    size = tailsize
-                tailranges.append((tailrev, tailskip))
-                tailsize -= size
-            else:
-                # size of the last block
-                tailsize = stablerange.rangelength(repo, tailranges[-1])
-                if poweroftwo(tailsize):
-                    continue # exit the loop
-                prerange = tailranges.pop()
-                sub = stablerange.subranges(repo, prerange)
-
-        tailranges.reverse()
-        canonicals.extend(tailranges)
+        bottomranges = []
+        # XXX we might be able to reuse core stable-range logic instead of
+        # redoing this manually
+        currentrange = sub.pop()
+        currentsize = stablerange.rangelength(repo, currentrange)
+        currentcut = None
+        while allcuts or currentcut is not None:
+            # get the next cut if needed
+            if currentcut is None:
+                currentcut = allcuts.pop()
+            # deal attemp a cut
+            if currentsize == currentcut:
+                bottomranges.append(currentrange)
+                currentcut = None
+            elif currentsize < currentcut:
+                bottomranges.append(currentrange)
+                currentcut -= currentsize
+            else: # currentsize > currentcut
+                newskip = currentrange[1] + (currentsize - currentcut)
+                currentsub = stablerange._slicesrangeat(repo, currentrange, newskip)
+                bottomranges.append(currentsub.pop())
+                sub.extend(currentsub)
+                currentcut = None
+            currentrange = sub.pop()
+            currentsize = stablerange.rangelength(repo, currentrange)
+        bottomranges.reverse()
+        canonicals.extend(bottomranges)
 
     # 3. take recursive subrange until we get to a power of two size?
     current = (headrev, cut)
@@ -289,6 +312,22 @@
 
     return canonicals
 
+def standardcut(size):
+    assert 0 < size
+    # 0. find the first power of 2 higher than this range depth
+    cut = 1
+    while cut <= size:
+        cut *= 2
+
+    allcuts = []
+    # 1. find all standard expected cut
+    while 1 < cut and size:
+        cut //= 2
+        if cut <= size:
+            allcuts.append(cut)
+            size -= cut
+    return allcuts
+
 def poweroftwo(num):
     return num and not num & (num - 1)
 
--- a/tests/test-pullbundle.t	Tue Sep 25 12:19:41 2018 +0200
+++ b/tests/test-pullbundle.t	Tue Sep 25 12:20:26 2018 +0200
@@ -253,13 +253,15 @@
   o  1234:f864bc82f6a2f2ecb49b83722e0895f9d657b0dd
   |
   ~
-  $ hg -R client pull server --debug --config devel.bundle2.debug=yes | grep -v 'add changeset'
+  $ hg -R client pull server --verbose
   pulling from server
-  query 1; heads
   searching for changes
   all local heads known remotely
-  pullbundle-cache: "missing" set sliced into 16 subranges in *.* seconds (glob)
-  16 changesets found
+  pullbundle-cache: "missing" set sliced into 19 subranges in *.* seconds (glob)
+  1 changesets found
+  4 changesets found
+  8 changesets found
+  3 changesets found
   29 changesets found
   256 changesets found
   256 changesets found
@@ -275,371 +277,139 @@
   8 changesets found
   4 changesets found
   2 changesets found
-  listing keys for "bookmarks"
-  bundle2-output-bundle: "HG20", 19 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: 42
-  bundle2-output: payload chunk size: 2956
-  bundle2-output: closing payload chunk
-  bundle2-output: bundle part: "changegroup"
-  bundle2-output-part: "changegroup" (params: 1 mandatory 1 advisory) streamed payload
-  bundle2-output: part 1: "CHANGEGROUP"
-  bundle2-output: header chunk size: 42
-  bundle2-output: payload chunk size: 5348
-  bundle2-output: closing payload chunk
-  bundle2-output: bundle part: "changegroup"
-  bundle2-output-part: "changegroup" (params: 1 mandatory 1 advisory) streamed payload
-  bundle2-output: part 2: "CHANGEGROUP"
-  bundle2-output: header chunk size: 43
-  bundle2-output: payload chunk size: 32768
-  bundle2-output: payload chunk size: 14348
-  bundle2-output: closing payload chunk
-  bundle2-output: bundle part: "changegroup"
-  bundle2-output-part: "changegroup" (params: 1 mandatory 1 advisory) streamed payload
-  bundle2-output: part 3: "CHANGEGROUP"
-  bundle2-output: header chunk size: 43
-  bundle2-output: payload chunk size: 32768
-  bundle2-output: payload chunk size: 14348
-  bundle2-output: closing payload chunk
-  bundle2-output: bundle part: "changegroup"
-  bundle2-output-part: "changegroup" (params: 1 mandatory 1 advisory) streamed payload
-  bundle2-output: part 4: "CHANGEGROUP"
-  bundle2-output: header chunk size: 42
-  bundle2-output: payload chunk size: 11788
-  bundle2-output: closing payload chunk
-  bundle2-output: bundle part: "changegroup"
-  bundle2-output-part: "changegroup" (params: 1 mandatory 1 advisory) streamed payload
-  bundle2-output: part 5: "CHANGEGROUP"
-  bundle2-output: header chunk size: 41
-  bundle2-output: payload chunk size: 1484
-  bundle2-output: closing payload chunk
-  bundle2-output: bundle part: "changegroup"
-  bundle2-output-part: "changegroup" (params: 1 mandatory 1 advisory) streamed payload
-  bundle2-output: part 6: "CHANGEGROUP"
-  bundle2-output: header chunk size: 41
-  bundle2-output: payload chunk size: 196
-  bundle2-output: closing payload chunk
-  bundle2-output: bundle part: "changegroup"
-  bundle2-output-part: "changegroup" (params: 1 mandatory 1 advisory) streamed payload
-  bundle2-output: part 7: "CHANGEGROUP"
-  bundle2-output: header chunk size: 41
-  bundle2-output: payload chunk size: 748
-  bundle2-output: closing payload chunk
-  bundle2-output: bundle part: "changegroup"
-  bundle2-output-part: "changegroup" (params: 1 mandatory 1 advisory) streamed payload
-  bundle2-output: part 8: "CHANGEGROUP"
-  bundle2-output: header chunk size: 41
-  bundle2-output: payload chunk size: 1484
-  bundle2-output: closing payload chunk
-  bundle2-output: bundle part: "changegroup"
-  bundle2-output-part: "changegroup" (params: 1 mandatory 1 advisory) streamed payload
-  bundle2-output: part 9: "CHANGEGROUP"
-  bundle2-output: header chunk size: 42
-  bundle2-output: payload chunk size: 2956
-  bundle2-output: closing payload chunk
-  bundle2-output: bundle part: "changegroup"
-  bundle2-output-part: "changegroup" (params: 1 mandatory 1 advisory) streamed payload
-  bundle2-output: part 10: "CHANGEGROUP"
-  bundle2-output: header chunk size: 43
-  bundle2-output: payload chunk size: 23564
-  bundle2-output: closing payload chunk
-  bundle2-output: bundle part: "changegroup"
-  bundle2-output-part: "changegroup" (params: 1 mandatory 1 advisory) streamed payload
-  bundle2-output: part 11: "CHANGEGROUP"
-  bundle2-output: header chunk size: 42
-  bundle2-output: payload chunk size: 11788
-  bundle2-output: closing payload chunk
-  bundle2-output: bundle part: "changegroup"
-  bundle2-output-part: "changegroup" (params: 1 mandatory 1 advisory) streamed payload
-  bundle2-output: part 12: "CHANGEGROUP"
-  bundle2-output: header chunk size: 42
-  bundle2-output: payload chunk size: 5900
-  bundle2-output: closing payload chunk
-  bundle2-output: bundle part: "changegroup"
-  bundle2-output-part: "changegroup" (params: 1 mandatory 1 advisory) streamed payload
-  bundle2-output: part 13: "CHANGEGROUP"
-  bundle2-output: header chunk size: 41
-  bundle2-output: payload chunk size: 1484
-  bundle2-output: closing payload chunk
-  bundle2-output: bundle part: "changegroup"
-  bundle2-output-part: "changegroup" (params: 1 mandatory 1 advisory) streamed payload
-  bundle2-output: part 14: "CHANGEGROUP"
-  bundle2-output: header chunk size: 41
-  bundle2-output: payload chunk size: 748
-  bundle2-output: closing payload chunk
-  bundle2-output: bundle part: "changegroup"
-  bundle2-output-part: "changegroup" (params: 1 mandatory 1 advisory) streamed payload
-  bundle2-output: part 15: "CHANGEGROUP"
-  bundle2-output: header chunk size: 41
-  bundle2-output: payload chunk size: 380
-  bundle2-output: closing payload chunk
-  bundle2-output: bundle part: "listkeys"
-  bundle2-output-part: "listkeys" (params: 1 mandatory) empty payload
-  bundle2-output: part 16: "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 17: "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 18: "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: 42
-  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
+  uncompressed size of bundle content:
+       188 (changelog)
+         4 (manifests)
+  uncompressed size of bundle content:
+       740 (changelog)
+         4 (manifests)
+  uncompressed size of bundle content:
+      1476 (changelog)
+         4 (manifests)
+  uncompressed size of bundle content:
+       556 (changelog)
+         4 (manifests)
+  uncompressed size of bundle content:
+      5340 (changelog)
+         4 (manifests)
+  uncompressed size of bundle content:
+     47108 (changelog)
+         4 (manifests)
+  uncompressed size of bundle content:
+     47108 (changelog)
+         4 (manifests)
+  uncompressed size of bundle content:
+     11780 (changelog)
+         4 (manifests)
+  uncompressed size of bundle content:
+      1476 (changelog)
+         4 (manifests)
+  uncompressed size of bundle content:
+       188 (changelog)
+         4 (manifests)
+  uncompressed size of bundle content:
+       740 (changelog)
+         4 (manifests)
+  uncompressed size of bundle content:
+      1476 (changelog)
+         4 (manifests)
+  uncompressed size of bundle content:
+      2948 (changelog)
+         4 (manifests)
+  uncompressed size of bundle content:
+     23556 (changelog)
+         4 (manifests)
+  uncompressed size of bundle content:
+     11780 (changelog)
+         4 (manifests)
+  uncompressed size of bundle content:
+      5892 (changelog)
+         4 (manifests)
+  uncompressed size of bundle content:
+      1476 (changelog)
+         4 (manifests)
+  uncompressed size of bundle content:
+       740 (changelog)
+         4 (manifests)
+  uncompressed size of bundle content:
+       372 (changelog)
+         4 (manifests)
   adding changesets
-  bundle2-input: payload chunk size: 2956
-  bundle2-input: payload chunk size: 0
   adding manifests
   adding file changes
-  added 16 changesets with 0 changes to 0 files
-  bundle2-input-part: total payload size 2956
-  bundle2-input: part header size: 42
-  bundle2-input: part type: "CHANGEGROUP"
-  bundle2-input: part id: "1"
-  bundle2-input: part parameters: 2
-  bundle2-input: found a handler for part changegroup
-  bundle2-input-part: "changegroup" (params: 1 mandatory 1 advisory) supported
+  added 1 changesets with 0 changes to 0 files
+  adding changesets
+  adding manifests
+  adding file changes
+  added 4 changesets with 0 changes to 0 files
   adding changesets
-  bundle2-input: payload chunk size: 5348
-  bundle2-input: payload chunk size: 0
+  adding manifests
+  adding file changes
+  added 8 changesets with 0 changes to 0 files
+  adding changesets
+  adding manifests
+  adding file changes
+  added 3 changesets with 0 changes to 0 files
+  adding changesets
   adding manifests
   adding file changes
   added 29 changesets with 0 changes to 0 files (+1 heads)
-  bundle2-input-part: total payload size 5348
-  bundle2-input: part header size: 43
-  bundle2-input: part type: "CHANGEGROUP"
-  bundle2-input: part id: "2"
-  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: 14348
-  bundle2-input: payload chunk size: 0
   adding manifests
   adding file changes
   added 256 changesets with 0 changes to 0 files (-1 heads)
-  bundle2-input-part: total payload size 47116
-  bundle2-input: part header size: 43
-  bundle2-input: part type: "CHANGEGROUP"
-  bundle2-input: part id: "3"
-  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: 14348
-  bundle2-input: payload chunk size: 0
   adding manifests
   adding file changes
   added 256 changesets with 0 changes to 0 files
-  bundle2-input-part: total payload size 47116
-  bundle2-input: part header size: 42
-  bundle2-input: part type: "CHANGEGROUP"
-  bundle2-input: part id: "4"
-  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: 11788
-  bundle2-input: payload chunk size: 0
   adding manifests
   adding file changes
   added 64 changesets with 0 changes to 0 files
-  bundle2-input-part: total payload size 11788
-  bundle2-input: part header size: 41
-  bundle2-input: part type: "CHANGEGROUP"
-  bundle2-input: part id: "5"
-  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: 1484
-  bundle2-input: payload chunk size: 0
   adding manifests
   adding file changes
   added 8 changesets with 0 changes to 0 files
-  bundle2-input-part: total payload size 1484
-  bundle2-input: part header size: 41
-  bundle2-input: part type: "CHANGEGROUP"
-  bundle2-input: part id: "6"
-  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: 196
-  bundle2-input: payload chunk size: 0
   adding manifests
   adding file changes
   added 1 changesets with 0 changes to 0 files (+1 heads)
-  bundle2-input-part: total payload size 196
-  bundle2-input: part header size: 41
-  bundle2-input: part type: "CHANGEGROUP"
-  bundle2-input: part id: "7"
-  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: 748
-  bundle2-input: payload chunk size: 0
   adding manifests
   adding file changes
   added 4 changesets with 0 changes to 0 files
-  bundle2-input-part: total payload size 748
-  bundle2-input: part header size: 41
-  bundle2-input: part type: "CHANGEGROUP"
-  bundle2-input: part id: "8"
-  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: 1484
-  bundle2-input: payload chunk size: 0
   adding manifests
   adding file changes
   added 8 changesets with 0 changes to 0 files
-  bundle2-input-part: total payload size 1484
-  bundle2-input: part header size: 42
-  bundle2-input: part type: "CHANGEGROUP"
-  bundle2-input: part id: "9"
-  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: 2956
-  bundle2-input: payload chunk size: 0
   adding manifests
   adding file changes
   added 16 changesets with 0 changes to 0 files
-  bundle2-input-part: total payload size 2956
-  bundle2-input: part header size: 43
-  bundle2-input: part type: "CHANGEGROUP"
-  bundle2-input: part id: "10"
-  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: 23564
-  bundle2-input: payload chunk size: 0
   adding manifests
   adding file changes
   added 128 changesets with 0 changes to 0 files
-  bundle2-input-part: total payload size 23564
-  bundle2-input: part header size: 42
-  bundle2-input: part type: "CHANGEGROUP"
-  bundle2-input: part id: "11"
-  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: 11788
-  bundle2-input: payload chunk size: 0
   adding manifests
   adding file changes
   added 64 changesets with 0 changes to 0 files
-  bundle2-input-part: total payload size 11788
-  bundle2-input: part header size: 42
-  bundle2-input: part type: "CHANGEGROUP"
-  bundle2-input: part id: "12"
-  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: 5900
-  bundle2-input: payload chunk size: 0
   adding manifests
   adding file changes
   added 32 changesets with 0 changes to 0 files
-  bundle2-input-part: total payload size 5900
-  bundle2-input: part header size: 41
-  bundle2-input: part type: "CHANGEGROUP"
-  bundle2-input: part id: "13"
-  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: 1484
-  bundle2-input: payload chunk size: 0
   adding manifests
   adding file changes
   added 8 changesets with 0 changes to 0 files
-  bundle2-input-part: total payload size 1484
-  bundle2-input: part header size: 41
-  bundle2-input: part type: "CHANGEGROUP"
-  bundle2-input: part id: "14"
-  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: 748
-  bundle2-input: payload chunk size: 0
   adding manifests
   adding file changes
   added 4 changesets with 0 changes to 0 files
-  bundle2-input-part: total payload size 748
-  bundle2-input: part header size: 41
-  bundle2-input: part type: "CHANGEGROUP"
-  bundle2-input: part id: "15"
-  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: 380
-  bundle2-input: payload chunk size: 0
   adding manifests
   adding file changes
   added 2 changesets with 0 changes to 0 files
-  bundle2-input-part: total payload size 380
-  bundle2-input: part header size: 35
-  bundle2-input: part type: "LISTKEYS"
-  bundle2-input: part id: "16"
-  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: "17"
-  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: "18"
-  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: 18 parts total
-  checking for updated bookmarks
-  updating the branch cache
   new changesets 17185c1c22f1:1dded5aafa0f
   (run 'hg heads' to see heads, 'hg merge' to merge)
 
@@ -648,22 +418,25 @@
   $ diff -u oldbundles newbundles
   --- oldbundles	* (glob)
   +++ newbundles	* (glob)
-  @@ -1,6 +1,22 @@
+  @@ -1,6 +1,25 @@
   +02-0f376356904fc8c1c6ceaac27990f2fd79b1f8c1-0000001856skip-0000000008size.hg
+  +02-17185c1c22f1266b084daf7cfb07b6ebbfbc65ab-0000001235skip-0000000001size.hg
   +02-1dded5aafa0f8d548f6357cc2f8882dcc4489fbf-0000001516skip-0000000002size.hg
   +02-2dc4f1ab9029719714b8e0dde8e3725a5bb28472-0000001408skip-0000000064size.hg
   +02-2f0e261a08964bc1c607c0eda4978364c22a9b94-0000001504skip-0000000008size.hg
    02-467b6e370e816747e27de0d0b9237f4090a33656-0000001152skip-0000000064size.hg
+  +02-484c46df3e41f371efd0ff74fa5221657527213f-0000001240skip-0000000008size.hg
   +02-4a6d0f7d07d060b026d9fc690cd89cd26af96e42-0000001264skip-0000000016size.hg
    02-540f762640ee62ca597ece26af725e6357e82805-0000000000skip-0000001024size.hg
   +02-5eaa75df73c454c1afff722301a4c73e897de94d-0000001256skip-0000000008size.hg
    02-63ded94ceab180ac2fa13e1f0beeb4d2265998a3-0000001232skip-0000000002size.hg
+  +02-694ef7e5b2984f1ec66c3d960799f4ff2459672c-0000001236skip-0000000004size.hg
    02-7f3a79522d6e904d52aea07c71e6cb612667e8f4-0000001216skip-0000000016size.hg
   +02-b2d350c94c26edbb783aaa21fc24f1fc65c30e74-0000001536skip-0000000256size.hg
   +02-bbd293bd171fd5b711d428db46940a72eca7a40f-0000001280skip-0000000128size.hg
   +02-ca970a853ea24846035ccb324cc8de49ef768748-0000001252skip-0000000004size.hg
   +02-d1807e3513890ac71c2e8d10e9dc9a5b58b15d4b-0000001251skip-0000000001size.hg
-  +02-d83212ecaa436c80d6113cf915ba35e2db787e79-0000001235skip-0000000016size.hg
+  +02-d83212ecaa436c80d6113cf915ba35e2db787e79-0000001248skip-0000000003size.hg
   +02-da87a81c5310760f414a933e6550b7e8e60cf241-0000001792skip-0000000064size.hg
   +02-dba2fddbf3c28198659046674a512afd616a1519-0000001472skip-0000000032size.hg
   +02-e469a7aa5cce57653b6b02ff46c80b2d94d62629-0000000899skip-0000000029size.hg
@@ -683,9 +456,8 @@
   o  0:1ea73414a91b0920940797d8fc6a11e447f8ea1e
   
 
-  $ hg -R client2 pull server -r 1234 --debug --config devel.bundle2.debug=yes --traceback| grep -v 'add changeset'
+  $ hg -R client2 pull server -r 1234 --verbose
   pulling from server
-  query 1; heads
   pullbundle-cache: "missing" set sliced into 6 subranges in *.* seconds (glob)
   1024 changesets found in caches
   128 changesets found in caches
@@ -693,187 +465,30 @@
   16 changesets found in caches
   2 changesets found in caches
   1 changesets found in caches
-  listing keys for "bookmarks"
-  bundle2-output-bundle: "HG20", 9 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: 22368
-  bundle2-output: closing payload chunk
-  bundle2-output: bundle part: "changegroup"
-  bundle2-output-part: "changegroup" (params: 1 mandatory 1 advisory) streamed payload
-  bundle2-output: part 1: "CHANGEGROUP"
-  bundle2-output: header chunk size: 43
-  bundle2-output: payload chunk size: 23564
-  bundle2-output: closing payload chunk
-  bundle2-output: bundle part: "changegroup"
-  bundle2-output-part: "changegroup" (params: 1 mandatory 1 advisory) streamed payload
-  bundle2-output: part 2: "CHANGEGROUP"
-  bundle2-output: header chunk size: 42
-  bundle2-output: payload chunk size: 11788
-  bundle2-output: closing payload chunk
-  bundle2-output: bundle part: "changegroup"
-  bundle2-output-part: "changegroup" (params: 1 mandatory 1 advisory) streamed payload
-  bundle2-output: part 3: "CHANGEGROUP"
-  bundle2-output: header chunk size: 42
-  bundle2-output: payload chunk size: 2956
-  bundle2-output: closing payload chunk
-  bundle2-output: bundle part: "changegroup"
-  bundle2-output-part: "changegroup" (params: 1 mandatory 1 advisory) streamed payload
-  bundle2-output: part 4: "CHANGEGROUP"
-  bundle2-output: header chunk size: 41
-  bundle2-output: payload chunk size: 380
-  bundle2-output: closing payload chunk
-  bundle2-output: bundle part: "changegroup"
-  bundle2-output-part: "changegroup" (params: 1 mandatory 1 advisory) streamed payload
-  bundle2-output: part 5: "CHANGEGROUP"
-  bundle2-output: header chunk size: 41
-  bundle2-output: payload chunk size: 196
-  bundle2-output: closing payload chunk
-  bundle2-output: bundle part: "listkeys"
-  bundle2-output-part: "listkeys" (params: 1 mandatory) empty payload
-  bundle2-output: part 6: "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 7: "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 8: "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: 22368
-  bundle2-input: payload chunk size: 0
   adding manifests
   adding file changes
   added 1024 changesets with 0 changes to 0 files
-  bundle2-input-part: total payload size 186208
-  bundle2-input: part header size: 43
-  bundle2-input: part type: "CHANGEGROUP"
-  bundle2-input: part id: "1"
-  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: 23564
-  bundle2-input: payload chunk size: 0
   adding manifests
   adding file changes
   added 128 changesets with 0 changes to 0 files
-  bundle2-input-part: total payload size 23564
-  bundle2-input: part header size: 42
-  bundle2-input: part type: "CHANGEGROUP"
-  bundle2-input: part id: "2"
-  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: 11788
-  bundle2-input: payload chunk size: 0
   adding manifests
   adding file changes
   added 64 changesets with 0 changes to 0 files
-  bundle2-input-part: total payload size 11788
-  bundle2-input: part header size: 42
-  bundle2-input: part type: "CHANGEGROUP"
-  bundle2-input: part id: "3"
-  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: 2956
-  bundle2-input: payload chunk size: 0
   adding manifests
   adding file changes
   added 16 changesets with 0 changes to 0 files
-  bundle2-input-part: total payload size 2956
-  bundle2-input: part header size: 41
-  bundle2-input: part type: "CHANGEGROUP"
-  bundle2-input: part id: "4"
-  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: 380
-  bundle2-input: payload chunk size: 0
   adding manifests
   adding file changes
   added 2 changesets with 0 changes to 0 files
-  bundle2-input-part: total payload size 380
-  bundle2-input: part header size: 41
-  bundle2-input: part type: "CHANGEGROUP"
-  bundle2-input: part id: "5"
-  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: 196
-  bundle2-input: payload chunk size: 0
   adding manifests
   adding file changes
   added 1 changesets with 0 changes to 0 files
-  bundle2-input-part: total payload size 196
-  bundle2-input: part header size: 35
-  bundle2-input: part type: "LISTKEYS"
-  bundle2-input: part id: "6"
-  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: "7"
-  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: "8"
-  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: 8 parts total
-  checking for updated bookmarks
-  updating the branch cache
   new changesets 1ea73414a91b:f864bc82f6a2
   (run 'hg update' to get a working copy)
 
@@ -895,13 +510,15 @@
   |
   ~
 
-  $ hg -R client2 pull server --debug --config devel.bundle2.debug=yes | grep -v 'add changeset'
+  $ hg -R client2 pull server --verbose
   pulling from server
-  query 1; heads
   searching for changes
   all local heads known remotely
-  pullbundle-cache: "missing" set sliced into 16 subranges in *.* seconds (glob)
-  16 changesets found in caches
+  pullbundle-cache: "missing" set sliced into 19 subranges in *.* seconds (glob)
+  1 changesets found in caches
+  4 changesets found in caches
+  8 changesets found in caches
+  3 changesets found in caches
   29 changesets found in caches
   256 changesets found in caches
   256 changesets found in caches
@@ -917,371 +534,82 @@
   8 changesets found in caches
   4 changesets found in caches
   2 changesets found in caches
-  listing keys for "bookmarks"
-  bundle2-output-bundle: "HG20", 19 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: 42
-  bundle2-output: payload chunk size: 2956
-  bundle2-output: closing payload chunk
-  bundle2-output: bundle part: "changegroup"
-  bundle2-output-part: "changegroup" (params: 1 mandatory 1 advisory) streamed payload
-  bundle2-output: part 1: "CHANGEGROUP"
-  bundle2-output: header chunk size: 42
-  bundle2-output: payload chunk size: 5348
-  bundle2-output: closing payload chunk
-  bundle2-output: bundle part: "changegroup"
-  bundle2-output-part: "changegroup" (params: 1 mandatory 1 advisory) streamed payload
-  bundle2-output: part 2: "CHANGEGROUP"
-  bundle2-output: header chunk size: 43
-  bundle2-output: payload chunk size: 32768
-  bundle2-output: payload chunk size: 14348
-  bundle2-output: closing payload chunk
-  bundle2-output: bundle part: "changegroup"
-  bundle2-output-part: "changegroup" (params: 1 mandatory 1 advisory) streamed payload
-  bundle2-output: part 3: "CHANGEGROUP"
-  bundle2-output: header chunk size: 43
-  bundle2-output: payload chunk size: 32768
-  bundle2-output: payload chunk size: 14348
-  bundle2-output: closing payload chunk
-  bundle2-output: bundle part: "changegroup"
-  bundle2-output-part: "changegroup" (params: 1 mandatory 1 advisory) streamed payload
-  bundle2-output: part 4: "CHANGEGROUP"
-  bundle2-output: header chunk size: 42
-  bundle2-output: payload chunk size: 11788
-  bundle2-output: closing payload chunk
-  bundle2-output: bundle part: "changegroup"
-  bundle2-output-part: "changegroup" (params: 1 mandatory 1 advisory) streamed payload
-  bundle2-output: part 5: "CHANGEGROUP"
-  bundle2-output: header chunk size: 41
-  bundle2-output: payload chunk size: 1484
-  bundle2-output: closing payload chunk
-  bundle2-output: bundle part: "changegroup"
-  bundle2-output-part: "changegroup" (params: 1 mandatory 1 advisory) streamed payload
-  bundle2-output: part 6: "CHANGEGROUP"
-  bundle2-output: header chunk size: 41
-  bundle2-output: payload chunk size: 196
-  bundle2-output: closing payload chunk
-  bundle2-output: bundle part: "changegroup"
-  bundle2-output-part: "changegroup" (params: 1 mandatory 1 advisory) streamed payload
-  bundle2-output: part 7: "CHANGEGROUP"
-  bundle2-output: header chunk size: 41
-  bundle2-output: payload chunk size: 748
-  bundle2-output: closing payload chunk
-  bundle2-output: bundle part: "changegroup"
-  bundle2-output-part: "changegroup" (params: 1 mandatory 1 advisory) streamed payload
-  bundle2-output: part 8: "CHANGEGROUP"
-  bundle2-output: header chunk size: 41
-  bundle2-output: payload chunk size: 1484
-  bundle2-output: closing payload chunk
-  bundle2-output: bundle part: "changegroup"
-  bundle2-output-part: "changegroup" (params: 1 mandatory 1 advisory) streamed payload
-  bundle2-output: part 9: "CHANGEGROUP"
-  bundle2-output: header chunk size: 42
-  bundle2-output: payload chunk size: 2956
-  bundle2-output: closing payload chunk
-  bundle2-output: bundle part: "changegroup"
-  bundle2-output-part: "changegroup" (params: 1 mandatory 1 advisory) streamed payload
-  bundle2-output: part 10: "CHANGEGROUP"
-  bundle2-output: header chunk size: 43
-  bundle2-output: payload chunk size: 23564
-  bundle2-output: closing payload chunk
-  bundle2-output: bundle part: "changegroup"
-  bundle2-output-part: "changegroup" (params: 1 mandatory 1 advisory) streamed payload
-  bundle2-output: part 11: "CHANGEGROUP"
-  bundle2-output: header chunk size: 42
-  bundle2-output: payload chunk size: 11788
-  bundle2-output: closing payload chunk
-  bundle2-output: bundle part: "changegroup"
-  bundle2-output-part: "changegroup" (params: 1 mandatory 1 advisory) streamed payload
-  bundle2-output: part 12: "CHANGEGROUP"
-  bundle2-output: header chunk size: 42
-  bundle2-output: payload chunk size: 5900
-  bundle2-output: closing payload chunk
-  bundle2-output: bundle part: "changegroup"
-  bundle2-output-part: "changegroup" (params: 1 mandatory 1 advisory) streamed payload
-  bundle2-output: part 13: "CHANGEGROUP"
-  bundle2-output: header chunk size: 41
-  bundle2-output: payload chunk size: 1484
-  bundle2-output: closing payload chunk
-  bundle2-output: bundle part: "changegroup"
-  bundle2-output-part: "changegroup" (params: 1 mandatory 1 advisory) streamed payload
-  bundle2-output: part 14: "CHANGEGROUP"
-  bundle2-output: header chunk size: 41
-  bundle2-output: payload chunk size: 748
-  bundle2-output: closing payload chunk
-  bundle2-output: bundle part: "changegroup"
-  bundle2-output-part: "changegroup" (params: 1 mandatory 1 advisory) streamed payload
-  bundle2-output: part 15: "CHANGEGROUP"
-  bundle2-output: header chunk size: 41
-  bundle2-output: payload chunk size: 380
-  bundle2-output: closing payload chunk
-  bundle2-output: bundle part: "listkeys"
-  bundle2-output-part: "listkeys" (params: 1 mandatory) empty payload
-  bundle2-output: part 16: "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 17: "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 18: "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: 42
-  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: 2956
-  bundle2-input: payload chunk size: 0
+  adding manifests
+  adding file changes
+  added 1 changesets with 0 changes to 0 files
+  adding changesets
   adding manifests
   adding file changes
-  added 16 changesets with 0 changes to 0 files
-  bundle2-input-part: total payload size 2956
-  bundle2-input: part header size: 42
-  bundle2-input: part type: "CHANGEGROUP"
-  bundle2-input: part id: "1"
-  bundle2-input: part parameters: 2
-  bundle2-input: found a handler for part changegroup
-  bundle2-input-part: "changegroup" (params: 1 mandatory 1 advisory) supported
+  added 4 changesets with 0 changes to 0 files
   adding changesets
-  bundle2-input: payload chunk size: 5348
-  bundle2-input: payload chunk size: 0
+  adding manifests
+  adding file changes
+  added 8 changesets with 0 changes to 0 files
+  adding changesets
+  adding manifests
+  adding file changes
+  added 3 changesets with 0 changes to 0 files
+  adding changesets
   adding manifests
   adding file changes
   added 29 changesets with 0 changes to 0 files (+1 heads)
-  bundle2-input-part: total payload size 5348
-  bundle2-input: part header size: 43
-  bundle2-input: part type: "CHANGEGROUP"
-  bundle2-input: part id: "2"
-  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: 14348
-  bundle2-input: payload chunk size: 0
   adding manifests
   adding file changes
   added 256 changesets with 0 changes to 0 files (-1 heads)
-  bundle2-input-part: total payload size 47116
-  bundle2-input: part header size: 43
-  bundle2-input: part type: "CHANGEGROUP"
-  bundle2-input: part id: "3"
-  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: 14348
-  bundle2-input: payload chunk size: 0
   adding manifests
   adding file changes
   added 256 changesets with 0 changes to 0 files
-  bundle2-input-part: total payload size 47116
-  bundle2-input: part header size: 42
-  bundle2-input: part type: "CHANGEGROUP"
-  bundle2-input: part id: "4"
-  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: 11788
-  bundle2-input: payload chunk size: 0
   adding manifests
   adding file changes
   added 64 changesets with 0 changes to 0 files
-  bundle2-input-part: total payload size 11788
-  bundle2-input: part header size: 41
-  bundle2-input: part type: "CHANGEGROUP"
-  bundle2-input: part id: "5"
-  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: 1484
-  bundle2-input: payload chunk size: 0
   adding manifests
   adding file changes
   added 8 changesets with 0 changes to 0 files
-  bundle2-input-part: total payload size 1484
-  bundle2-input: part header size: 41
-  bundle2-input: part type: "CHANGEGROUP"
-  bundle2-input: part id: "6"
-  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: 196
-  bundle2-input: payload chunk size: 0
   adding manifests
   adding file changes
   added 1 changesets with 0 changes to 0 files (+1 heads)
-  bundle2-input-part: total payload size 196
-  bundle2-input: part header size: 41
-  bundle2-input: part type: "CHANGEGROUP"
-  bundle2-input: part id: "7"
-  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: 748
-  bundle2-input: payload chunk size: 0
   adding manifests
   adding file changes
   added 4 changesets with 0 changes to 0 files
-  bundle2-input-part: total payload size 748
-  bundle2-input: part header size: 41
-  bundle2-input: part type: "CHANGEGROUP"
-  bundle2-input: part id: "8"
-  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: 1484
-  bundle2-input: payload chunk size: 0
   adding manifests
   adding file changes
   added 8 changesets with 0 changes to 0 files
-  bundle2-input-part: total payload size 1484
-  bundle2-input: part header size: 42
-  bundle2-input: part type: "CHANGEGROUP"
-  bundle2-input: part id: "9"
-  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: 2956
-  bundle2-input: payload chunk size: 0
   adding manifests
   adding file changes
   added 16 changesets with 0 changes to 0 files
-  bundle2-input-part: total payload size 2956
-  bundle2-input: part header size: 43
-  bundle2-input: part type: "CHANGEGROUP"
-  bundle2-input: part id: "10"
-  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: 23564
-  bundle2-input: payload chunk size: 0
   adding manifests
   adding file changes
   added 128 changesets with 0 changes to 0 files
-  bundle2-input-part: total payload size 23564
-  bundle2-input: part header size: 42
-  bundle2-input: part type: "CHANGEGROUP"
-  bundle2-input: part id: "11"
-  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: 11788
-  bundle2-input: payload chunk size: 0
   adding manifests
   adding file changes
   added 64 changesets with 0 changes to 0 files
-  bundle2-input-part: total payload size 11788
-  bundle2-input: part header size: 42
-  bundle2-input: part type: "CHANGEGROUP"
-  bundle2-input: part id: "12"
-  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: 5900
-  bundle2-input: payload chunk size: 0
   adding manifests
   adding file changes
   added 32 changesets with 0 changes to 0 files
-  bundle2-input-part: total payload size 5900
-  bundle2-input: part header size: 41
-  bundle2-input: part type: "CHANGEGROUP"
-  bundle2-input: part id: "13"
-  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: 1484
-  bundle2-input: payload chunk size: 0
   adding manifests
   adding file changes
   added 8 changesets with 0 changes to 0 files
-  bundle2-input-part: total payload size 1484
-  bundle2-input: part header size: 41
-  bundle2-input: part type: "CHANGEGROUP"
-  bundle2-input: part id: "14"
-  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: 748
-  bundle2-input: payload chunk size: 0
   adding manifests
   adding file changes
   added 4 changesets with 0 changes to 0 files
-  bundle2-input-part: total payload size 748
-  bundle2-input: part header size: 41
-  bundle2-input: part type: "CHANGEGROUP"
-  bundle2-input: part id: "15"
-  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: 380
-  bundle2-input: payload chunk size: 0
   adding manifests
   adding file changes
   added 2 changesets with 0 changes to 0 files
-  bundle2-input-part: total payload size 380
-  bundle2-input: part header size: 35
-  bundle2-input: part type: "LISTKEYS"
-  bundle2-input: part id: "16"
-  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: "17"
-  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: "18"
-  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: 18 parts total
-  checking for updated bookmarks
-  updating the branch cache
   new changesets 17185c1c22f1:1dded5aafa0f
   (run 'hg heads' to see heads, 'hg merge' to merge)
 
@@ -1306,9 +634,8 @@
   o  0:1ea73414a91b0920940797d8fc6a11e447f8ea1e
   
 
-  $ hg -R client3 pull server -r 1789 --debug --config devel.bundle2.debug=yes | grep -v 'add changeset'
+  $ hg -R client3 pull server -r 1789 --verbose
   pulling from server
-  query 1; heads
   pullbundle-cache: "missing" set sliced into 9 subranges in *.* seconds (glob)
   1024 changesets found in caches
   227 changesets found
@@ -1319,246 +646,63 @@
   16 changesets found
   2 changesets found
   1 changesets found
-  listing keys for "bookmarks"
-  bundle2-output-bundle: "HG20", 12 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: 22368
-  bundle2-output: closing payload chunk
-  bundle2-output: bundle part: "changegroup"
-  bundle2-output-part: "changegroup" (params: 1 mandatory 1 advisory) streamed payload
-  bundle2-output: part 1: "CHANGEGROUP"
-  bundle2-output: header chunk size: 43
-  bundle2-output: payload chunk size: 32768
-  bundle2-output: payload chunk size: 9012
-  bundle2-output: closing payload chunk
-  bundle2-output: bundle part: "changegroup"
-  bundle2-output-part: "changegroup" (params: 1 mandatory 1 advisory) streamed payload
-  bundle2-output: part 2: "CHANGEGROUP"
-  bundle2-output: header chunk size: 42
-  bundle2-output: payload chunk size: 5348
-  bundle2-output: closing payload chunk
-  bundle2-output: bundle part: "changegroup"
-  bundle2-output-part: "changegroup" (params: 1 mandatory 1 advisory) streamed payload
-  bundle2-output: part 3: "CHANGEGROUP"
-  bundle2-output: header chunk size: 43
-  bundle2-output: payload chunk size: 23564
-  bundle2-output: closing payload chunk
-  bundle2-output: bundle part: "changegroup"
-  bundle2-output-part: "changegroup" (params: 1 mandatory 1 advisory) streamed payload
-  bundle2-output: part 4: "CHANGEGROUP"
-  bundle2-output: header chunk size: 42
-  bundle2-output: payload chunk size: 11788
-  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
+  uncompressed size of bundle content:
+     41772 (changelog)
+         4 (manifests)
+  uncompressed size of bundle content:
+     23556 (changelog)
+         4 (manifests)
+  uncompressed size of bundle content:
+     11780 (changelog)
+         4 (manifests)
   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: 22368
-  bundle2-input: payload chunk size: 0
   adding manifests
   adding file changes
   added 1024 changesets with 0 changes to 0 files
-  bundle2-input-part: total payload size 186208
-  bundle2-input: part header size: 43
-  bundle2-input: part type: "CHANGEGROUP"
-  bundle2-input: part id: "1"
-  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: 9012
-  bundle2-input: payload chunk size: 0
   adding manifests
   adding file changes
   added 227 changesets with 0 changes to 0 files
-  bundle2-input-part: total payload size 41780
-  bundle2-input: part header size: 42
-  bundle2-input: part type: "CHANGEGROUP"
-  bundle2-input: part id: "2"
-  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: 5348
-  bundle2-input: payload chunk size: 0
   adding manifests
   adding file changes
   added 29 changesets with 0 changes to 0 files (+1 heads)
-  bundle2-input-part: total payload size 5348
-  bundle2-input: part header size: 43
-  bundle2-input: part type: "CHANGEGROUP"
-  bundle2-input: part id: "3"
-  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: 23564
-  bundle2-input: payload chunk size: 0
   adding manifests
   adding file changes
   added 128 changesets with 0 changes to 0 files (-1 heads)
-  bundle2-input-part: total payload size 23564
-  bundle2-input: part header size: 42
-  bundle2-input: part type: "CHANGEGROUP"
-  bundle2-input: part id: "4"
-  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: 11788
-  bundle2-output: closing payload chunk
-  bundle2-output: bundle part: "changegroup"
-  bundle2-output-part: "changegroup" (params: 1 mandatory 1 advisory) streamed payload
-  bundle2-output: part 5: "CHANGEGROUP"
-  bundle2-output: header chunk size: 42
-  bundle2-output: payload chunk size: 5900
-  bundle2-output: closing payload chunk
-  bundle2-output: bundle part: "changegroup"
-  bundle2-output-part: "changegroup" (params: 1 mandatory 1 advisory) streamed payload
-  bundle2-output: part 6: "CHANGEGROUP"
-  bundle2-output: header chunk size: 42
-  bundle2-output: payload chunk size: 2956
-  bundle2-output: closing payload chunk
-  bundle2-output: bundle part: "changegroup"
-  bundle2-output-part: "changegroup" (params: 1 mandatory 1 advisory) streamed payload
-  bundle2-output: part 7: "CHANGEGROUP"
-  bundle2-output: header chunk size: 41
-  bundle2-output: payload chunk size: 380
-  bundle2-output: closing payload chunk
-  bundle2-output: bundle part: "changegroup"
-  bundle2-output-part: "changegroup" (params: 1 mandatory 1 advisory) streamed payload
-  bundle2-output: part 8: "CHANGEGROUP"
-  bundle2-output: header chunk size: 41
-  bundle2-output: payload chunk size: 196
-  bundle2-output: closing payload chunk
-  bundle2-output: bundle part: "listkeys"
-  bundle2-output-part: "listkeys" (params: 1 mandatory) empty payload
-  bundle2-output: part 9: "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 10: "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 11: "cache:rev-branch-cache"
-  bundle2-output: header chunk size: 29
-  bundle2-output: payload chunk size: 30479
-  bundle2-output: closing payload chunk
-  bundle2-output: end of bundle
-  bundle2-input: payload chunk size: 0
+  uncompressed size of bundle content:
+      5892 (changelog)
+         4 (manifests)
+  uncompressed size of bundle content:
+      2948 (changelog)
+         4 (manifests)
+  uncompressed size of bundle content:
+       372 (changelog)
+         4 (manifests)
+  uncompressed size of bundle content:
+       188 (changelog)
+         4 (manifests)
   adding manifests
   adding file changes
   added 64 changesets with 0 changes to 0 files
-  bundle2-input-part: total payload size 11788
-  bundle2-input: part header size: 42
-  bundle2-input: part type: "CHANGEGROUP"
-  bundle2-input: part id: "5"
-  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: 5900
-  bundle2-input: payload chunk size: 0
   adding manifests
   adding file changes
   added 32 changesets with 0 changes to 0 files
-  bundle2-input-part: total payload size 5900
-  bundle2-input: part header size: 42
-  bundle2-input: part type: "CHANGEGROUP"
-  bundle2-input: part id: "6"
-  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: 2956
-  bundle2-input: payload chunk size: 0
   adding manifests
   adding file changes
   added 16 changesets with 0 changes to 0 files
-  bundle2-input-part: total payload size 2956
-  bundle2-input: part header size: 41
-  bundle2-input: part type: "CHANGEGROUP"
-  bundle2-input: part id: "7"
-  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: 380
-  bundle2-input: payload chunk size: 0
   adding manifests
   adding file changes
   added 2 changesets with 0 changes to 0 files
-  bundle2-input-part: total payload size 380
-  bundle2-input: part header size: 41
-  bundle2-input: part type: "CHANGEGROUP"
-  bundle2-input: part id: "8"
-  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: 196
-  bundle2-input: payload chunk size: 0
   adding manifests
   adding file changes
   added 1 changesets with 0 changes to 0 files
-  bundle2-input-part: total payload size 196
-  bundle2-input: part header size: 35
-  bundle2-input: part type: "LISTKEYS"
-  bundle2-input: part id: "9"
-  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: "10"
-  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: "11"
-  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: 30479
-  bundle2-input: payload chunk size: 0
-  bundle2-input-part: total payload size 30479
-  bundle2-input: part header size: 0
-  bundle2-input: end of bundle2 stream
-  bundle2-input-bundle: 11 parts total
-  checking for updated bookmarks
-  updating the branch cache
   new changesets 1ea73414a91b:44e80141ad53
   (run 'hg update' to get a working copy)
 
@@ -1567,17 +711,19 @@
   $ diff -u oldbundles newbundles
   --- oldbundles	* (glob)
   +++ newbundles	* (glob)
-  @@ -2,19 +2,26 @@
+  @@ -3,21 +3,28 @@
    02-1dded5aafa0f8d548f6357cc2f8882dcc4489fbf-0000001516skip-0000000002size.hg
    02-2dc4f1ab9029719714b8e0dde8e3725a5bb28472-0000001408skip-0000000064size.hg
    02-2f0e261a08964bc1c607c0eda4978364c22a9b94-0000001504skip-0000000008size.hg
   +02-44e80141ad530a2aa085e9bd9b5311b57eff72ff-0000001522skip-0000000001size.hg
    02-467b6e370e816747e27de0d0b9237f4090a33656-0000001152skip-0000000064size.hg
+   02-484c46df3e41f371efd0ff74fa5221657527213f-0000001240skip-0000000008size.hg
    02-4a6d0f7d07d060b026d9fc690cd89cd26af96e42-0000001264skip-0000000016size.hg
    02-540f762640ee62ca597ece26af725e6357e82805-0000000000skip-0000001024size.hg
   +02-59e60b258b18cde1e931cf30ce4ae62b49e37abd-0000001520skip-0000000002size.hg
    02-5eaa75df73c454c1afff722301a4c73e897de94d-0000001256skip-0000000008size.hg
    02-63ded94ceab180ac2fa13e1f0beeb4d2265998a3-0000001232skip-0000000002size.hg
+   02-694ef7e5b2984f1ec66c3d960799f4ff2459672c-0000001236skip-0000000004size.hg
   +02-7a55a4d5ce324910842c893b56173cf2a847cb9d-0000001472skip-0000000032size.hg
    02-7f3a79522d6e904d52aea07c71e6cb612667e8f4-0000001216skip-0000000016size.hg
   +02-a4ab7df9d74053fb819c8a1c6a48ad605cc05f8a-0000001504skip-0000000016size.hg
@@ -1587,7 +733,7 @@
    02-ca970a853ea24846035ccb324cc8de49ef768748-0000001252skip-0000000004size.hg
    02-d1807e3513890ac71c2e8d10e9dc9a5b58b15d4b-0000001251skip-0000000001size.hg
   +02-d83212ecaa436c80d6113cf915ba35e2db787e79-0000001024skip-0000000227size.hg
-   02-d83212ecaa436c80d6113cf915ba35e2db787e79-0000001235skip-0000000016size.hg
+   02-d83212ecaa436c80d6113cf915ba35e2db787e79-0000001248skip-0000000003size.hg
    02-da87a81c5310760f414a933e6550b7e8e60cf241-0000001792skip-0000000064size.hg
    02-dba2fddbf3c28198659046674a512afd616a1519-0000001472skip-0000000032size.hg
   +02-dc714c3a5d080165292ba99b097567d0b95e5756-0000001408skip-0000000064size.hg
@@ -1607,9 +753,8 @@
   |
   ~
 
-  $ hg -R client3 pull server --debug --config devel.bundle2.debug=yes | grep -v 'add changeset'
+  $ hg -R client3 pull server --verbose
   pulling from server
-  query 1; heads
   searching for changes
   all local heads known remotely
   pullbundle-cache: "missing" set sliced into 16 subranges in *.* seconds (glob)
@@ -1629,369 +774,79 @@
   8 changesets found in caches
   4 changesets found in caches
   2 changesets found in caches
-  listing keys for "bookmarks"
-  bundle2-output-bundle: "HG20", 19 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: 41
-  bundle2-output: payload chunk size: 196
-  bundle2-output: closing payload chunk
-  bundle2-output: bundle part: "changegroup"
-  bundle2-output-part: "changegroup" (params: 1 mandatory 1 advisory) streamed payload
-  bundle2-output: part 1: "CHANGEGROUP"
-  bundle2-output: header chunk size: 41
-  bundle2-output: payload chunk size: 748
-  bundle2-output: closing payload chunk
-  bundle2-output: bundle part: "changegroup"
-  bundle2-output-part: "changegroup" (params: 1 mandatory 1 advisory) streamed payload
-  bundle2-output: part 2: "CHANGEGROUP"
-  bundle2-output: header chunk size: 41
-  bundle2-output: payload chunk size: 1484
-  bundle2-output: closing payload chunk
-  bundle2-output: bundle part: "changegroup"
-  bundle2-output-part: "changegroup" (params: 1 mandatory 1 advisory) streamed payload
-  bundle2-output: part 3: "CHANGEGROUP"
-  bundle2-output: header chunk size: 43
-  bundle2-output: payload chunk size: 32768
-  bundle2-output: payload chunk size: 14348
-  bundle2-output: closing payload chunk
-  bundle2-output: bundle part: "changegroup"
-  bundle2-output-part: "changegroup" (params: 1 mandatory 1 advisory) streamed payload
-  bundle2-output: part 4: "CHANGEGROUP"
-  bundle2-output: header chunk size: 42
-  bundle2-output: payload chunk size: 11788
-  bundle2-output: closing payload chunk
-  bundle2-output: bundle part: "changegroup"
-  bundle2-output-part: "changegroup" (params: 1 mandatory 1 advisory) streamed payload
-  bundle2-output: part 5: "CHANGEGROUP"
-  bundle2-output: header chunk size: 41
-  bundle2-output: payload chunk size: 1484
-  bundle2-output: closing payload chunk
-  bundle2-output: bundle part: "changegroup"
-  bundle2-output-part: "changegroup" (params: 1 mandatory 1 advisory) streamed payload
-  bundle2-output: part 6: "CHANGEGROUP"
-  bundle2-output: header chunk size: 41
-  bundle2-output: payload chunk size: 196
-  bundle2-output: closing payload chunk
-  bundle2-output: bundle part: "changegroup"
-  bundle2-output-part: "changegroup" (params: 1 mandatory 1 advisory) streamed payload
-  bundle2-output: part 7: "CHANGEGROUP"
-  bundle2-output: header chunk size: 41
-  bundle2-output: payload chunk size: 748
-  bundle2-output: closing payload chunk
-  bundle2-output: bundle part: "changegroup"
-  bundle2-output-part: "changegroup" (params: 1 mandatory 1 advisory) streamed payload
-  bundle2-output: part 8: "CHANGEGROUP"
-  bundle2-output: header chunk size: 41
-  bundle2-output: payload chunk size: 1484
-  bundle2-output: closing payload chunk
-  bundle2-output: bundle part: "changegroup"
-  bundle2-output-part: "changegroup" (params: 1 mandatory 1 advisory) streamed payload
-  bundle2-output: part 9: "CHANGEGROUP"
-  bundle2-output: header chunk size: 42
-  bundle2-output: payload chunk size: 2956
-  bundle2-output: closing payload chunk
-  bundle2-output: bundle part: "changegroup"
-  bundle2-output-part: "changegroup" (params: 1 mandatory 1 advisory) streamed payload
-  bundle2-output: part 10: "CHANGEGROUP"
-  bundle2-output: header chunk size: 43
-  bundle2-output: payload chunk size: 23564
-  bundle2-output: closing payload chunk
-  bundle2-output: bundle part: "changegroup"
-  bundle2-output-part: "changegroup" (params: 1 mandatory 1 advisory) streamed payload
-  bundle2-output: part 11: "CHANGEGROUP"
-  bundle2-output: header chunk size: 42
-  bundle2-output: payload chunk size: 11788
-  bundle2-output: closing payload chunk
-  bundle2-output: bundle part: "changegroup"
-  bundle2-output-part: "changegroup" (params: 1 mandatory 1 advisory) streamed payload
-  bundle2-output: part 12: "CHANGEGROUP"
-  bundle2-output: header chunk size: 42
-  bundle2-output: payload chunk size: 5900
-  bundle2-output: closing payload chunk
-  bundle2-output: bundle part: "changegroup"
-  bundle2-output-part: "changegroup" (params: 1 mandatory 1 advisory) streamed payload
-  bundle2-output: part 13: "CHANGEGROUP"
-  bundle2-output: header chunk size: 41
-  bundle2-output: payload chunk size: 1484
-  bundle2-output: closing payload chunk
-  bundle2-output: bundle part: "changegroup"
-  bundle2-output-part: "changegroup" (params: 1 mandatory 1 advisory) streamed payload
-  bundle2-output: part 14: "CHANGEGROUP"
-  bundle2-output: header chunk size: 41
-  bundle2-output: payload chunk size: 748
-  bundle2-output: closing payload chunk
-  bundle2-output: bundle part: "changegroup"
-  bundle2-output-part: "changegroup" (params: 1 mandatory 1 advisory) streamed payload
-  bundle2-output: part 15: "CHANGEGROUP"
-  bundle2-output: header chunk size: 41
-  bundle2-output: payload chunk size: 380
-  bundle2-output: closing payload chunk
-  bundle2-output: bundle part: "listkeys"
-  bundle2-output-part: "listkeys" (params: 1 mandatory) empty payload
-  bundle2-output: part 16: "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 17: "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 18: "cache:rev-branch-cache"
-  bundle2-output: header chunk size: 29
-  bundle2-output: payload chunk size: 12179
-  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: 41
-  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
+  uncompressed size of bundle content:
+       188 (changelog)
+         4 (manifests)
+  uncompressed size of bundle content:
+       740 (changelog)
+         4 (manifests)
+  uncompressed size of bundle content:
+      1476 (changelog)
+         4 (manifests)
   adding changesets
-  bundle2-input: payload chunk size: 196
-  bundle2-input: payload chunk size: 0
   adding manifests
   adding file changes
   added 1 changesets with 0 changes to 0 files
-  bundle2-input-part: total payload size 196
-  bundle2-input: part header size: 41
-  bundle2-input: part type: "CHANGEGROUP"
-  bundle2-input: part id: "1"
-  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: 748
-  bundle2-input: payload chunk size: 0
   adding manifests
   adding file changes
   added 4 changesets with 0 changes to 0 files
-  bundle2-input-part: total payload size 748
-  bundle2-input: part header size: 41
-  bundle2-input: part type: "CHANGEGROUP"
-  bundle2-input: part id: "2"
-  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: 1484
-  bundle2-input: payload chunk size: 0
   adding manifests
   adding file changes
   added 8 changesets with 0 changes to 0 files
-  bundle2-input-part: total payload size 1484
-  bundle2-input: part header size: 43
-  bundle2-input: part type: "CHANGEGROUP"
-  bundle2-input: part id: "3"
-  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: 14348
-  bundle2-input: payload chunk size: 0
   adding manifests
   adding file changes
   added 256 changesets with 0 changes to 0 files
-  bundle2-input-part: total payload size 47116
-  bundle2-input: part header size: 42
-  bundle2-input: part type: "CHANGEGROUP"
-  bundle2-input: part id: "4"
-  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: 11788
-  bundle2-input: payload chunk size: 0
   adding manifests
   adding file changes
   added 64 changesets with 0 changes to 0 files
-  bundle2-input-part: total payload size 11788
-  bundle2-input: part header size: 41
-  bundle2-input: part type: "CHANGEGROUP"
-  bundle2-input: part id: "5"
-  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: 1484
-  bundle2-input: payload chunk size: 0
   adding manifests
   adding file changes
   added 8 changesets with 0 changes to 0 files
-  bundle2-input-part: total payload size 1484
-  bundle2-input: part header size: 41
-  bundle2-input: part type: "CHANGEGROUP"
-  bundle2-input: part id: "6"
-  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: 196
-  bundle2-input: payload chunk size: 0
   adding manifests
   adding file changes
   added 1 changesets with 0 changes to 0 files (+1 heads)
-  bundle2-input-part: total payload size 196
-  bundle2-input: part header size: 41
-  bundle2-input: part type: "CHANGEGROUP"
-  bundle2-input: part id: "7"
-  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: 748
-  bundle2-input: payload chunk size: 0
   adding manifests
   adding file changes
   added 4 changesets with 0 changes to 0 files
-  bundle2-input-part: total payload size 748
-  bundle2-input: part header size: 41
-  bundle2-input: part type: "CHANGEGROUP"
-  bundle2-input: part id: "8"
-  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: 1484
-  bundle2-input: payload chunk size: 0
   adding manifests
   adding file changes
   added 8 changesets with 0 changes to 0 files
-  bundle2-input-part: total payload size 1484
-  bundle2-input: part header size: 42
-  bundle2-input: part type: "CHANGEGROUP"
-  bundle2-input: part id: "9"
-  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: 2956
-  bundle2-input: payload chunk size: 0
   adding manifests
   adding file changes
   added 16 changesets with 0 changes to 0 files
-  bundle2-input-part: total payload size 2956
-  bundle2-input: part header size: 43
-  bundle2-input: part type: "CHANGEGROUP"
-  bundle2-input: part id: "10"
-  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: 23564
-  bundle2-input: payload chunk size: 0
   adding manifests
   adding file changes
   added 128 changesets with 0 changes to 0 files
-  bundle2-input-part: total payload size 23564
-  bundle2-input: part header size: 42
-  bundle2-input: part type: "CHANGEGROUP"
-  bundle2-input: part id: "11"
-  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: 11788
-  bundle2-input: payload chunk size: 0
   adding manifests
   adding file changes
   added 64 changesets with 0 changes to 0 files
-  bundle2-input-part: total payload size 11788
-  bundle2-input: part header size: 42
-  bundle2-input: part type: "CHANGEGROUP"
-  bundle2-input: part id: "12"
-  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: 5900
-  bundle2-input: payload chunk size: 0
   adding manifests
   adding file changes
   added 32 changesets with 0 changes to 0 files
-  bundle2-input-part: total payload size 5900
-  bundle2-input: part header size: 41
-  bundle2-input: part type: "CHANGEGROUP"
-  bundle2-input: part id: "13"
-  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: 1484
-  bundle2-input: payload chunk size: 0
   adding manifests
   adding file changes
   added 8 changesets with 0 changes to 0 files
-  bundle2-input-part: total payload size 1484
-  bundle2-input: part header size: 41
-  bundle2-input: part type: "CHANGEGROUP"
-  bundle2-input: part id: "14"
-  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: 748
-  bundle2-input: payload chunk size: 0
   adding manifests
   adding file changes
   added 4 changesets with 0 changes to 0 files
-  bundle2-input-part: total payload size 748
-  bundle2-input: part header size: 41
-  bundle2-input: part type: "CHANGEGROUP"
-  bundle2-input: part id: "15"
-  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: 380
-  bundle2-input: payload chunk size: 0
   adding manifests
   adding file changes
   added 2 changesets with 0 changes to 0 files
-  bundle2-input-part: total payload size 380
-  bundle2-input: part header size: 35
-  bundle2-input: part type: "LISTKEYS"
-  bundle2-input: part id: "16"
-  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: "17"
-  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: "18"
-  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: 12179
-  bundle2-input: payload chunk size: 0
-  bundle2-input-part: total payload size 12179
-  bundle2-input: part header size: 0
-  bundle2-input: end of bundle2 stream
-  bundle2-input-bundle: 18 parts total
-  checking for updated bookmarks
-  updating the branch cache
   new changesets c232505f58fd:1dded5aafa0f
   (run 'hg heads' to see heads, 'hg merge' to merge)
 
@@ -2000,14 +855,15 @@
   $ diff -u oldbundles newbundles
   --- oldbundles	* (glob)
   +++ newbundles	* (glob)
-  @@ -1,5 +1,6 @@
+  @@ -1,6 +1,7 @@
    02-0f376356904fc8c1c6ceaac27990f2fd79b1f8c1-0000001856skip-0000000008size.hg
+   02-17185c1c22f1266b084daf7cfb07b6ebbfbc65ab-0000001235skip-0000000001size.hg
    02-1dded5aafa0f8d548f6357cc2f8882dcc4489fbf-0000001516skip-0000000002size.hg
   +02-1ed78f99f705cb819a02f1227c217728d008e461-0000001524skip-0000000004size.hg
    02-2dc4f1ab9029719714b8e0dde8e3725a5bb28472-0000001408skip-0000000064size.hg
    02-2f0e261a08964bc1c607c0eda4978364c22a9b94-0000001504skip-0000000008size.hg
    02-44e80141ad530a2aa085e9bd9b5311b57eff72ff-0000001522skip-0000000001size.hg
-  @@ -15,6 +16,7 @@
+  @@ -18,6 +19,7 @@
    02-b2d350c94c26edbb783aaa21fc24f1fc65c30e74-0000001536skip-0000000256size.hg
    02-bbd293bd171fd5b711d428db46940a72eca7a40f-0000001280skip-0000000128size.hg
    02-c12927fef661d2463043347101b90067c2961333-0000001280skip-0000000128size.hg
@@ -2015,7 +871,7 @@
    02-ca970a853ea24846035ccb324cc8de49ef768748-0000001252skip-0000000004size.hg
    02-d1807e3513890ac71c2e8d10e9dc9a5b58b15d4b-0000001251skip-0000000001size.hg
    02-d83212ecaa436c80d6113cf915ba35e2db787e79-0000001024skip-0000000227size.hg
-  @@ -24,6 +26,7 @@
+  @@ -27,6 +29,7 @@
    02-dc714c3a5d080165292ba99b097567d0b95e5756-0000001408skip-0000000064size.hg
    02-e469a7aa5cce57653b6b02ff46c80b2d94d62629-0000000899skip-0000000029size.hg
    02-e74670ea99533967c5d90da3ddbc0318cc1fd502-0000001280skip-0000000256size.hg
@@ -2118,7 +974,7 @@
   $ diff -u oldbundles newbundles
   --- oldbundles	* (glob)
   +++ newbundles	* (glob)
-  @@ -25,6 +25,7 @@
+  @@ -28,6 +28,7 @@
    02-dba2fddbf3c28198659046674a512afd616a1519-0000001472skip-0000000032size.hg
    02-dc714c3a5d080165292ba99b097567d0b95e5756-0000001408skip-0000000064size.hg
    02-e469a7aa5cce57653b6b02ff46c80b2d94d62629-0000000899skip-0000000029size.hg