~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tsort.py

  • Committer: John Arbash Meinel
  • Date: 2009-08-19 16:23:39 UTC
  • mto: This revision was merged to the branch mainline in revision 4629.
  • Revision ID: john@arbash-meinel.com-20090819162339-dcw7h5nsyjl9okfa
The api for topo_sort() was to allow a list of (key, value)
or a dict. So we need to cast things back into a dict for KnownGraph.

Show diffs side-by-side

added added

removed removed

Lines of Context:
46
46
    topo_sort is faster when the whole list is needed, while when iterating
47
47
    over a part of the list, TopoSorter.iter_topo_order should be used.
48
48
    """
49
 
    kg = _mod_graph.KnownGraph(graph)
 
49
    kg = _mod_graph.KnownGraph(dict(graph))
50
50
    return kg.topo_sort()
51
51
 
52
52