704
704
pack_factory = GCPack
705
705
resumed_pack_factory = ResumedGCPack
706
normal_packer_class = GCCHKPacker
707
optimising_packer_class = GCCHKPacker
707
709
def _check_new_inventories(self):
708
710
"""Detect missing inventories or chk root entries for the new revisions
790
792
% (sorted(missing_text_keys),))
793
def _execute_pack_operations(self, pack_operations,
794
_packer_class=GCCHKPacker,
796
"""Execute a series of pack operations.
798
:param pack_operations: A list of [revision_count, packs_to_combine].
799
:param _packer_class: The class of packer to use (default: Packer).
802
# XXX: Copied across from RepositoryPackCollection simply because we
803
# want to override the _packer_class ... :(
804
for revision_count, packs in pack_operations:
805
# we may have no-ops from the setup logic
808
packer = GCCHKPacker(self, packs, '.autopack',
809
reload_func=reload_func)
811
result = packer.pack()
812
except errors.RetryWithNewPacks:
813
# An exception is propagating out of this context, make sure
814
# this packer has cleaned up. Packer() doesn't set its new_pack
815
# state into the RepositoryPackCollection object, so we only
816
# have access to it directly here.
817
if packer.new_pack is not None:
818
packer.new_pack.abort()
823
self._remove_pack_from_memory(pack)
824
# record the newly available packs and stop advertising the old
827
for _, packs in pack_operations:
828
to_be_obsoleted.extend(packs)
829
result = self._save_pack_names(clear_obsolete_packs=True,
830
obsolete_packs=to_be_obsoleted)
834
796
class CHKInventoryRepository(PackRepository):
835
797
"""subclass of PackRepository that uses CHK based inventories."""