mirror of
https://github.com/facebook/sapling.git
synced 2024-10-09 00:14:35 +03:00
repoview: skip public parent earlier in _getstatichidden
Public changeset have nothing to offer regarding hidden changeset. Lets not add them to the heap at all.
This commit is contained in:
parent
93633df1d0
commit
eca03d6be8
@ -45,9 +45,6 @@ def _getstatichidden(repo):
|
||||
heappush = heapq.heappush
|
||||
while heap:
|
||||
rev = -heappop(heap)
|
||||
# Skip nodes which are public (guaranteed to not be hidden)
|
||||
if not getphase(repo, rev):
|
||||
continue
|
||||
# All children have been processed so at that point, if no children
|
||||
# removed 'rev' from the 'hidden' set, 'rev' is going to be hidden.
|
||||
blocker = rev not in hidden
|
||||
@ -57,7 +54,9 @@ def _getstatichidden(repo):
|
||||
if blocker:
|
||||
# If visible, ensure parent will be visible too
|
||||
hidden.discard(parent)
|
||||
heappush(heap, -parent)
|
||||
# Skip nodes which are public (guaranteed to not be hidden)
|
||||
if getphase(repo, rev):
|
||||
heappush(heap, -parent)
|
||||
return hidden
|
||||
|
||||
def _getdynamicblockers(repo):
|
||||
|
Loading…
Reference in New Issue
Block a user