##// END OF EJS Templates
setdiscovery: make progress on most connected groups each roundtrip...
Martin von Zweigbergk -
r42594:5b34972a default
parent child Browse files
Show More
@@ -110,13 +110,14 b' class partialdiscovery(object):'
110 (all tracked revisions are known locally)
110 (all tracked revisions are known locally)
111 """
111 """
112
112
113 def __init__(self, repo, targetheads):
113 def __init__(self, repo, targetheads, respectsize):
114 self._repo = repo
114 self._repo = repo
115 self._targetheads = targetheads
115 self._targetheads = targetheads
116 self._common = repo.changelog.incrementalmissingrevs()
116 self._common = repo.changelog.incrementalmissingrevs()
117 self._undecided = None
117 self._undecided = None
118 self.missing = set()
118 self.missing = set()
119 self._childrenmap = None
119 self._childrenmap = None
120 self._respectsize = respectsize
120
121
121 def addcommons(self, commons):
122 def addcommons(self, commons):
122 """register nodes known as common"""
123 """register nodes known as common"""
@@ -241,6 +242,8 b' class partialdiscovery(object):'
241
242
242 # update from roots
243 # update from roots
243 revsroots = set(repo.revs('roots(%ld)', revs))
244 revsroots = set(repo.revs('roots(%ld)', revs))
245 if not self._respectsize:
246 size = max(size, len(revsroots))
244
247
245 childrenrevs = self._childrengetter()
248 childrenrevs = self._childrengetter()
246
249
@@ -373,7 +376,7 b' def findcommonheads(ui, local, remote,'
373
376
374 # full blown discovery
377 # full blown discovery
375
378
376 disco = partialdiscovery(local, ownheads)
379 disco = partialdiscovery(local, ownheads, remote.limitedarguments)
377 # treat remote heads (and maybe own heads) as a first implicit sample
380 # treat remote heads (and maybe own heads) as a first implicit sample
378 # response
381 # response
379 disco.addcommons(knownsrvheads)
382 disco.addcommons(knownsrvheads)
General Comments 0
You need to be logged in to leave comments. Login now