A Swift Object Store

Allow to manage a bare Git repository from Openstack Swift. This object store only supports pack files and not loose objects.

Method __init__ Open a Swift object store.
Method packs List with pack objects.
Method iter_shas An iterator over pack's ObjectStore.
Method find_missing_objects Find the missing objects required for a set of revisions.
Method pack_info_get Undocumented
Method add_pack Add a new pack to this object store.
Method add_object Add a single object to this object store.
Method add_thin_pack Read a thin pack
Method _update_pack_cache Undocumented
Method _iter_loose_objects Loose objects are not supported by this repository
Method _load_packs Load all packs from Swift
Method _collect_ancestors Collect all ancestors of heads up to (excluding) those in common.
Method _pack_cache_stale Check whether the pack cache is stale.
Method _get_loose_object Undocumented
Method _complete_thin_pack Undocumented

Inherited from BaseObjectStore (via PackBasedObjectStore):

Method determine_wants_all Undocumented
Method __getitem__ Obtain an object by SHA1.
Method add_pack_data Add pack data to this object store.
Method tree_changes Find the differences between the contents of two trees
Method iter_tree_contents Iterate the contents of a tree and all subtrees.
Method find_common_revisions Find which revisions this store has in common using graphwalker.
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 peel_sha Peel all tags from a SHA.

Inherited from BaseObjectStore (via PackBasedObjectStore):

Method determine_wants_all Undocumented
Method __getitem__ Obtain an object by SHA1.
Method add_pack_data Add pack data to this object store.
Method tree_changes Find the differences between the contents of two trees
Method iter_tree_contents Iterate the contents of a tree and all subtrees.
Method find_common_revisions Find which revisions this store has in common using graphwalker.
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 peel_sha Peel all tags from a SHA.
def __init__(self, scon):
Open a Swift object store.
ParameterssconA SwiftConnector instance
@property
def packs(self):
List with pack objects.
def _update_pack_cache(self):
Undocumented
def _iter_loose_objects(self):
Loose objects are not supported by this repository
def iter_shas(self, finder):
An iterator over pack's ObjectStore.
Returnsa ObjectStoreIterator or GreenThreadsObjectStoreIterator instance if gevent is enabled
def find_missing_objects(self, *args, **kwargs):
Find the missing objects required for a set of revisions.
ParametershavesIterable over SHAs already in common.
wantsIterable over SHAs of objects to fetch.
progressSimple progress function that will be called with updated progress strings.
get_taggedFunction that returns a dict of pointed-to sha -> tag sha for including tags.
get_parentsOptional function for getting the parents of a commit.
ReturnsIterator over (sha, path) pairs.
def _load_packs(self):
Load all packs from Swift
Returnsa list of SwiftPack instances
def pack_info_get(self, sha):
Undocumented
def _collect_ancestors(self, heads, common=set()):
Collect all ancestors of heads up to (excluding) those in common.
Parametersheadscommits to start from
commoncommits to end at, or empty set to walk repository completely
get_parentsOptional function for getting the parents of a commit.
Returnsa tuple (A, B) where A - all commits reachable from heads but not present in common, B - common (shared) elements that are directly reachable from heads
def add_pack(self):
Add a new pack to this object store.
ReturnsFileobject to write to and a commit function to call when the pack is finished.
def add_object(self, obj):
Add a single object to this object store.
def _pack_cache_stale(self):
Check whether the pack cache is stale.
def _get_loose_object(self, sha):
def add_thin_pack(self, read_all, read_some):

Read a thin pack

Read it from a stream and complete it in a temporary file. Then the pack and the corresponding index file are uploaded to Swift.

def _complete_thin_pack(self, f, path, copier, indexer):
Undocumented
API Documentation for Dulwich, generated by pydoctor at 2018-11-17 19:05:54.