class TCPGitClient(TraditionalGitClient):
Constructors: TCPGitClient.from_parsedurl(parsedurl, thin_packs, report_activity, quiet, ...), TCPGitClient(host, port, thin_packs, report_activity, ...)
A Git Client that works over TCP directly (i.e. git://).
| Class Method | from |
Create an instance of TCPGitClient from a parsed URL. |
| Method | __init__ |
Initialize a TCPGitClient. |
| Method | get |
Get the URL for a TCP git connection. |
| Instance Variable | protocol |
Undocumented |
| Method | _connect |
Create a connection to the server. |
| Method | _connect |
Connect to a git server via a proxy command. |
| Instance Variable | _host |
Undocumented |
| Instance Variable | _port |
Undocumented |
| Instance Variable | _proxy |
Undocumented |
Inherited from TraditionalGitClient:
| Method | archive |
Request an archive of a specific commit. |
| Method | fetch |
Retrieve a pack from a git smart server. |
| Method | get |
Retrieve the current refs from a git smart server. |
| Method | send |
Upload a pack to a remote repository. |
| Constant | DEFAULT |
Undocumented |
| Instance Variable | _remote |
Undocumented |
| Instance Variable | _report |
Undocumented |
Inherited from GitClient (via TraditionalGitClient):
| Method | clone |
Clone a repository. |
| Method | close |
Close the client and release any resources. |
| Method | fetch |
Fetch into a target repository. |
| Method | fetch |
Fetch into a target repository, using bundle URIs for bootstrap. |
| 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 |
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) -> TCPGitClient:
¶
dulwich.client.GitClient.from_parsedurlCreate an instance of TCPGitClient 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 TCPGitClient) |
username:str | None | Username for authentication (not used for TCPGitClient) |
password:str | None | Password for authentication (not used for TCPGitClient) |
config:Config | None | Configuration object |
| Returns | |
TCPGitClient | A TCPGitClient instance |
str, port: int | None = None, thin_packs: bool = True, report_activity: Callable[ [ int, str], None] | None = None, quiet: bool = False, include_tags: bool = False, proxy_command: str | None = None):
¶
Initialize a TCPGitClient.
| Parameters | |
host:str | Hostname or IP address to connect to |
port:int | None | Port number (defaults to TCP_GIT_PORT) |
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 |
proxystr | None | Optional proxy command (core.gitProxy). The command is run with host and port as arguments and communicates over stdin/stdout. |
bytes, path: str | bytes, protocol_version: int | None = None) -> tuple[ Protocol, Callable[ [], bool], IO[ bytes] | None]:
¶
Create a connection to the server.
This method is abstract - concrete implementations should implement their own variant which connects to the server and returns an initialized Protocol object with the service ready for use and a can_read function which may be used to see if reads would block.
| Parameters | |
cmd:bytes | The git service name to which we should connect. |
path:str | bytes | The path we should pass to the service. (as bytestirng) |
protocolint | None | Desired Git protocol version. By default the highest mutually supported protocol version will be used. |
| Returns | |
tuple[ | Undocumented |
bytes, path: bytes, protocol_version: int | None = None) -> tuple[ Protocol, Callable[ [], bool], IO[ bytes] | None]:
¶
Connect to a git server via a proxy command.
The proxy command is invoked with the host and port as arguments. It communicates with the git server over its stdin/stdout, acting as a transparent tunnel.