class documentation
class BundleClient(GitClient):
Constructors: BundleClient.from_parsedurl(parsedurl, thin_packs, report_activity, quiet, ...), BundleClient(thin_packs, report_activity, config, quiet, ...)
Git Client that reads from a bundle file.
| Class Method | from |
Create an instance of BundleClient from a parsed URL. |
| Method | __init__ |
Create a new BundleClient instance. |
| Method | fetch |
Fetch into a target repository from a bundle file. |
| Method | fetch |
Retrieve a pack from a bundle file. |
| Method | get |
Retrieve the current refs from a bundle file. |
| Method | get |
Get the URL for a bundle file path. |
| Method | send |
Upload is not supported for bundle files. |
| Class Method | _is |
Check if a file is a git bundle by reading the first line. |
| Class Method | _open |
Open and parse a bundle file. |
| Static Method | _skip |
Skip to the pack data section in a bundle file. |
| Instance Variable | _include |
Undocumented |
| Instance Variable | _quiet |
Undocumented |
| Instance Variable | _report |
Undocumented |
Inherited from GitClient:
| Method | archive |
Retrieve an archive of the specified tree. |
| Method | clone |
Clone a repository. |
| Method | close |
Close the client and release any resources. |
| Method | fetch |
Fetch into a target repository, using bundle URIs for bootstrap. |
| Instance Variable | protocol |
Undocumented |
| Static Method | _should |
Undocumented |
| Static Method | _warn |
Undocumented |
| Method | _handle |
Handle the tail of a 'git-receive-pack' request. |
| Method | _negotiate |
Undocumented |
| Method | _negotiate |
Undocumented |
| Instance Variable | _fetch |
Undocumented |
| Instance Variable | _report |
Undocumented |
| Instance Variable | _send |
Undocumented |
def from_parsedurl(cls, parsedurl:
ParseResult, thin_packs: bool = True, report_activity: Callable[ [ int, str], None] | None = None, quiet: bool = False, include_tags: bool = False, dumb: bool = False, username: str | None = None, password: str | None = None, config: Config | None = None) -> BundleClient:
¶
overrides
dulwich.client.GitClient.from_parsedurlCreate an instance of BundleClient from a parsed URL.
| Parameters | |
parsedurl:ParseResult | Result of urlparse() |
thinbool | Whether or not thin packs should be retrieved |
reportCallable[ | Optional callback for reporting transport activity |
quiet:bool | Whether to suppress progress output |
includebool | Whether to include tags |
dumb:bool | Whether to use dumb protocol (not used for BundleClient) |
username:str | None | Username for authentication (not used for BundleClient) |
password:str | None | Password for authentication (not used for BundleClient) |
config:Config | None | Configuration object (not used for BundleClient) |
| Returns | |
BundleClient | A BundleClient instance |
def __init__(self, thin_packs:
bool = True, report_activity: Callable[ [ int, str], None] | None = None, config: Config | None = None, quiet: bool = False, include_tags: bool = False):
¶
overrides
dulwich.client.GitClient.__init__Create a new BundleClient instance.
| Parameters | |
thinbool | Whether or not thin packs should be retrieved |
reportCallable[ | Optional callback for reporting transport activity. |
config:Config | None | Optional configuration object |
quiet:bool | Whether to suppress progress output |
includebool | Whether to include tags |
def fetch(self, path:
bytes | str, target: BaseRepo, determine_wants: DetermineWantsFunc | None = None, progress: Callable[ [ bytes], None] | None = None, depth: int | None = None, ref_prefix: Sequence[ bytes] | None = None, filter_spec: bytes | None = None, protocol_version: int | None = None, shallow_since: str | None = None, shallow_exclude: list[ str] | None = None) -> FetchPackResult:
¶
overrides
dulwich.client.GitClient.fetchFetch into a target repository from a bundle file.
def fetch_pack(self, path:
str | bytes, determine_wants: DetermineWantsFunc, graph_walker: GraphWalker, pack_data: Callable[ [ bytes], int], progress: Callable[ [ bytes], None] | None = None, depth: int | None = None, ref_prefix: Sequence[ bytes] | None = None, filter_spec: bytes | None = None, protocol_version: int | None = None, shallow_since: str | None = None, shallow_exclude: list[ str] | None = None) -> FetchPackResult:
¶
overrides
dulwich.client.GitClient.fetch_packRetrieve a pack from a bundle file.
def get_refs(self, path:
str | bytes, protocol_version: int | None = None, ref_prefix: Sequence[ bytes] | None = None) -> LsRemoteResult:
¶
overrides
dulwich.client.GitClient.get_refsRetrieve the current refs from a bundle file.
def send_pack(self, path:
str | bytes, update_refs: Callable[ [ dict[ Ref, ObjectID]], dict[ Ref, ObjectID]], generate_pack_data: GeneratePackDataFunc, progress: Callable[ [ bytes], None] | None = None, push_options: Sequence[ bytes] | None = None, atomic: bool = False) -> SendPackResult:
¶
overrides
dulwich.client.GitClient.send_packUpload is not supported for bundle files.
Open and parse a bundle file.
| Parameters | |
path:str | bytes | Path to the bundle file (bytes or str) |
| Returns | |
Bundle | Bundle object with parsed metadata |
| Raises | |
AssertionError | If bundle format is unsupported |
Skip to the pack data section in a bundle file.
| Parameters | |
f:IO[ | File object positioned at the beginning of the bundle |
version:int | Bundle format version (2 or 3) |
| Raises | |
AssertionError | If bundle header is invalid |