/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/knit.py

  • Committer: INADA Naoki
  • Date: 2011-05-17 00:45:09 UTC
  • mfrom: (5875 +trunk)
  • mto: This revision was merged to the branch mainline in revision 5891.
  • Revision ID: songofacandy@gmail.com-20110517004509-q58negjbdjh7t6u1
mergeĀ fromĀ lp:bzr

Show diffs side-by-side

added added

removed removed

Lines of Context:
103
103
    ConstantMapper,
104
104
    ContentFactory,
105
105
    sort_groupcompress,
106
 
    VersionedFiles,
 
106
    VersionedFilesWithFallbacks,
107
107
    )
108
108
 
109
109
 
845
845
                in all_build_index_memos.itervalues()])
846
846
 
847
847
 
848
 
class KnitVersionedFiles(VersionedFiles):
 
848
class KnitVersionedFiles(VersionedFilesWithFallbacks):
849
849
    """Storage for many versioned files using knit compression.
850
850
 
851
851
    Backend storage is managed by indices and data objects.
887
887
            self._index,
888
888
            self._access)
889
889
 
 
890
    def without_fallbacks(self):
 
891
        """Return a clone of this object without any fallbacks configured."""
 
892
        return KnitVersionedFiles(self._index, self._access,
 
893
            self._max_delta_chain, self._factory.annotated,
 
894
            self._reload_func)
 
895
 
890
896
    def add_fallback_versioned_files(self, a_versioned_files):
891
897
        """Add a source of texts for texts not present in this knit.
892
898
 
1188
1194
        generator = _VFContentMapGenerator(self, [key])
1189
1195
        return generator._get_content(key)
1190
1196
 
1191
 
    def get_known_graph_ancestry(self, keys):
1192
 
        """Get a KnownGraph instance with the ancestry of keys."""
1193
 
        parent_map, missing_keys = self._index.find_ancestry(keys)
1194
 
        for fallback in self._transitive_fallbacks():
1195
 
            if not missing_keys:
1196
 
                break
1197
 
            (f_parent_map, f_missing_keys) = fallback._index.find_ancestry(
1198
 
                                                missing_keys)
1199
 
            parent_map.update(f_parent_map)
1200
 
            missing_keys = f_missing_keys
1201
 
        kg = _mod_graph.KnownGraph(parent_map)
1202
 
        return kg
1203
 
 
1204
1197
    def get_parent_map(self, keys):
1205
1198
        """Get a map of the graph parents of keys.
1206
1199