##// END OF EJS Templates
discovery: add a `iscomplete` method to the `partialdiscovery` object...
Boris Feld -
r41205:3ce5b964 default
parent child Browse files
Show More
@@ -186,6 +186,10 b' class partialdiscovery(object):'
186 """return True is we have any clue about the remote state"""
186 """return True is we have any clue about the remote state"""
187 return self._common.hasbases()
187 return self._common.hasbases()
188
188
189 def iscomplete(self):
190 """True if all the necessary data have been gathered"""
191 return self._undecided is not None and not self._undecided
192
189 @property
193 @property
190 def undecided(self):
194 def undecided(self):
191 if self._undecided is not None:
195 if self._undecided is not None:
@@ -278,7 +282,7 b' def findcommonheads(ui, local, remote,'
278
282
279 full = False
283 full = False
280 progress = ui.makeprogress(_('searching'), unit=_('queries'))
284 progress = ui.makeprogress(_('searching'), unit=_('queries'))
281 while disco.undecided:
285 while not disco.iscomplete():
282
286
283 if sample:
287 if sample:
284 missinginsample = [n for i, n in enumerate(sample) if not yesno[i]]
288 missinginsample = [n for i, n in enumerate(sample) if not yesno[i]]
@@ -291,7 +295,7 b' def findcommonheads(ui, local, remote,'
291
295
292 disco.undecided.difference_update(missing)
296 disco.undecided.difference_update(missing)
293
297
294 if not disco.undecided:
298 if disco.iscomplete():
295 break
299 break
296
300
297 if full or disco.hasinfo():
301 if full or disco.hasinfo():
General Comments 0
You need to be logged in to leave comments. Login now