Show More
@@ -6,7 +6,7 b'' | |||
|
6 | 6 | # This software may be used and distributed according to the terms of the |
|
7 | 7 | # GNU General Public License version 2 or any later version. |
|
8 | 8 | |
|
9 | import collections | |
|
9 | import heapq | |
|
10 | 10 | import copy |
|
11 | 11 | import error |
|
12 | 12 | import phases |
@@ -39,9 +39,13 b' def _getstatichidden(repo):' | |||
|
39 | 39 | actuallyhidden = {} |
|
40 | 40 | getphase = repo._phasecache.phase |
|
41 | 41 | getparentrevs = repo.changelog.parentrevs |
|
42 |
|
|
|
43 | while queue: | |
|
44 | rev, blocked = queue.popleft() | |
|
42 | heap = [(-r, False) for r in repo.changelog.headrevs()] | |
|
43 | heapq.heapify(heap) | |
|
44 | heappop = heapq.heappop | |
|
45 | heappush = heapq.heappush | |
|
46 | while heap: | |
|
47 | rev, blocked = heappop(heap) | |
|
48 | rev = - rev | |
|
45 | 49 | phase = getphase(repo, rev) |
|
46 | 50 | # Skip nodes which are public (guaranteed to not be hidden) and |
|
47 | 51 | # nodes which have already been processed and won't be blocked by |
@@ -57,7 +61,7 b' def _getstatichidden(repo):' | |||
|
57 | 61 | blocked = True |
|
58 | 62 | |
|
59 | 63 | for parent in (p for p in getparentrevs(rev) if p != nullrev): |
|
60 |
|
|
|
64 | heappush(heap, (- parent, blocked)) | |
|
61 | 65 | return set(rev for rev, hidden in actuallyhidden.iteritems() if hidden) |
|
62 | 66 | |
|
63 | 67 | def _getdynamicblockers(repo): |
General Comments 0
You need to be logged in to leave comments.
Login now