##// END OF EJS Templates
findincoming: do the binary search in branches in parallel
Benoit Boissinot -
r7208:acb87c5b default
parent child Browse files
Show More
@@ -1343,10 +1343,11 b' class localrepository(repo.repository):'
1343 unknown.append(b)
1343 unknown.append(b)
1344
1344
1345 # do binary search on the branches we found
1345 # do binary search on the branches we found
1346 search = [(t, b) for (t, b, p1, p2) in search]
1346 while search:
1347 while search:
1347 n = search.pop(0)
1348 newsearch = []
1348 reqcnt += 1
1349 reqcnt += 1
1349 l = remote.between([(n[0], n[1])])[0]
1350 for n, l in zip(search, remote.between(search)):
1350 l.append(n[1])
1351 l.append(n[1])
1351 p = n[0]
1352 p = n[0]
1352 f = 1
1353 f = 1
@@ -1361,9 +1362,10 b' class localrepository(repo.repository):'
1361 else:
1362 else:
1362 self.ui.debug(_("narrowed branch search to %s:%s\n")
1363 self.ui.debug(_("narrowed branch search to %s:%s\n")
1363 % (short(p), short(i)))
1364 % (short(p), short(i)))
1364 search.append((p, i))
1365 newsearch.append((p, i))
1365 break
1366 break
1366 p, f = i, f * 2
1367 p, f = i, f * 2
1368 search = newsearch
1367
1369
1368 # sanity check our fetch list
1370 # sanity check our fetch list
1369 for f in fetch.keys():
1371 for f in fetch.keys():
General Comments 0
You need to be logged in to leave comments. Login now