313
313
_commit_builder_class, _serializer)
314
314
# and now replace everything it did :)
315
315
index_transport = self._transport.clone('indices')
317
self._pack_collection = GCRepositoryPackCollection(self,
318
self._transport, index_transport,
319
self._transport.clone('upload'),
320
self._transport.clone('packs'),
321
_format.index_builder_class,
323
use_chk_index=self._format.supports_chks,
326
self._pack_collection = GCRepositoryPackCollection(self,
327
self._transport, index_transport,
328
self._transport.clone('upload'),
329
self._transport.clone('packs'),
330
_format.index_builder_class,
316
self._pack_collection = GCRepositoryPackCollection(self,
317
self._transport, index_transport,
318
self._transport.clone('upload'),
319
self._transport.clone('packs'),
320
_format.index_builder_class,
322
use_chk_index=self._format.supports_chks,
332
324
self.inventories = GroupCompressVersionedFiles(
333
325
_GCGraphIndex(self._pack_collection.inventory_index.combined_index,
334
326
add_callback=self._pack_collection.inventory_index.add_callback,
351
343
add_callback=self._pack_collection.text_index.add_callback,
352
344
parents=True, is_locked=self.is_locked),
353
345
access=self._pack_collection.text_index.data_access)
354
if chk_support and _format.supports_chks:
355
# No graph, no compression:- references from chks are between
356
# different objects not temporal versions of the same; and without
357
# some sort of temporal structure knit compression will just fail.
358
self.chk_bytes = GroupCompressVersionedFiles(
359
_GCGraphIndex(self._pack_collection.chk_index.combined_index,
360
add_callback=self._pack_collection.chk_index.add_callback,
361
parents=False, is_locked=self.is_locked),
362
access=self._pack_collection.chk_index.data_access)
364
self.chk_bytes = None
346
assert _format.supports_chks
347
# No parents, individual CHK pages don't have specific ancestry
348
self.chk_bytes = GroupCompressVersionedFiles(
349
_GCGraphIndex(self._pack_collection.chk_index.combined_index,
350
add_callback=self._pack_collection.chk_index.add_callback,
351
parents=False, is_locked=self.is_locked),
352
access=self._pack_collection.chk_index.data_access)
365
353
# True when the repository object is 'write locked' (as opposed to the
366
# physical lock only taken out around changes to the pack-names list.)
354
# physical lock only taken out around changes to the pack-names list.)
367
355
# Another way to represent this would be a decorator around the control
368
356
# files object that presents logical locks as physical ones - if this
369
357
# gets ugly consider that alternative design. RBC 20071011
437
425
"""See RepositoryFormat.get_format_description()."""
438
426
return ("Development repository format - chk+groupcompress")
440
429
class RepositoryFormatPackGCPlainCHK16(RepositoryFormatPackDevelopment5Hash16):
441
430
"""A hashed CHK+group compress pack repository."""
452
441
return ("Development repository format - hash16chk+groupcompress")
458
444
def pack_incompatible(source, target, orig_method=InterPackRepo.is_compatible):
459
445
"""Be incompatible with the regular fetch code."""
460
446
formats = (RepositoryFormatPackGCPlain, RepositoryFormatPackGCRichRoot,