Show More
@@ -262,8 +262,8 b' class incrementalmissingancestors(object' | |||
|
262 | 262 | # Extracted from lazyancestors.__iter__ to avoid a reference cycle |
|
263 | 263 | def _lazyancestorsiter(parentrevs, initrevs, stoprev, inclusive): |
|
264 | 264 | seen = {nullrev} |
|
265 |
|
|
|
266 |
|
|
|
265 | heappush = heapq.heappush | |
|
266 | heappop = heapq.heappop | |
|
267 | 267 | see = seen.add |
|
268 | 268 | |
|
269 | 269 | if inclusive: |
@@ -276,10 +276,10 b' def _lazyancestorsiter(parentrevs, initr' | |||
|
276 | 276 | for r in initrevs: |
|
277 | 277 | p1, p2 = parentrevs(r) |
|
278 | 278 | if p1 not in seen: |
|
279 |
|
|
|
279 | heappush(visit, -p1) | |
|
280 | 280 | see(p1) |
|
281 | 281 | if p2 not in seen: |
|
282 |
|
|
|
282 | heappush(visit, -p2) | |
|
283 | 283 | see(p2) |
|
284 | 284 | |
|
285 | 285 | while visit: |
@@ -294,13 +294,13 b' def _lazyancestorsiter(parentrevs, initr' | |||
|
294 | 294 | if current - p1 == 1: |
|
295 | 295 | visit[0] = -p1 |
|
296 | 296 | else: |
|
297 |
|
|
|
298 |
|
|
|
297 | heappop(visit) | |
|
298 | heappush(visit, -p1) | |
|
299 | 299 | see(p1) |
|
300 | 300 | else: |
|
301 |
|
|
|
301 | heappop(visit) | |
|
302 | 302 | if p2 not in seen: |
|
303 |
|
|
|
303 | heappush(visit, -p2) | |
|
304 | 304 | see(p2) |
|
305 | 305 | |
|
306 | 306 | class lazyancestors(object): |
General Comments 0
You need to be logged in to leave comments.
Login now