~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/groupcompress.py

  • Committer: John Arbash Meinel
  • Date: 2009-08-26 16:47:51 UTC
  • mto: (4634.6.10 2.0)
  • mto: This revision was merged to the branch mainline in revision 4664.
  • Revision ID: john@arbash-meinel.com-20090826164751-9oczd52hqs2ir1au
Implement _GCGraphIndex.find_ancestry()

This makes the code more similar between KnitVersionedFiles and GCVersionedFiles
which helps in the case that one might end up stacked on the other.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1213
1213
        # Note that this is identical to
1214
1214
        # KnitVersionedFiles.get_known_graph_ancestry, but they don't share
1215
1215
        # ancestry.
1216
 
        parent_map, missing_keys = self._index._graph_index.find_ancestry(keys,
1217
 
        0)
 
1216
        parent_map, missing_keys = self._index.find_ancestry(keys)
1218
1217
        for fallback in self._fallback_vfs:
1219
1218
            if not missing_keys:
1220
1219
                break
1221
 
            (f_parent_map, f_missing_keys) = fallback._index._graph_index.find_ancestry(
1222
 
                                                missing_keys, 0)
 
1220
            (f_parent_map, f_missing_keys) = fallback._index.find_ancestry(
 
1221
                                                missing_keys)
1223
1222
            parent_map.update(f_parent_map)
1224
1223
            missing_keys = f_missing_keys
1225
1224
        kg = _mod_graph.KnownGraph(parent_map)
1841
1840
            if missing_keys:
1842
1841
                raise errors.RevisionNotPresent(missing_keys.pop(), self)
1843
1842
 
 
1843
    def find_ancestry(self, keys):
 
1844
        """See CombinedGraphIndex.find_ancestry"""
 
1845
        return self._graph_index.find_ancestry(keys, 0)
 
1846
 
1844
1847
    def get_parent_map(self, keys):
1845
1848
        """Get a map of the parents of keys.
1846
1849