class documentation
class MemoryObjectStore(BaseObjectStore):
Object store that keeps all objects in memory.
Method | __delitem__ |
Delete an object from this store, for testing only. |
Method | __getitem__ |
Obtain an object by SHA1. |
Method | __init__ |
Undocumented |
Method | __iter__ |
Iterate over the SHAs that are present in this store. |
Method | add |
Add a single object to this object store. |
Method | add |
Add a set of objects to this object store. |
Method | add |
Add a new pack to this object store. |
Method | add |
Add a new thin pack to 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 text for an object. |
Instance Variable | pack |
Undocumented |
Property | packs |
List with pack objects. |
Method | _complete |
Complete a thin pack by adding external references. |
Method | _to |
Undocumented |
Instance Variable | _data |
Undocumented |
Inherited from BaseObjectStore
:
Method | __contains__ |
Check if a particular object is present by SHA1. |
Method | add |
Add pack data to this object store. |
Method | close |
Close any files opened by this object store. |
Method | determine |
Undocumented |
Method | find |
Find which revisions this store has in common using graphwalker. |
Method | find |
Find the missing objects required for a set of revisions. |
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 over the objects for the specified shas. |
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 | _collect |
Collect all ancestors of heads up to (excluding) those in common. |
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 set of objects to this object store.
Parameters | |
objects | Iterable over a list of (object, path) tuples |
progress | Undocumented |
Add a new pack to this object store.
Because this object store doesn't support packs, we extract and add the individual objects.
- Returns: Fileobject to write to and a commit function to
- call when the pack is finished.
Add a new thin pack to this object store.
Thin packs are packs that contain deltas with parents that exist outside the pack. Because this object store doesn't support packs, we extract and add the individual objects.
Parameters | |
read | Read function that blocks until the number of requested bytes are read. |
read | Read function that returns at least one byte, but may not return the number of bytes requested. |
Obtain the raw text for an object.
Returns: tuple with numeric type and object contents.
Parameters | |
name:ObjectID | sha for the object. |