D4887: narrow: don't include the manifests while widening a narrow clone

pulkit (Pulkit Goyal) phabricator at mercurial-scm.org
Fri Oct 5 13:40:31 EDT 2018


pulkit updated this revision to Diff 11706.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D4887?vs=11700&id=11706

REVISION DETAIL
  https://phab.mercurial-scm.org/D4887

AFFECTED FILES
  mercurial/bundle2.py
  mercurial/changegroup.py

CHANGE DETAILS

diff --git a/mercurial/changegroup.py b/mercurial/changegroup.py
--- a/mercurial/changegroup.py
+++ b/mercurial/changegroup.py
@@ -862,6 +862,8 @@
                 yield chunk
 
             for delta in deltas:
+                if not tree and 'manifest' not in parts:
+                    continue
                 chunks = _revisiondeltatochunks(delta, self._builddeltaheader)
                 for chunk in chunks:
                     size += len(chunk)
diff --git a/mercurial/bundle2.py b/mercurial/bundle2.py
--- a/mercurial/bundle2.py
+++ b/mercurial/bundle2.py
@@ -2286,12 +2286,10 @@
     for r in repo.revs("::%ln", common):
         commonnodes.add(cl.node(r))
     if commonnodes:
-        # XXX: we should only send the filelogs (and treemanifest). user
-        # already has the changelog and manifest
         packer = changegroup.getbundler(cgversion, repo,
                                         filematcher=diffmatcher,
                                         fullnodes=commonnodes)
-        reqparts = ('manifest', 'dirlogs', 'filelog')
+        reqparts = ('dirlogs', 'filelog')
         cgdata = packer.generate(set([nodemod.nullid]), list(commonnodes),
                                  False, 'narrow_widen', parts=reqparts)
 



To: pulkit, durin42, martinvonz, #hg-reviewers
Cc: mercurial-devel


More information about the Mercurial-devel mailing list