equal
deleted
inserted
replaced
517 # kept in the "uncertain" set. If all branchheads are also |
517 # kept in the "uncertain" set. If all branchheads are also |
518 # topological heads, they can't have descendants and further |
518 # topological heads, they can't have descendants and further |
519 # checks can be skipped. Otherwise, the ancestors of the |
519 # checks can be skipped. Otherwise, the ancestors of the |
520 # "uncertain" set are removed from branchheads. |
520 # "uncertain" set are removed from branchheads. |
521 # This computation is heavy and avoided if at all possible. |
521 # This computation is heavy and avoided if at all possible. |
522 bheads = self._entries.setdefault(branch, []) |
522 bheads = self._entries.get(branch, []) |
523 bheadset = {cl.rev(node) for node in bheads} |
523 bheadset = {cl.rev(node) for node in bheads} |
524 uncertain = set() |
524 uncertain = set() |
525 for newrev in sorted(newheadrevs): |
525 for newrev in sorted(newheadrevs): |
526 if newrev in obsrevs: |
526 if newrev in obsrevs: |
527 # We ignore obsolete changesets as they shouldn't be |
527 # We ignore obsolete changesets as they shouldn't be |
560 if bheadset - topoheads: |
560 if bheadset - topoheads: |
561 floorrev = min(bheadset) |
561 floorrev = min(bheadset) |
562 if floorrev <= max(uncertain): |
562 if floorrev <= max(uncertain): |
563 ancestors = set(cl.ancestors(uncertain, floorrev)) |
563 ancestors = set(cl.ancestors(uncertain, floorrev)) |
564 bheadset -= ancestors |
564 bheadset -= ancestors |
565 bheadrevs = sorted(bheadset) |
565 if bheadset: |
566 self[branch] = [cl.node(rev) for rev in bheadrevs] |
566 self[branch] = [cl.node(rev) for rev in sorted(bheadset)] |
567 tiprev = max(newheadrevs) |
567 tiprev = max(newheadrevs) |
568 if tiprev > ntiprev: |
568 if tiprev > ntiprev: |
569 ntiprev = tiprev |
569 ntiprev = tiprev |
570 |
570 |
571 if ntiprev > self.tiprev: |
571 if ntiprev > self.tiprev: |