class documentation

Protocol handler for uploading a pack to the client.

Class Method required_capabilities 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_tagged 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_client_capabilities Set client capabilities and parse filter specification if present.
Instance Variable advertise_refs Undocumented
Instance Variable filter_spec Undocumented
Instance Variable repo Undocumented
Instance Variable write_pack_data Undocumented
Method _start_pack_send_phase Start the pack sending phase, setting up sideband if supported.
Instance Variable _graph_walker Undocumented
Instance Variable _processing_have_lines Undocumented

Inherited from PackHandler:

Class Method innocuous_capabilities Return capabilities that don't affect protocol behavior.
Method has_capability Check if the client supports a specific capability.
Method notify_done Notify that the 'done' command has been received from the client.
Instance Variable _client_capabilities Undocumented
Instance Variable _done_received Undocumented

Inherited from Handler (via PackHandler):

Instance Variable backend Undocumented
Instance Variable proto Undocumented
Instance Variable stateless_rpc Undocumented
def required_capabilities(cls) -> tuple[bytes, ...]:

Return the list of capabilities required for upload-pack.

def __init__(self, backend: Backend, args: Sequence[str], proto: Protocol, stateless_rpc: bool = False, advertise_refs: bool = False):

Initialize an UploadPackHandler.

Parameters
backend:BackendBackend instance for repository access
args:Sequence[str]Command arguments (first arg is repository path)
proto:ProtocolProtocol instance for communication
stateless_rpc:boolWhether this is a stateless RPC session
advertise_refs:boolWhether to advertise refs
def capabilities(self) -> list[bytes]:

Return the list of capabilities supported by upload-pack.

Returns
list[bytes]List of capabilities including object-format for the repository
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[bytes, bytes] | Nonedict of refname -> sha of possible tags; defaults to all of the backend's refs.
repo:BackendRepo | Noneoptional Repo instance for getting peeled refs; defaults to the backend's repo, if available
Returns
dict[ObjectID, ObjectID]Undocumented
def handle(self):

Handle 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.

def progress(self, message: bytes):

Send a progress message to the client.

Parameters
message:bytesProgress message to send
def set_client_capabilities(self, caps: Iterable[bytes]):

Set client capabilities and parse filter specification if present.

Parameters
caps:Iterable[bytes]List of capability strings from the client
advertise_refs =
filter_spec: FilterSpec | None =

Undocumented

repo =

Undocumented

write_pack_data: Callable[[bytes], None] =

Undocumented

def _start_pack_send_phase(self):

Start the pack sending phase, setting up sideband if supported.

_graph_walker =

Undocumented

_processing_have_lines: bool =

Undocumented