class documentation

Repository implementation for dumb HTTP remotes.

Method __init__ Initialize a DumbRemoteHTTPRepo.
Method fetch_pack_data Fetch pack data from the remote.
Method get_head Get the current HEAD reference.
Method get_peeled Get the peeled value of a ref.
Method get_refs Get dictionary with all refs.
Instance Variable base_url Undocumented
Instance Variable object_store Undocumented
Method _fetch_url Fetch content from a URL path relative to base_url.
Instance Variable _http_request Undocumented
Instance Variable _peeled Undocumented
Instance Variable _refs Undocumented
def __init__(self, base_url: str, http_request_func: Callable[[str, dict[str, str]], tuple[Any, Callable[..., bytes]]]):

Initialize a DumbRemoteHTTPRepo.

Parameters
base_url:strBase URL of the remote repository
http_request_func:Callable[[str, dict[str, str]], tuple[Any, Callable[..., bytes]]]Function to make HTTP requests.
def fetch_pack_data(self, determine_wants: Callable[[Mapping[Ref, ObjectID], (int | None)], list[ObjectID]], graph_walker: object, progress: Callable[[bytes], None] | None = None, *, get_tagged: bool | None = None, depth: int | None = None) -> Iterator[UnpackedObject]:

Fetch pack data from the remote.

This is the main method for fetching objects from a dumb HTTP remote. Since dumb HTTP doesn't support negotiation, we need to download all objects reachable from the wanted refs.

Parameters
determine_wants:Callable[[Mapping[Ref, ObjectID], (int | None)], list[ObjectID]]Function that returns list of wanted SHAs
graph_walker:objectGraphWalker instance (not used for dumb HTTP)
progress:Callable[[bytes], None] | NoneOptional progress callback
get_tagged:bool | NoneWhether to get tagged objects
depth:int | NoneDepth for shallow clones (not supported for dumb HTTP)
Returns
Iterator[UnpackedObject]Iterator of UnpackedObject instances
def get_head(self) -> Ref | None:

Get the current HEAD reference.

Returns
Ref | NoneHEAD reference name or commit ID
def get_peeled(self, ref: Ref) -> ObjectID:

Get the peeled value of a ref.

def get_refs(self) -> dict[Ref, ObjectID]:

Get dictionary with all refs.

base_url =

Undocumented

object_store =

Undocumented

def _fetch_url(self, path: str) -> bytes:

Fetch content from a URL path relative to base_url.

_http_request =

Undocumented

_peeled: dict[Ref, ObjectID] | None =

Undocumented

_refs: dict[Ref, ObjectID] | None =

Undocumented