/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/groupcompress.py

  • Committer: John Arbash Meinel
  • Date: 2011-05-06 15:15:44 UTC
  • mfrom: (5835 +trunk)
  • mto: This revision was merged to the branch mainline in revision 5836.
  • Revision ID: john@arbash-meinel.com-20110506151544-atzxeezfwssnlacr
Merge bzr.dev 5835 in prep for release-notes updates

Show diffs side-by-side

added added

removed removed

Lines of Context:
1177
1177
class GroupCompressVersionedFiles(VersionedFiles):
1178
1178
    """A group-compress based VersionedFiles implementation."""
1179
1179
 
1180
 
    def __init__(self, index, access, delta=True, _unadded_refs=None):
 
1180
    def __init__(self, index, access, delta=True, _unadded_refs=None,
 
1181
            _group_cache=None):
1181
1182
        """Create a GroupCompressVersionedFiles object.
1182
1183
 
1183
1184
        :param index: The index object storing access and graph data.
1184
1185
        :param access: The access object storing raw data.
1185
1186
        :param delta: Whether to delta compress or just entropy compress.
1186
1187
        :param _unadded_refs: private parameter, don't use.
 
1188
        :param _group_cache: private parameter, don't use.
1187
1189
        """
1188
1190
        self._index = index
1189
1191
        self._access = access
1191
1193
        if _unadded_refs is None:
1192
1194
            _unadded_refs = {}
1193
1195
        self._unadded_refs = _unadded_refs
1194
 
        self._group_cache = LRUSizeCache(max_size=50*1024*1024)
 
1196
        if _group_cache is None:
 
1197
            _group_cache = LRUSizeCache(max_size=50*1024*1024)
 
1198
        self._group_cache = _group_cache
1195
1199
        self._immediate_fallback_vfs = []
1196
1200
 
1197
1201
    def without_fallbacks(self):
1198
1202
        """Return a clone of this object without any fallbacks configured."""
1199
1203
        return GroupCompressVersionedFiles(self._index, self._access,
1200
 
            self._delta, _unadded_refs=dict(self._unadded_refs))
 
1204
            self._delta, _unadded_refs=dict(self._unadded_refs),
 
1205
            _group_cache=self._group_cache)
1201
1206
 
1202
1207
    def add_lines(self, key, parents, lines, parent_texts=None,
1203
1208
        left_matching_blocks=None, nostore_sha=None, random_id=False,