~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tsort.py

  • Committer: Aaron Bentley
  • Date: 2007-06-21 01:58:29 UTC
  • mto: This revision was merged to the branch mainline in revision 2542.
  • Revision ID: aaron.bentley@utoronto.ca-20070621015829-b62l2d1ehuvgnr3x
Fix iter_topo_order to permit un-included parents

Show diffs side-by-side

added added

removed removed

Lines of Context:
61
61
        """
62
62
        # a dict of the graph.
63
63
        self._graph = dict(graph)
 
64
        self._visitable = set(self._graph)
64
65
        ### if debugging:
65
66
        # self._original_graph = dict(graph)
66
67
        
120
121
                            # this parent was completed by a child on the
121
122
                            # call stack. skip it.
122
123
                            continue
 
124
                        if next_node_name not in self._visitable:
 
125
                            continue
123
126
                        # otherwise transfer it from the source graph into the
124
127
                        # top of the current depth first search stack.
125
128
                        try: