1168
1168
class GroupCompressVersionedFiles(VersionedFiles):
1169
1169
"""A group-compress based VersionedFiles implementation."""
1171
def __init__(self, index, access, delta=True):
1171
def __init__(self, index, access, delta=True, _unadded_refs=None):
1172
1172
"""Create a GroupCompressVersionedFiles object.
1174
1174
:param index: The index object storing access and graph data.
1175
1175
:param access: The access object storing raw data.
1176
1176
:param delta: Whether to delta compress or just entropy compress.
1177
:param _unadded_refs: private parameter, don't use.
1178
1179
self._index = index
1179
1180
self._access = access
1180
1181
self._delta = delta
1181
self._unadded_refs = {}
1182
if _unadded_refs is None:
1184
self._unadded_refs = _unadded_refs
1182
1185
self._group_cache = LRUSizeCache(max_size=50*1024*1024)
1183
1186
self._fallback_vfs = []
1185
1188
def without_fallbacks(self):
1186
gcvf = GroupCompressVersionedFiles(
1187
self._index, self._access, self._delta)
1188
gcvf._unadded_refs = dict(self._unadded_refs)
1189
"""Return a clone of this object without any fallbacks configured."""
1190
return GroupCompressVersionedFiles(self._index, self._access,
1191
self._delta, _unadded_refs=dict(self._unadded_refs))
1191
1193
def add_lines(self, key, parents, lines, parent_texts=None,
1192
1194
left_matching_blocks=None, nostore_sha=None, random_id=False,