~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/reconcile.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2009-08-19 18:04:49 UTC
  • mfrom: (4593.5.43 1.19-known-graph-sorted)
  • Revision ID: pqm@pqm.ubuntu.com-20090819180449-p5dibldf9pcp24n4
(jam) Add VersionedFiles.get_known_graph_ancestry and
        KnownGraph.merge_sort()

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
    repofmt,
34
34
    )
35
35
from bzrlib.trace import mutter, note
36
 
from bzrlib.tsort import TopoSorter
 
36
from bzrlib.tsort import topo_sort
37
37
from bzrlib.versionedfile import AdapterFactory, FulltextContentFactory
38
38
 
39
39
 
247
247
 
248
248
        # we have topological order of revisions and non ghost parents ready.
249
249
        self._setup_steps(len(self._rev_graph))
250
 
        revision_keys = [(rev_id,) for rev_id in
251
 
            TopoSorter(self._rev_graph.items()).iter_topo_order()]
 
250
        revision_keys = [(rev_id,) for rev_id in topo_sort(self._rev_graph)]
252
251
        stream = self._change_inv_parents(
253
252
            self.inventory.get_record_stream(revision_keys, 'unordered', True),
254
253
            self._new_inv_parents,
378
377
        new_inventories = self.repo._temp_inventories()
379
378
        # we have topological order of revisions and non ghost parents ready.
380
379
        graph = self.revisions.get_parent_map(self.revisions.keys())
381
 
        revision_keys = list(TopoSorter(graph).iter_topo_order())
 
380
        revision_keys = topo_sort(graph)
382
381
        revision_ids = [key[-1] for key in revision_keys]
383
382
        self._setup_steps(len(revision_keys))
384
383
        stream = self._change_inv_parents(