mercurial/phases.py
branchstable
changeset 51505 c9ceb4f60256
parent 51424 3cee8706f53b
child 51516 e0f92bd98c24
equal deleted inserted replaced
51504:6b2aeeec3ed0 51505:c9ceb4f60256
   701                 break
   701                 break
   702         if not new_revs:
   702         if not new_revs:
   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
   709         get_phase = self.phase
   710         get_phase = self.phase
   710         changed = {}  # set of revisions to be changed
   711         changed = {}  # set of revisions to be changed
   733                 # do not record phase, because we could have "duplicated"
   734                 # do not record phase, because we could have "duplicated"
   734                 # roots, were one root is shadowed by the very same roots of an
   735                 # roots, were one root is shadowed by the very same roots of an
   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)
   744 
   747 
   745         # the last iteration was done with the smallest value
   748         # the last iteration was done with the smallest value