Patchwork D2647: setdiscovery: make progress on most connected groups each roundtrip

login
register
mail settings
Submitter phabricator
Date May 31, 2019, 7:08 p.m.
Message ID <9103a0abad13e6e067072a885a577631@localhost.localdomain>
Download mbox | patch
Permalink /patch/40288/
State Not Applicable
Headers show

Comments

phabricator - May 31, 2019, 7:08 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG5b34972a0094: setdiscovery: make progress on most connected groups each roundtrip (authored by martinvonz, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D2647?vs=15210&id=15312

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

AFFECTED FILES
  mercurial/setdiscovery.py

CHANGE DETAILS




To: martinvonz, #hg-reviewers, indygreg, marmoute
Cc: gracinet, indygreg, mercurial-devel

Patch

diff --git a/mercurial/setdiscovery.py b/mercurial/setdiscovery.py
--- a/mercurial/setdiscovery.py
+++ b/mercurial/setdiscovery.py
@@ -110,13 +110,14 @@ 
     (all tracked revisions are known locally)
     """
 
-    def __init__(self, repo, targetheads):
+    def __init__(self, repo, targetheads, respectsize):
         self._repo = repo
         self._targetheads = targetheads
         self._common = repo.changelog.incrementalmissingrevs()
         self._undecided = None
         self.missing = set()
         self._childrenmap = None
+        self._respectsize = respectsize
 
     def addcommons(self, commons):
         """register nodes known as common"""
@@ -241,6 +242,8 @@ 
 
         # update from roots
         revsroots = set(repo.revs('roots(%ld)', revs))
+        if not self._respectsize:
+            size = max(size, len(revsroots))
 
         childrenrevs = self._childrengetter()
 
@@ -373,7 +376,7 @@ 
 
     # full blown discovery
 
-    disco = partialdiscovery(local, ownheads)
+    disco = partialdiscovery(local, ownheads, remote.limitedarguments)
     # treat remote heads (and maybe own heads) as a first implicit sample
     # response
     disco.addcommons(knownsrvheads)