~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/repofmt/weaverepo.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:
28
28
lazy_import(globals(), """
29
29
from bzrlib import (
30
30
    xml5,
 
31
    graph as _mod_graph,
31
32
    )
32
33
""")
33
34
from bzrlib import (
663
664
            result[key] = parents
664
665
        return result
665
666
 
 
667
    def get_known_graph_ancestry(self, keys):
 
668
        """Get a KnownGraph instance with the ancestry of keys."""
 
669
        keys = self.keys()
 
670
        parent_map = self.get_parent_map(keys)
 
671
        kg = _mod_graph.KnownGraph(parent_map)
 
672
        return kg
 
673
 
666
674
    def get_record_stream(self, keys, sort_order, include_delta_closure):
667
675
        for key in keys:
668
676
            text, parents = self._load_text_parents(key)