~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tsort.py

  • Committer: Robert Collins
  • Date: 2007-06-26 08:52:20 UTC
  • mto: This revision was merged to the branch mainline in revision 2554.
  • Revision ID: robertc@robertcollins.net-20070626085220-iovhwfjflk8vffbh
Add require_api API.

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: