changeset 41767:1c1c4ef8b72e

changegroup: move non-pruning of non-ellipsis manifests to _prunemanifests() Google has an extension that overrides _prunemanifests() and removes nodes that we fetch using another mechanism. That broke when _prunemanifests() no longer got called. It works again if we move the check for "not self._ellipses" inside _prunemanifests(). Differential Revision: https://phab.mercurial-scm.org/D6004
author Martin von Zweigbergk <martinvonz@google.com>
date Thu, 21 Feb 2019 21:27:42 -0800
parents cd7059d17cb2
children 041d829575ed
files mercurial/changegroup.py
diffstat 1 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/changegroup.py	Thu Feb 21 19:11:35 2019 -0800
+++ b/mercurial/changegroup.py	Thu Feb 21 21:27:42 2019 -0800
@@ -1073,11 +1073,6 @@
                 # because of narrow clones). Do this even for the root
                 # directory (tree=='')
                 prunednodes = []
-            elif not self._ellipses:
-                # In non-ellipses case and large repositories, it is better to
-                # prevent calling of store.rev and store.linkrev on a lot of
-                # nodes as compared to sending some extra data
-                prunednodes = nodes.copy()
             else:
                 # Avoid sending any manifest nodes we can prove the
                 # client already has by checking linkrevs. See the
@@ -1110,6 +1105,11 @@
                     yield tree, []
 
     def _prunemanifests(self, store, nodes, commonrevs):
+        if not self._ellipses:
+            # In non-ellipses case and large repositories, it is better to
+            # prevent calling of store.rev and store.linkrev on a lot of
+            # nodes as compared to sending some extra data
+            return nodes.copy()
         # This is split out as a separate method to allow filtering
         # commonrevs in extension code.
         #