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

Part of bzrlib.repofmt.pack_repo View In Hierarchy

Known subclasses: bzrlib.repofmt.pack_repo.ExistingPack, bzrlib.repofmt.pack_repo.NewPack

An in memory proxy for a pack and its indices.

This is a base class that is not directly used, instead the classes ExistingPack and NewPack are used.

Method __init__ Create a pack instance.
Method access_tuple Return a tuple (transport, name) for the pack content.
Method file_name Get the file name for the pack on disk.
Method get_revision_count Undocumented
Method index_name Get the disk name of an index type for pack name 'name'.
Method index_offset Get the position in a index_size array for a given index type.
Method inventory_index_name The inv index is the name + .iix.
Method revision_index_name The revision index is the name + .rix.
Method signature_index_name The signature index is the name + .six.
Method text_index_name The text index is the name + .tix.
Method _check_references Make sure our external references are present.
Method _replace_index_with_readonly Undocumented
def __init__(self, revision_index, inventory_index, text_index, signature_index, chk_index=None):
Create a pack instance.
Parametersrevision_indexA GraphIndex for determining what revisions are present in the Pack and accessing the locations of their texts.
inventory_indexA GraphIndex for determining what inventories are present in the Pack and accessing the locations of their texts/deltas.
text_indexA GraphIndex for determining what file texts are present in the pack and accessing the locations of their texts/deltas (via (fileid, revisionid) tuples).
signature_indexA GraphIndex for determining what signatures are present in the Pack and accessing the locations of their texts.
chk_indexA GraphIndex for accessing content by CHK, if the pack has one.
def access_tuple(self):
Return a tuple (transport, name) for the pack content.
def _check_references(self):
Make sure our external references are present.

Packs are allowed to have deltas whose base is not in the pack, but it must be present somewhere in this collection. It is not allowed to have deltas based on a fallback repository. (See <https://bugs.launchpad.net/bzr/+bug/288751>)

def file_name(self):
Get the file name for the pack on disk.
def get_revision_count(self):
Undocumented
def index_name(self, index_type, name):
Get the disk name of an index type for pack name 'name'.
def index_offset(self, index_type):
Get the position in a index_size array for a given index type.
def inventory_index_name(self, name):
The inv index is the name + .iix.
def revision_index_name(self, name):
The revision index is the name + .rix.
def signature_index_name(self, name):
The signature index is the name + .six.
def text_index_name(self, name):
The text index is the name + .tix.
def _replace_index_with_readonly(self, index_type):
Undocumented
API Documentation for Bazaar, generated by pydoctor at 2022-06-16 00:25:16.