##// END OF EJS Templates
setdiscovery: use progress helper...
Martin von Zweigbergk -
r38369:9e70690a default
parent child Browse files
Show More
@@ -197,6 +197,7 b' def findcommonheads(ui, local, remote,'
197 missing = set()
197 missing = set()
198
198
199 full = False
199 full = False
200 progress = ui.makeprogress(_('searching'), unit=_('queries'))
200 while undecided:
201 while undecided:
201
202
202 if sample:
203 if sample:
@@ -226,7 +227,7 b' def findcommonheads(ui, local, remote,'
226 sample = samplefunc(dag, undecided, targetsize)
227 sample = samplefunc(dag, undecided, targetsize)
227
228
228 roundtrips += 1
229 roundtrips += 1
229 ui.progress(_('searching'), roundtrips, unit=_('queries'))
230 progress.update(roundtrips)
230 ui.debug("query %i; still undecided: %i, sample size is: %i\n"
231 ui.debug("query %i; still undecided: %i, sample size is: %i\n"
231 % (roundtrips, len(undecided), len(sample)))
232 % (roundtrips, len(undecided), len(sample)))
232 # indices between sample and externalized version must match
233 # indices between sample and externalized version must match
@@ -251,7 +252,7 b' def findcommonheads(ui, local, remote,'
251 # return any heads in that case, so discard that
252 # return any heads in that case, so discard that
252 result.discard(nullrev)
253 result.discard(nullrev)
253 elapsed = util.timer() - start
254 elapsed = util.timer() - start
254 ui.progress(_('searching'), None)
255 progress.update(None)
255 ui.debug("%d total queries in %.4fs\n" % (roundtrips, elapsed))
256 ui.debug("%d total queries in %.4fs\n" % (roundtrips, elapsed))
256 msg = ('found %d common and %d unknown server heads,'
257 msg = ('found %d common and %d unknown server heads,'
257 ' %d roundtrips in %.4fs\n')
258 ' %d roundtrips in %.4fs\n')
General Comments 0
You need to be logged in to leave comments. Login now