74
82
files created during the pack creation. e.g '.autopack'
75
83
:param file_mode: An optional file mode to create the new files with.
85
# replaced from bzr.dev to:
86
# - change inventory reference list length to 1
87
# - change texts reference lists to 1
88
# TODO: patch this to be parameterised upstream
77
90
# The relative locations of the packs are constrained, but all are
78
91
# passed in because the caller has them, so as to avoid object churn.
79
92
index_builder_class = pack_collection._index_builder_class
81
# Revisions: parents list, no text compression.
82
index_builder_class(reference_lists=1),
83
# Inventory: compressed, with graph for compatibility with other
84
# existing bzrlib code.
85
index_builder_class(reference_lists=1),
86
# Texts: per file graph:
87
index_builder_class(reference_lists=1, key_elements=2),
88
# Signatures: Just blobs to store, no compression, no parents
90
index_builder_class(reference_lists=0),
95
if pack_collection.chk_index is not None:
96
chk_index = index_builder_class(reference_lists=0)
100
# Revisions: parents list, no text compression.
101
index_builder_class(reference_lists=1),
102
# Inventory: We want to map compression only, but currently the
103
# knit code hasn't been updated enough to understand that, so we
104
# have a regular 2-list index giving parents and compression
106
index_builder_class(reference_lists=1),
107
# Texts: compression and per file graph, for all fileids - so two
108
# reference lists and two elements in the key tuple.
109
index_builder_class(reference_lists=1, key_elements=2),
110
# Signatures: Just blobs to store, no compression, no parents
112
index_builder_class(reference_lists=0),
113
# CHK based storage - just blobs, no compression or parents.
119
# Revisions: parents list, no text compression.
120
index_builder_class(reference_lists=1),
121
# Inventory: compressed, with graph for compatibility with other
122
# existing bzrlib code.
123
index_builder_class(reference_lists=1),
124
# Texts: per file graph:
125
index_builder_class(reference_lists=1, key_elements=2),
126
# Signatures: Just blobs to store, no compression, no parents
128
index_builder_class(reference_lists=0),
92
130
self._pack_collection = pack_collection
93
131
# When we make readonly indices, we need this.
94
132
self.index_class = pack_collection._index_class
196
239
_commit_builder_class, _serializer)
197
240
# and now replace everything it did :)
198
241
index_transport = self._transport.clone('indices')
199
self._pack_collection = GCRepositoryPackCollection(self,
200
self._transport, index_transport,
201
self._transport.clone('upload'),
202
self._transport.clone('packs'),
203
_format.index_builder_class,
243
self._pack_collection = GCRepositoryPackCollection(self,
244
self._transport, index_transport,
245
self._transport.clone('upload'),
246
self._transport.clone('packs'),
247
_format.index_builder_class,
249
use_chk_index=self._format.supports_chks,
252
self._pack_collection = GCRepositoryPackCollection(self,
253
self._transport, index_transport,
254
self._transport.clone('upload'),
255
self._transport.clone('packs'),
256
_format.index_builder_class,
205
258
self.inventories = GroupCompressVersionedFiles(
206
259
_GCGraphIndex(self._pack_collection.inventory_index.combined_index,
207
260
add_callback=self._pack_collection.inventory_index.add_callback,
284
337
return ("Development repository format - btree+groupcompress "
285
338
", interoperates with pack-0.92-subtrees\n")
341
'Bazaar development format - 1.9+gc (needs bzr.dev from 1.9)\n',
342
class RepositoryFormatPackGCPlainCHK(RepositoryFormatPackDevelopment4):
343
"""A CHK+group compress pack repository."""
345
repository_class = GCPackRepository
347
def get_format_string(self):
348
"""See RepositoryFormat.get_format_string()."""
349
return ('Bazaar development format - chk+gc '
350
'(needs bzr.dev from 1.12)\n')
352
def get_format_description(self):
353
"""See RepositoryFormat.get_format_description()."""
354
return ("Development repository format - chk+groupcompress "
355
", interoperates with pack-0.92\n")
288
361
def pack_incompatible(source, target, orig_method=InterPackRepo.is_compatible):
289
362
formats = (RepositoryFormatPackGCPlain, RepositoryFormatPackGCRichRoot,