changeset 37197:7fa00a6f8180

infinitepush: drop logic related to treemanifest extension treemanifest is another facebook's extension which is not in core. Let's drop the logic related to infinitepush extension which is now ported to core. Differential Revision: https://phab.mercurial-scm.org/D2106
author Pulkit Goyal <7895pulkit@gmail.com>
date Fri, 09 Feb 2018 14:02:03 +0530
parents 14acab54e08b
children 78c2e9418278
files hgext/infinitepush/__init__.py hgext/infinitepush/bundleparts.py
diffstat 2 files changed, 1 insertions(+), 32 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/infinitepush/__init__.py	Fri Feb 09 13:56:09 2018 +0530
+++ b/hgext/infinitepush/__init__.py	Fri Feb 09 14:02:03 2018 +0530
@@ -440,16 +440,6 @@
     cgpart.addparam('version', version)
     parts.append(cgpart)
 
-    try:
-        treemod = extensions.find('treemanifest')
-    except KeyError:
-        pass
-    else:
-        if treemod._cansendtrees(bundlerepo, outgoing.missing):
-            treepart = treemod.createtreepackpart(bundlerepo, outgoing,
-                                                  treemod.TREEGROUP_PARTTYPE2)
-            parts.append(treepart)
-
     return parts
 
 def _getbundleroots(oldrepo, bundlerepo, bundlerevs):
@@ -858,7 +848,6 @@
         return
 
     pushop.stepsdone.add('changesets')
-    pushop.stepsdone.add('treepack')
     if not pushop.outgoing.missing:
         pushop.ui.status(_('no changes found\n'))
         pushop.cgresult = 0
@@ -953,13 +942,6 @@
 
     handleallparts = repo.ui.configbool('infinitepush', 'storeallparts')
 
-    partforwardingwhitelist = []
-    try:
-        treemfmod = extensions.find('treemanifest')
-        partforwardingwhitelist.append(treemfmod.TREEGROUP_PARTTYPE2)
-    except KeyError:
-        pass
-
     bundler = bundle2.bundle20(repo.ui)
     cgparams = None
     with bundle2.partiterator(repo, op, unbundler) as parts:
@@ -987,7 +969,7 @@
                     op.records.add(scratchbranchparttype + '_skipphaseheads',
                                    True)
             else:
-                if handleallparts or part.type in partforwardingwhitelist:
+                if handleallparts:
                     # Ideally we would not process any parts, and instead just
                     # forward them to the bundle for storage, but since this
                     # differs from previous behavior, we need to put it behind a
--- a/hgext/infinitepush/bundleparts.py	Fri Feb 09 13:56:09 2018 +0530
+++ b/hgext/infinitepush/bundleparts.py	Fri Feb 09 14:02:03 2018 +0530
@@ -68,19 +68,6 @@
         advisoryparams=params.iteritems(),
         data=cg))
 
-    try:
-        treemod = extensions.find('treemanifest')
-        mfnodes = []
-        for node in outgoing.missing:
-            mfnodes.append(('', repo[node].manifestnode()))
-
-        # Only include the tree parts if they all exist
-        if not repo.manifestlog.datastore.getmissing(mfnodes):
-            parts.append(treemod.createtreepackpart(
-                repo, outgoing, treemod.TREEGROUP_PARTTYPE2))
-    except KeyError:
-        pass
-
     return parts
 
 def _validaterevset(repo, revset, bookmark):