~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/knit.py

  • Committer: Andrew Bennetts
  • Date: 2011-05-16 10:08:01 UTC
  • mto: This revision was merged to the branch mainline in revision 5865.
  • Revision ID: andrew.bennetts@canonical.com-20110516100801-81ookklkd9be2e3a
Move duplicate definitions of {Knit,GroupCompress}VersionedFiles.get_known_graph_ancestry into VersionedFilesWithFallbacks.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1194
1194
        generator = _VFContentMapGenerator(self, [key])
1195
1195
        return generator._get_content(key)
1196
1196
 
1197
 
    def get_known_graph_ancestry(self, keys):
1198
 
        """Get a KnownGraph instance with the ancestry of keys."""
1199
 
        parent_map, missing_keys = self._index.find_ancestry(keys)
1200
 
        for fallback in self._transitive_fallbacks():
1201
 
            if not missing_keys:
1202
 
                break
1203
 
            (f_parent_map, f_missing_keys) = fallback._index.find_ancestry(
1204
 
                                                missing_keys)
1205
 
            parent_map.update(f_parent_map)
1206
 
            missing_keys = f_missing_keys
1207
 
        kg = _mod_graph.KnownGraph(parent_map)
1208
 
        return kg
1209
 
 
1210
1197
    def get_parent_map(self, keys):
1211
1198
        """Get a map of the graph parents of keys.
1212
1199