~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/_known_graph_pyx.pyx

  • Committer: John Arbash Meinel
  • Date: 2009-09-02 13:32:52 UTC
  • mfrom: (4634.6.14 2.0)
  • mto: (4634.6.15 2.0)
  • mto: This revision was merged to the branch mainline in revision 4667.
  • Revision ID: john@arbash-meinel.com-20090902133252-t2t94xtckoliv2th
Merge lp:bzr/2.0 to resolve NEWS issues.

Show diffs side-by-side

added added

removed removed

Lines of Context:
585
585
        self.completed = 0
586
586
 
587
587
    def __repr__(self):
588
 
        return '%s(depth:%s rev:%s,%s,%s first:%s seen:%s)' % (self.__class__.__name__,
 
588
        return '%s(%s depth:%s rev:%s,%s,%s first:%s seen:%s)' % (
 
589
            self.__class__.__name__, self.key,
589
590
            self.merge_depth,
590
591
            self._revno_first, self._revno_second, self._revno_last,
591
592
            self.is_first_child, self.seen_by_child)
639
640
        if (tip_key is not None and tip_key != NULL_REVISION
640
641
            and tip_key != (NULL_REVISION,)):
641
642
            node = self.graph._nodes[tip_key]
642
 
            self._get_ms_node(node)
643
643
            self._push_node(node, 0)
644
644
 
645
645
    cdef _MergeSortNode _get_ms_node(self, _KnownGraphNode node):
660
660
 
661
661
        ms_node = self._get_ms_node(node)
662
662
        ms_node.merge_depth = merge_depth
 
663
        if node.parents is None:
 
664
            raise RuntimeError('ghost nodes should not be pushed'
 
665
                               ' onto the stack: %s' % (node,))
663
666
        if PyTuple_GET_SIZE(node.parents) > 0:
664
667
            parent_node = _get_tuple_node(node.parents, 0)
665
668
            ms_node.left_parent = parent_node
666
 
            ms_node.left_pending_parent = parent_node
 
669
            if parent_node.parents is None: # left-hand ghost
 
670
                ms_node.left_pending_parent = None
 
671
                ms_node.left_parent = None
 
672
            else:
 
673
                ms_node.left_pending_parent = parent_node
667
674
        if PyTuple_GET_SIZE(node.parents) > 1:
668
675
            ms_node.pending_parents = []
669
676
            for pos from 1 <= pos < PyTuple_GET_SIZE(node.parents):