class documentation

Protocol handler for packs.

Class Method innocuous_capabilities Return capabilities that don't affect protocol behavior.
Class Method required_capabilities Return a list of capabilities that we require the client to have.
Method __init__ Initialize a PackHandler.
Method capabilities Return a list of capabilities supported by this handler.
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.
Method set_client_capabilities Set the client capabilities and validate them.
Instance Variable advertise_refs Undocumented
Instance Variable _client_capabilities Undocumented
Instance Variable _done_received Undocumented

Inherited from Handler:

Method handle Handle a request.
Instance Variable backend Undocumented
Instance Variable proto Undocumented
Instance Variable stateless_rpc Undocumented
def innocuous_capabilities(cls) -> Iterable[bytes]:

Return capabilities that don't affect protocol behavior.

Returns
Iterable[bytes]List of innocuous capability names
def required_capabilities(cls) -> Iterable[bytes]:

Return a list of capabilities that we require the client to have.

def __init__(self, backend: Backend, proto: Protocol, stateless_rpc: bool = False):

Initialize a PackHandler.

Parameters
backend:BackendBackend instance for repository access
proto:ProtocolProtocol instance for communication
stateless_rpc:boolWhether this is a stateless RPC session
def capabilities(self) -> Iterable[bytes]:

Return a list of capabilities supported by this handler.

def has_capability(self, cap: bytes) -> bool:

Check if the client supports a specific capability.

Returns: True if the client supports the capability

Parameters
cap:bytesCapability name to check
Returns
boolUndocumented
Raises
GitProtocolErrorIf called before client capabilities are set
def notify_done(self):

Notify that the 'done' command has been received from the client.

def set_client_capabilities(self, caps: Iterable[bytes]):

Set the client capabilities and validate them.

Parameters
caps:Iterable[bytes]List of capabilities requested by the client
Raises
GitProtocolErrorIf client requests unsupported capability or lacks required ones
_client_capabilities: set[bytes] | None =

Undocumented

_done_received: bool =

Undocumented