class documentation

class DiskObjectStore(PackBasedObjectStore):

View In Hierarchy

Git-style object store that exists on disk.

Class Method from_config Undocumented
Class Method init Undocumented
Method __init__ Open an object store.
Method __repr__ Undocumented
Method add_alternate_path Add an alternate path to this object store.
Method add_object Add a single object to this object store.
Method add_pack Add a new pack to this object store.
Method add_thin_pack Add a new thin pack to this object store.
Method move_in_pack Move a specific file containing a pack into the pack directory.
Instance Variable loose_compression_level Undocumented
Instance Variable pack_compression_level Undocumented
Instance Variable pack_dir Undocumented
Instance Variable path Undocumented
Property alternates Undocumented
Method _complete_thin_pack Move a specific file containing a pack into the pack directory.
Method _get_loose_object Undocumented
Method _get_pack_basepath Undocumented
Method _get_shafile_path Undocumented
Method _iter_loose_objects Iterate over the SHAs of all loose objects.
Method _read_alternate_paths Undocumented
Method _remove_loose_object Undocumented
Method _remove_pack Undocumented
Method _update_pack_cache Read and iterate over new pack files and cache them.
Instance Variable _alternates Undocumented

Inherited from PackBasedObjectStore:

Method __contains__ Check if a particular object is present by SHA1.
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 close Close any files opened by this object store.
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 get_raw Obtain the raw fulltext for an object.
Method pack_loose_objects Pack loose objects.
Method repack Repack the packs in this repository.
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 _iter_alternate_objects Iterate over the SHAs of all the objects in alternate stores.
Method _iter_cached_packs Undocumented
Instance Variable _pack_cache Undocumented

Inherited from BaseObjectStore (via PackBasedObjectStore):

Method __getitem__ Obtain an object by SHA1.
Method add_pack_data Add pack data to this object store.
Method determine_wants_all Undocumented
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 generate_pack_contents Iterate over the contents of a pack file.
Method generate_pack_data Generate pack data objects for a set of wants/haves.
Method iter_shas Iterate over the objects for the specified shas.
Method iter_tree_contents Iterate the contents of a tree and all subtrees.
Method peel_sha Peel all tags from a SHA.
Method tree_changes Find the differences between the contents of two trees
Method _collect_ancestors Collect all ancestors of heads up to (excluding) those in common.
Method _get_depth Return the current available depth for the given head. For commits with multiple parents, the largest possible depth will be returned.
@classmethod
def from_config(cls, path, config):

Undocumented

@classmethod
def init(cls, path):

Undocumented

def __init__(self, path, loose_compression_level=-1, pack_compression_level=-1):

Open an object store.

Parameters
pathPath of the object store.
loose_compression_levelzlib compression level for loose objects
pack_compression_levelzlib compression level for pack objects
def __repr__(self):

Undocumented

def add_alternate_path(self, path):

Add an alternate path to this object store.

def add_object(self, obj):

Add a single object to this object store.

Parameters
objObject to add
def add_pack(self):

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 add_thin_pack(self, read_all, read_some):

Add a new thin pack to this object store.

Thin packs are packs that contain deltas with parents that exist outside the pack. They should never be placed in the object store directly, and always indexed and completed as they are copied.

Returns: A Pack object pointing at the now-completed thin pack in the
objects/pack directory.
Parameters
read_allRead function that blocks until the number of requested bytes are read.
read_someRead function that returns at least one byte, but may not return the number of bytes requested.
def move_in_pack(self, path):

Move a specific file containing a pack into the pack directory.

Note: The file should be on the same file system as the
packs directory.
Parameters
pathPath to the pack file.
loose_compression_level =

Undocumented

pack_compression_level =
pack_dir =

Undocumented

path =

Undocumented

def _complete_thin_pack(self, f, path, copier, indexer):

Move a specific file containing a pack into the pack directory.

Note: The file should be on the same file system as the
packs directory.
Parameters
fOpen file object for the pack.
pathPath to the pack file.
copierA PackStreamCopier to use for writing pack data.
indexerA PackIndexer for indexing the pack.
def _get_loose_object(self, sha):
def _get_pack_basepath(self, entries):

Undocumented

def _get_shafile_path(self, sha):

Undocumented

def _iter_loose_objects(self):

Iterate over the SHAs of all loose objects.

def _read_alternate_paths(self):

Undocumented

def _remove_loose_object(self, sha):
def _remove_pack(self, pack):
def _update_pack_cache(self):

Read and iterate over new pack files and cache them.

_alternates =

Undocumented