dulwich.object_store.BaseObjectStore(object)
class documentationdulwich.object_store
(View In Hierarchy)
Known subclasses: dulwich.object_store.MemoryObjectStore, dulwich.object_store.OverlayObjectStore, dulwich.object_store.PackBasedObjectStore
Method | determine_wants_all | Undocumented |
Method | iter_shas | Iterate over the objects for the specified shas. |
Method | contains_loose | Check if a particular object is present by SHA1 and is loose. |
Method | contains_packed | Check if a particular object is present by SHA1 and is packed. |
Method | __contains__ | Check if a particular object is present by SHA1. |
Method | packs | Iterable of pack objects. |
Method | get_raw | Obtain the raw text for an object. |
Method | __getitem__ | Obtain an object by SHA1. |
Method | __iter__ | Iterate over the SHAs that are present in this store. |
Method | add_object | Add a single object to this object store. |
Method | add_objects | Add a set of objects to this object store. |
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_missing_objects | Find the missing objects required for a set of revisions. |
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. |
Method | close | Close any files opened by this object store. |
Method | _collect_ancestors | Collect all ancestors of heads up to (excluding) those in common. |
Parameters | shas | Iterable object with SHAs |
Returns | Object iterator |
Check if a particular object is present by SHA1.
This method makes no distinction between loose and packed objects.
Parameters | name | sha for the object. |
Returns | tuple with numeric type and object contents. |
Parameters | objects | Iterable over a list of (object, path) tuples |
Parameters | num_items | Number of items to add |
pack_data | Iterator over pack data tuples |
Parameters | source | SHA1 of the source tree |
target | SHA1 of the target tree | |
want_unchanged | Whether unchanged files should be reported | |
include_trees | Whether to include trees | |
change_type_same | Whether to report files changing type in the same entry. | |
Returns | Iterator over tuples with (oldpath, newpath), (oldmode, newmode), (oldsha, newsha) |
Iterate the contents of a tree and all subtrees.
Iteration is depth-first pre-order, as in e.g. os.walk.
Parameters | tree_id | SHA1 of the tree. |
include_trees | If True, include tree objects in the iteration. | |
Returns | Iterator over TreeEntry namedtuples for all the objects in a tree. |
Parameters | haves | Iterable over SHAs already in common. |
wants | Iterable over SHAs of objects to fetch. | |
progress | Simple progress function that will be called with updated progress strings. | |
get_tagged | Function that returns a dict of pointed-to sha -> tag sha for including tags. | |
get_parents | Optional function for getting the parents of a commit. | |
Returns | Iterator over (sha, path) pairs. |
Parameters | graphwalker | A graphwalker object. |
Returns | List of SHAs that are in common |
Parameters | have | List of SHA1s of objects that should not be sent |
want | List of SHA1s of objects that should be sent | |
progress | Optional progress reporting method |
Parameters | have | List of SHA1s of objects that should not be sent |
want | List of SHA1s of objects that should be sent | |
ofs_delta | Whether OFS deltas can be included | |
progress | Optional progress reporting method |
Parameters | sha | The object SHA to peel. |
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 | heads | commits to start from |
common | commits to end at, or empty set to walk repository completely | |
get_parents | Optional function for getting the parents of a commit. | |
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 |