Show More
@@ -25,20 +25,20 b' def _revancestors(repo, revs, followfirs' | |||||
25 | cl = repo.changelog |
|
25 | cl = repo.changelog | |
26 |
|
26 | |||
27 | def iterate(): |
|
27 | def iterate(): | |
28 | revqueue, inputrev = None, None |
|
|||
29 | h = [] |
|
|||
30 |
|
||||
31 | revs.sort(reverse=True) |
|
28 | revs.sort(reverse=True) | |
32 | revqueue = util.deque(revs) |
|
29 | revqueue = util.deque(revs) | |
33 | if revqueue: |
|
30 | if not revqueue: | |
34 | inputrev = revqueue.popleft() |
|
31 | return | |
35 | heapq.heappush(h, -inputrev) |
|
32 | ||
|
33 | h = [] | |||
|
34 | inputrev = revqueue.popleft() | |||
|
35 | heapq.heappush(h, -inputrev) | |||
36 |
|
36 | |||
37 | seen = set() |
|
37 | seen = set() | |
38 | while h: |
|
38 | while h: | |
39 | current = -heapq.heappop(h) |
|
39 | current = -heapq.heappop(h) | |
40 | if current not in seen: |
|
40 | if current not in seen: | |
41 |
if |
|
41 | if current == inputrev: | |
42 | if revqueue: |
|
42 | if revqueue: | |
43 | inputrev = revqueue.popleft() |
|
43 | inputrev = revqueue.popleft() | |
44 | heapq.heappush(h, -inputrev) |
|
44 | heapq.heappush(h, -inputrev) |
General Comments 0
You need to be logged in to leave comments.
Login now