class documentation
class DiskObjectStore(PackBasedObjectStore):
Git-style object store that exists on disk.
Class Method | from |
Undocumented |
Class Method | init |
Undocumented |
Method | __init__ |
Open an object store. |
Method | __repr__ |
Undocumented |
Method | add |
Add an alternate path to this object store. |
Method | add |
Add a single object 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 | move |
Move a specific file containing a pack into the pack directory. |
Instance Variable | loose |
Undocumented |
Instance Variable | pack |
Undocumented |
Instance Variable | pack |
Undocumented |
Instance Variable | path |
Undocumented |
Property | alternates |
Undocumented |
Method | _complete |
Move a specific file containing a pack into the pack directory. |
Method | _get |
Undocumented |
Method | _get |
Undocumented |
Method | _get |
Undocumented |
Method | _iter |
Iterate over the SHAs of all loose objects. |
Method | _read |
Undocumented |
Method | _remove |
Undocumented |
Method | _remove |
Undocumented |
Method | _update |
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 |
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. |
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 |
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 | 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. |
Open an object store.
Parameters | |
path | Path of the object store. |
loose | zlib compression level for loose objects |
pack | zlib compression level for pack objects |
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.
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 | 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. |
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 | |
path | Path to the pack file. |
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 | |
f | Open file object for the pack. |
path | Path to the pack file. |
copier | A PackStreamCopier to use for writing pack data. |
indexer | A PackIndexer for indexing the pack. |