class BaseObjectStore(object):
Known subclasses: dulwich.object_store.MemoryObjectStore
, dulwich.object_store.OverlayObjectStore
, dulwich.object_store.PackBasedObjectStore
Object store interface.
Method | __contains__ |
Check if a particular object is present by SHA1. |
Method | __getitem__ |
Obtain an object by SHA1. |
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 pack data 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 | 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 | get |
Obtain the raw text for an object. |
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 |
Property | packs |
Iterable of pack objects. |
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. |
dulwich.object_store.PackBasedObjectStore
Check if a particular object is present by SHA1.
This method makes no distinction between loose and packed objects.
dulwich.object_store.MemoryObjectStore
Obtain an object by SHA1.
Parameters | |
sha:ObjectID | Undocumented |
dulwich.object_store.MemoryObjectStore
, dulwich.object_store.OverlayObjectStore
, dulwich.object_store.PackBasedObjectStore
Iterate over the SHAs that are present in this store.
dulwich.contrib.swift.SwiftObjectStore
, dulwich.object_store.DiskObjectStore
, dulwich.object_store.MemoryObjectStore
, dulwich.object_store.OverlayObjectStore
Add a single object to this object store.
dulwich.object_store.MemoryObjectStore
, dulwich.object_store.OverlayObjectStore
, dulwich.object_store.PackBasedObjectStore
Add a set of objects to this object store.
Parameters | |
objects | Iterable over a list of (object, path) tuples |
progress | Undocumented |
Add pack data to this object store.
Parameters | |
count | Number of items to add |
pack | Iterator over pack data tuples |
progress | Undocumented |
dulwich.object_store.PackBasedObjectStore
Close any files opened by this object store.
dulwich.object_store.MemoryObjectStore
, dulwich.object_store.OverlayObjectStore
, dulwich.object_store.PackBasedObjectStore
Check if a particular object is present by SHA1 and is loose.
dulwich.object_store.MemoryObjectStore
, dulwich.object_store.OverlayObjectStore
, dulwich.object_store.PackBasedObjectStore
Check if a particular object is present by SHA1 and is packed.
Find which revisions this store has in common using graphwalker.
Returns: List of SHAs that are in common
Parameters | |
graphwalker | A graphwalker object. |
dulwich.contrib.swift.SwiftObjectStore
Find the missing objects required for a set of revisions.
Returns: Iterator over (sha, path) pairs.
Parameters | |
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. |
depth | Undocumented |
Iterate over the contents of a pack file.
Parameters | |
have | List of SHA1s of objects that should not be sent |
want | List of SHA1s of objects that should be sent |
shallow | Set of shallow commit SHA1s to skip |
progress | Optional progress reporting method |
Generate pack data objects for a set of wants/haves.
Parameters | |
have | List of SHA1s of objects that should not be sent |
want | List of SHA1s of objects that should be sent |
shallow | Set of shallow commit SHA1s to skip |
progress | Optional progress reporting method |
ofs | Whether OFS deltas can be included |
dulwich.object_store.MemoryObjectStore
, dulwich.object_store.OverlayObjectStore
, dulwich.object_store.PackBasedObjectStore
Obtain the raw text for an object.
Returns: tuple with numeric type and object contents.
Parameters | |
name | sha for the object. |
dulwich.contrib.swift.SwiftObjectStore
Iterate over the objects for the specified shas.
Returns: Object iterator
Parameters | |
shas | Iterable object with SHAs |
Iterate the contents of a tree and all subtrees.
Iteration is depth-first pre-order, as in e.g. os.walk.
- Returns: Iterator over TreeEntry namedtuples for all the objects in a
- tree.
Parameters | |
tree | SHA1 of the tree. |
include | If True, include tree objects in the iteration. |
Peel all tags from a SHA.
- Returns: The fully-peeled SHA1 of a tag object, after peeling all
- intermediate tags; if the original ref does not point to a tag, this will equal the original SHA1.
Parameters | |
sha | The object SHA to peel. |
Find the differences between the contents of two trees
- Returns: Iterator over tuples with
- (oldpath, newpath), (oldmode, newmode), (oldsha, newsha)
Parameters | |
source | SHA1 of the source tree |
target | SHA1 of the target tree |
want | Whether unchanged files should be reported |
include | Whether to include trees |
change | Whether to report files changing type in the same entry. |
rename | Undocumented |
dulwich.object_store.MemoryObjectStore
, dulwich.object_store.OverlayObjectStore
, dulwich.object_store.PackBasedObjectStore
Iterable of pack objects.
dulwich.contrib.swift.SwiftObjectStore
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 |
shallow | Undocumented |
get | Optional function for getting the parents of a commit. |