##// END OF EJS Templates
phases: avoid N² behavior in `advanceboundary`...
marmoute -
r52398:c9ceb4f6 6.7 stable
parent child Browse files
Show More
@@ -703,6 +703,7 b' class phasecache:'
703 return set()
703 return set()
704
704
705 # search for affected high phase changesets and roots
705 # search for affected high phase changesets and roots
706 seen = set(new_revs)
706 push = heapq.heappush
707 push = heapq.heappush
707 pop = heapq.heappop
708 pop = heapq.heappop
708 parents = cl.parentrevs
709 parents = cl.parentrevs
@@ -735,9 +736,11 b' class phasecache:'
735 # higher phases
736 # higher phases
736 delroots.add(current)
737 delroots.add(current)
737 # schedule a walk down if needed
738 # schedule a walk down if needed
738 if p1_phase > targetphase:
739 if p1_phase > targetphase and p1 not in seen:
740 seen.add(p1)
739 push(revs, -p1)
741 push(revs, -p1)
740 if p2_phase > targetphase:
742 if p2_phase > targetphase and p2 not in seen:
743 seen.add(p2)
741 push(revs, -p2)
744 push(revs, -p2)
742 if p1_phase < targetphase and p2_phase < targetphase:
745 if p1_phase < targetphase and p2_phase < targetphase:
743 new_target_roots.add(current)
746 new_target_roots.add(current)
General Comments 0
You need to be logged in to leave comments. Login now