b.r.p.Packer(object) : class documentation

Part of bzrlib.repofmt.pack_repo View In Hierarchy

Known subclasses: bzrlib.repofmt.groupcompress_repo.GCCHKPacker, bzrlib.repofmt.knitpack_repo.KnitPacker

Create a pack from packs.
Method __init__ Create a Packer.
Method pack Create a new pack by reading data from other packs.
Method open_pack Open a pack for the pack we are creating.
Method _copy_revision_texts Copy revision data to the new pack.
Method _copy_inventory_texts Copy the inventory texts to the new pack.
Method _copy_text_texts Undocumented
Method _create_pack_from_packs Undocumented
Method _log_copied_texts Undocumented
Method _use_pack Return True if new_pack should be used.
def __init__(self, pack_collection, packs, suffix, revision_ids=None, reload_func=None):
Create a Packer.
Parameterspack_collectionA RepositoryPackCollection object where the new pack is being written to.
packsThe packs to combine.
suffixThe suffix to use on the temporary files for the pack.
revision_idsRevision ids to limit the pack to.
reload_funcA function to call if a pack file/index goes missing. The side effect of calling this function should be to update self.packs. See also AggregateIndex
def pack(self, pb=None):
Create a new pack by reading data from other packs.

This does little more than a bulk copy of data. One key difference is that data with the same item key across multiple packs is elided from the output. The new pack is written into the current pack store along with its indices, and the name added to the pack names. The source packs are not altered and are not required to be in the current pack collection.

ParameterspbAn optional progress bar to use. A nested bar is created if this is None.
ReturnsA Pack object, or None if nothing was copied.
def open_pack(self):
Open a pack for the pack we are creating.
def _copy_revision_texts(self):
Copy revision data to the new pack.
def _copy_inventory_texts(self):
Copy the inventory texts to the new pack.

self._revision_keys is used to determine what inventories to copy.

Sets self._text_filter appropriately.

def _copy_text_texts(self):
Undocumented
def _create_pack_from_packs(self):
Undocumented
def _log_copied_texts(self):
Undocumented
def _use_pack(self, new_pack):
Return True if new_pack should be used.
Parametersnew_packThe pack that has just been created.
ReturnsTrue if the pack should be used.
API Documentation for Bazaar, generated by pydoctor at 2019-10-20 00:34:54.