class documentation
class UploadPackHandler(PackHandler):
Constructor: UploadPackHandler(backend, args, proto, stateless_rpc, ...)
Protocol handler for uploading a pack to the client.
| Class Method | required |
Return the list of capabilities required for upload-pack. |
| Method | __init__ |
Initialize an UploadPackHandler. |
| Method | capabilities |
Return the list of capabilities supported by upload-pack. |
| Method | get |
Get a dict of peeled values of tags to their original tag shas. |
| Method | handle |
Handle an upload-pack request. |
| Method | progress |
Send a progress message to the client. |
| Method | set |
Set client capabilities and parse filter specification if present. |
| Instance Variable | advertise |
Undocumented |
| Instance Variable | filter |
Undocumented |
| Instance Variable | repo |
Undocumented |
| Instance Variable | write |
Undocumented |
| Method | _start |
Start the pack sending phase, setting up sideband if supported. |
| Instance Variable | _graph |
Undocumented |
| Instance Variable | _processing |
Undocumented |
Inherited from PackHandler:
| Class Method | innocuous |
Return capabilities that don't affect protocol behavior. |
| Method | has |
Check if the client supports a specific capability. |
| Method | notify |
Notify that the 'done' command has been received from the client. |
| Instance Variable | _client |
Undocumented |
| Instance Variable | _done |
Undocumented |
Inherited from Handler (via PackHandler):
| Instance Variable | backend |
Undocumented |
| Instance Variable | proto |
Undocumented |
| Instance Variable | stateless |
Undocumented |
def __init__(self, backend:
Backend, args: Sequence[ str], proto: Protocol, stateless_rpc: bool = False, advertise_refs: bool = False):
¶
overrides
dulwich.server.PackHandler.__init__Initialize an UploadPackHandler.
| Parameters | |
backend:Backend | Backend instance for repository access |
args:Sequence[ | Command arguments (first arg is repository path) |
proto:Protocol | Protocol instance for communication |
statelessbool | Whether this is a stateless RPC session |
advertisebool | Whether to advertise refs |
def get_tagged(self, refs:
Mapping[ bytes, bytes] | None = None, repo: BackendRepo | None = None) -> dict[ ObjectID, ObjectID]:
¶
Get a dict of peeled values of tags to their original tag shas.
- Returns: dict of peeled_sha -> tag_sha, where tag_sha is the sha of a
- tag whose peeled value is peeled_sha.
| Parameters | |
refs:Mapping[ | dict of refname -> sha of possible tags; defaults to all of the backend's refs. |
repo:BackendRepo | None | optional Repo instance for getting peeled refs; defaults to the backend's repo, if available |
| Returns | |
dict[ | Undocumented |
overrides
dulwich.server.Handler.handleHandle an upload-pack request.
This method processes the client's wants and haves, determines which objects to send, and writes the pack data to the client.