Show More
@@ -43,6 +43,7 b' def _getstatichidden(repo):' | |||||
43 | heapq.heapify(heap) |
|
43 | heapq.heapify(heap) | |
44 | heappop = heapq.heappop |
|
44 | heappop = heapq.heappop | |
45 | heappush = heapq.heappush |
|
45 | heappush = heapq.heappush | |
|
46 | seen = set() # no need to init it with heads, they have no children | |||
46 | while heap: |
|
47 | while heap: | |
47 | rev = -heappop(heap) |
|
48 | rev = -heappop(heap) | |
48 | # All children have been processed so at that point, if no children |
|
49 | # All children have been processed so at that point, if no children | |
@@ -54,8 +55,11 b' def _getstatichidden(repo):' | |||||
54 | if blocker: |
|
55 | if blocker: | |
55 | # If visible, ensure parent will be visible too |
|
56 | # If visible, ensure parent will be visible too | |
56 | hidden.discard(parent) |
|
57 | hidden.discard(parent) | |
57 | # Skip nodes which are public (guaranteed to not be hidden) |
|
58 | # - Avoid adding the same revision twice | |
58 | if getphase(repo, rev): |
|
59 | # - Skip nodes which are public (guaranteed to not be hidden) | |
|
60 | pre = len(seen) | |||
|
61 | seen.add(parent) | |||
|
62 | if pre < len(seen) and getphase(repo, rev): | |||
59 | heappush(heap, -parent) |
|
63 | heappush(heap, -parent) | |
60 | return hidden |
|
64 | return hidden | |
61 |
|
65 |
General Comments 0
You need to be logged in to leave comments.
Login now