class documentation
class MissingObjectFinder:
Constructor: MissingObjectFinder(object_store, haves, wants, shallow, ...)
Find the objects missing from another object store.
| Parameters | |
| object | Object store containing at least all objects to be sent |
| haves | SHA1s of commits not to send (already present in target) |
| wants | SHA1s of commits to send |
| progress | Optional function to report progress to. |
| 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. |
| Method | __init__ |
Initialize a MissingObjectFinder. |
| Method | __iter__ |
Return iterator over objects to send. |
| Method | __next__ |
Get the next object to send. |
| Method | add |
Add objects to the todo list. |
| Method | get |
Get the set of SHAs the remote has. |
| Instance Variable | object |
Undocumented |
| Instance Variable | objects |
Undocumented |
| Instance Variable | progress |
Undocumented |
| Instance Variable | remote |
Undocumented |
| Instance Variable | sha |
Undocumented |
| Instance Variable | _get |
Undocumented |
| Instance Variable | _tagged |
Undocumented |
def __init__(self, object_store:
BaseObjectStore, haves: Iterable[ ObjectID], wants: Iterable[ ObjectID], *, shallow: Set[ ObjectID] | None = None, progress: Callable[ [ bytes], None] | None = None, get_tagged: Callable[ [], dict[ ObjectID, ObjectID]] | None = None, get_parents: Callable[ [ Commit], list[ ObjectID]] = lambda commit: commit.parents):
¶
Initialize a MissingObjectFinder.
| Parameters | |
objectBaseObjectStore | Object store containing objects |
haves:Iterable[ | SHA1s of objects already present in target |
wants:Iterable[ | SHA1s of objects to send |
shallow:Set[ | Set of shallow commit SHA1s |
progress:Callable[ | Optional progress reporting callback |
getCallable[ | Function returning dict of pointed-to sha -> tag sha |
getCallable[ | Function for getting commit parents |
Get the next object to send.
| Returns | |
tuple[ | Tuple of (sha, pack_hint) |
| Raises | |
StopIteration | When no more objects to send |