Patchwork D6004: changegroup: move non-pruning of non-ellipsis manifests to _prunemanifests()

login
register
mail settings
Submitter phabricator
Date Feb. 22, 2019, 11:46 a.m.
Message ID <f7a2ec0e08bc9f5df2a90ad100c2e8ab@localhost.localdomain>
Download mbox | patch
Permalink /patch/38873/
State Not Applicable
Headers show

Comments

phabricator - Feb. 22, 2019, 11:46 a.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG1c1c4ef8b72e: changegroup: move non-pruning of non-ellipsis manifests to _prunemanifests() (authored by martinvonz, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6004?vs=14187&id=14190

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

AFFECTED FILES
  mercurial/changegroup.py

CHANGE DETAILS




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

Patch

diff --git a/mercurial/changegroup.py b/mercurial/changegroup.py
--- a/mercurial/changegroup.py
+++ b/mercurial/changegroup.py
@@ -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.
         #