class documentation

Object store implementation that uses a bucket store like S3 as backend.

Method add_pack Add a new pack to this object store.
Method delete_loose_object Delete a loose object (no-op for bucket stores).
Method pack_loose_objects Pack loose objects. Returns number of objects packed.
Method _get_loose_object Undocumented
Method _get_pack Undocumented
Method _iter_loose_objects Iterate over the SHAs of all loose objects.
Method _iter_pack_names Undocumented
Method _remove_pack_by_name Remove a pack by name. Subclasses should implement this.
Method _update_pack_cache Undocumented
Method _upload_pack Undocumented

Inherited from PackBasedObjectStore:

Method __contains__ Check if a particular object is present by SHA1.
Method __del__ Warn if the object store is being deleted with unclosed packs.
Method __init__ Initialize a PackBasedObjectStore.
Method __iter__ Iterate over the SHAs that are present in this store.
Method add_objects Add a set of objects to this object store.
Method add_pack_data Add pack data to this object store.
Method close Close the object store and release resources.
Method contains_loose Check if a particular object is present by SHA1 and is loose.
Method contains_packed Check if a particular object is present by SHA1 and is packed.
Method count_pack_files Count the number of pack files.
Method generate_pack_bitmaps Generate bitmap indexes for all packs that don't have them.
Method generate_pack_data Generate pack data objects for a set of wants/haves.
Method get_raw Obtain the raw fulltext for an object.
Method get_reachability_provider Get the best reachability provider for the object store.
Method get_unpacked_object Obtain the unpacked object.
Method iter_unpacked_subset Iterate over a subset of objects, yielding UnpackedObject instances.
Method iterobjects_subset Iterate over a subset of objects in the store.
Method repack Repack the packs in this repository.
Instance Variable delta_base_cache_limit Undocumented
Instance Variable pack_big_file_threshold Undocumented
Instance Variable pack_compression_level Undocumented
Instance Variable pack_delta_cache_size Undocumented
Instance Variable pack_delta_window_size Undocumented
Instance Variable pack_depth Undocumented
Instance Variable pack_index_version Undocumented
Instance Variable pack_threads Undocumented
Instance Variable pack_window_memory Undocumented
Instance Variable packed_git_limit Undocumented
Property alternates Return list of alternate object stores.
Property packs List with pack objects.
Method _add_cached_pack Add a newly appeared pack to the cache by path.
Method _clear_cached_packs Undocumented
Method _enforce_packed_git_limit Evict least-recently-used packs if the memory limit is exceeded.
Method _iter_alternate_objects Iterate over the SHAs of all the objects in alternate stores.
Method _iter_cached_packs Undocumented
Method _mark_pack_used Mark a pack as recently used for LRU tracking.
Method _remove_pack Undocumented
Method _total_pack_mmap_size Return the total mmapped memory across all cached packs.
Instance Variable _pack_access_order Undocumented
Instance Variable _pack_cache Undocumented

Inherited from BaseObjectStore (via PackBasedObjectStore, PackCapableObjectStore):

Method __getitem__ Obtain an object by SHA1.
Method add_object Add a single object to this object store.
Method determine_wants_all Determine which objects are wanted based on refs.
Method find_common_revisions Find which revisions this store has in common using graphwalker.
Method find_missing_objects Find the missing objects required for a set of revisions.
Method get_commit_graph Get the commit graph for this object store.
Method get_object_mtime Get the modification time of an object.
Method iter_prefix Iterate over all SHA1s that start with a given prefix.
Method iter_tree_contents Iterate the contents of a tree and all subtrees.
Method peel_sha Peel all tags from a SHA.
Method prune Prune/clean up this object store.
Method tree_changes Find the differences between the contents of two trees.
Method write_commit_graph Write a commit graph file for this object store.
Instance Variable object_format Undocumented
Method _get_depth Return the current available depth for the given head.
def add_pack(self) -> tuple[BinaryIO, Callable[[], None], Callable[[], None]]:

Add a new pack to this object store.

Returns: Fileobject to write to, a commit function to
call when the pack is finished and an abort function.
def delete_loose_object(self, sha: ObjectID):

Delete a loose object (no-op for bucket stores).

Bucket-based stores don't have loose objects, so this is a no-op.

Parameters
sha:ObjectIDSHA of the object to delete
def pack_loose_objects(self, progress: Callable[[str], None] | None = None) -> int:

Pack loose objects. Returns number of objects packed.

BucketBasedObjectStore doesn't support loose objects, so this is a no-op.

Parameters
progress:Callable[[str], None] | NoneOptional progress reporting callback (ignored)
Returns
intUndocumented
def _get_loose_object(self, sha: ObjectID | RawObjectID):
def _get_pack(self, name: str) -> Pack:

Undocumented

def _iter_loose_objects(self) -> Iterator[ObjectID]:

Iterate over the SHAs of all loose objects.

def _iter_pack_names(self) -> Iterator[str]:

Undocumented

def _remove_pack_by_name(self, name: str):

Remove a pack by name. Subclasses should implement this.

def _update_pack_cache(self) -> list[Pack]:
def _upload_pack(self, basename: str, pack_file: BinaryIO, index_file: BinaryIO):

Undocumented