class documentation
class SwiftObjectStore(PackBasedObjectStore):
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 | add |
Add a single object to this object store. |
Method | add |
Add a new pack to this object store. |
Method | add |
Read a thin pack |
Method | find |
Find the missing objects required for a set of revisions. |
Method | iter |
An iterator over pack's ObjectStore. |
Method | pack |
Undocumented |
Instance Variable | pack |
Undocumented |
Instance Variable | root |
Undocumented |
Instance Variable | scon |
Undocumented |
Method | _collect |
Collect all ancestors of heads up to (excluding) those in common. |
Method | _complete |
Undocumented |
Method | _get |
Undocumented |
Method | _iter |
Loose objects are not supported by this repository |
Method | _pack |
Undocumented |
Method | _update |
Undocumented |
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 |
Add a set of objects to this object store. |
Method | close |
Close any files opened by this object store. |
Method | contains |
Check if a particular object is present by SHA1 and is loose. |
Method | contains |
Check if a particular object is present by SHA1 and is packed. |
Method | get |
Obtain the raw fulltext for an object. |
Method | pack |
Pack loose objects. |
Method | repack |
Repack the packs in this repository. |
Instance Variable | pack |
Undocumented |
Property | alternates |
Undocumented |
Property | packs |
List with pack objects. |
Method | _add |
Add a newly appeared pack to the cache by path. |
Method | _clear |
Undocumented |
Method | _iter |
Iterate over the SHAs of all the objects in alternate stores. |
Method | _iter |
Undocumented |
Method | _remove |
Undocumented |
Method | _remove |
Undocumented |
Instance Variable | _pack |
Undocumented |
Inherited from BaseObjectStore
(via PackBasedObjectStore
):
Method | __getitem__ |
Obtain an object by SHA1. |
Method | add |
Add pack data to this object store. |
Method | determine |
Undocumented |
Method | find |
Find which revisions this store has in common using graphwalker. |
Method | generate |
Iterate over the contents of a pack file. |
Method | generate |
Generate pack data objects for a set of wants/haves. |
Method | iter |
Iterate the contents of a tree and all subtrees. |
Method | peel |
Peel all tags from a SHA. |
Method | tree |
Find the differences between the contents of two trees |
Method | _get |
Return the current available depth for the given head. For commits with multiple parents, the largest possible depth will be returned. |
Add a new pack to this object store.
- Returns: Fileobject to write to and a commit function to
- call when the pack is finished.
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.
Find the missing objects required for a set of revisions.
Returns: Iterator over (sha, path) pairs.
Parameters | |
*args | Undocumented |
**kwargs | Undocumented |
haves | Iterable over SHAs already in common. |
wants | Iterable over SHAs of objects to fetch. |
shallow | Set of shallow commit SHA1s to skip |
progress | Simple progress function that will be called with updated progress strings. |
get | Function that returns a dict of pointed-to sha -> tag sha for including tags. |
get | Optional function for getting the parents of a commit. |
An iterator over pack's ObjectStore.
- Returns: a
ObjectStoreIterator
orGreenThreadsObjectStoreIterator
- instance if gevent is enabled
Collect all ancestors of heads up to (excluding) those in common.
- Returns: a 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
Parameters | |
heads | commits to start from |
common | commits to end at, or empty set to walk repository completely |
get | Optional function for getting the parents of a commit. |