changeset 32223:d7f93ebbbbdf

bundle: add optional 'tagsfnodecache' data to on disk bundle (issue5543) This should help performance when unbundling.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Fri, 05 May 2017 17:31:15 +0200
parents 6068712cbf03
children 6b582f9b6e5e
files mercurial/bundle2.py tests/test-tags.t
diffstat 2 files changed, 14 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/bundle2.py	Fri May 05 17:28:52 2017 +0200
+++ b/mercurial/bundle2.py	Fri May 05 17:31:15 2017 +0200
@@ -1375,6 +1375,8 @@
         part.addparam('nbchanges', str(cg.extras['clcount']),
                       mandatory=False)
 
+    addparttagsfnodescache(repo, bundler, outgoing)
+
 def addparttagsfnodescache(repo, bundler, outgoing):
     # we include the tags fnode cache for the bundle changeset
     # (as an optional parts)
--- a/tests/test-tags.t	Fri May 05 17:28:52 2017 +0200
+++ b/tests/test-tags.t	Fri May 05 17:31:15 2017 +0200
@@ -716,3 +716,15 @@
   0040: ff ff ff ff ff ff ff ff 40 f0 35 8c 19 e0 a7 d3 |........@.5.....|
   0050: 8a 5c 6a 82 4d cf fb a5 87 d0 2f a3 1e 4f 2f 8a |.\j.M...../..O/.|
 
+Check that the bundle includes cache data
+
+  $ hg -R tagsclient bundle --all ./test-cache-in-bundle-all-rev.hg
+  4 changesets found
+  $ hg debugbundle ./test-cache-in-bundle-all-rev.hg
+  Stream params: sortdict([('Compression', 'BZ')])
+  changegroup -- "sortdict([('version', '02'), ('nbchanges', '4')])"
+      96ee1d7354c4ad7372047672c36a1f561e3a6a4c
+      c4dab0c2fd337eb9191f80c3024830a4889a8f34
+      f63cc8fe54e4d326f8d692805d70e092f851ddb1
+      40f0358cb314c824a5929ee527308d90e023bc10
+  hgtagsfnodes -- 'sortdict()'