Show More
@@ -665,20 +665,36 b' class phasecache:' | |||||
665 | """ |
|
665 | """ | |
666 | if targetphase == public and not self.hasnonpublicphases(repo): |
|
666 | if targetphase == public and not self.hasnonpublicphases(repo): | |
667 | return set() |
|
667 | return set() | |
|
668 | repo = repo.unfiltered() | |||
|
669 | cl = repo.changelog | |||
|
670 | torev = cl.index.rev | |||
668 | # Be careful to preserve shallow-copied values: do not update |
|
671 | # Be careful to preserve shallow-copied values: do not update | |
669 | # phaseroots values, replace them. |
|
672 | # phaseroots values, replace them. | |
670 |
|
|
673 | new_revs = set() | |
671 |
|
|
674 | if revs is not None: | |
672 | if not revs and not nodes: |
|
675 | new_revs.update(revs) | |
673 | return set() |
|
676 | if nodes is not None: | |
|
677 | new_revs.update(torev(node) for node in nodes) | |||
|
678 | if not new_revs: # bail out early to avoid the loadphaserevs call | |||
|
679 | return ( | |||
|
680 | set() | |||
|
681 | ) # note: why do people call advanceboundary with nothing? | |||
|
682 | ||||
674 | if tr is None: |
|
683 | if tr is None: | |
675 | phasetracking = None |
|
684 | phasetracking = None | |
676 | else: |
|
685 | else: | |
677 | phasetracking = tr.changes.get(b'phases') |
|
686 | phasetracking = tr.changes.get(b'phases') | |
678 |
|
687 | |||
679 | repo = repo.unfiltered() |
|
688 | # filter revision already in the right phase | |
680 | revs = [repo[n].rev() for n in nodes] + [r for r in revs] |
|
689 | self._ensure_phase_sets(repo) | |
|
690 | for phase, revs in self._phasesets.items(): | |||
|
691 | if phase <= targetphase: | |||
|
692 | new_revs -= revs | |||
|
693 | if not new_revs: | |||
|
694 | return set() | |||
681 |
|
695 | |||
|
696 | # search for affected high phase changesets and roots | |||
|
697 | revs = new_revs | |||
682 | changes = set() # set of revisions to be changed |
|
698 | changes = set() # set of revisions to be changed | |
683 | delroots = [] # set of root deleted by this path |
|
699 | delroots = [] # set of root deleted by this path | |
684 | for phase in (phase for phase in allphases if phase > targetphase): |
|
700 | for phase in (phase for phase in allphases if phase > targetphase): |
General Comments 0
You need to be logged in to leave comments.
Login now