~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/versionedfile.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2009-08-17 22:43:26 UTC
  • mfrom: (4617.1.2 integration)
  • Revision ID: pqm@pqm.ubuntu.com-20090817224326-uhljmr5me5x3xyda
(robertc) Multiple 2a-as-default fixes. (Robert Collins)

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
from bzrlib import (
33
33
    annotate,
34
34
    errors,
35
 
    graph as _mod_graph,
36
35
    groupcompress,
37
36
    index,
38
37
    knit,
942
941
            if '\n' in line[:-1]:
943
942
                raise errors.BzrBadParameterContainsNewline("lines")
944
943
 
945
 
    def get_known_graph_ancestry(self, keys):
946
 
        """Get a KnownGraph instance with the ancestry of keys."""
947
 
        # most basic implementation is a loop around get_parent_map
948
 
        pending = set(keys)
949
 
        parent_map = {}
950
 
        while pending:
951
 
            this_parent_map = self.get_parent_map(pending)
952
 
            parent_map.update(this_parent_map)
953
 
            pending = set()
954
 
            map(pending.update, this_parent_map.itervalues())
955
 
            pending = pending.difference(parent_map)
956
 
        kg = _mod_graph.KnownGraph(parent_map)
957
 
        return kg
958
 
 
959
944
    def get_parent_map(self, keys):
960
945
        """Get a map of the parents of keys.
961
946