module documentation
Client side support for the Git protocol.
The Dulwich client supports the following capabilities:
- thin-pack
- multi_ack_detailed
- multi_ack
- side-band-64k
- ofs-delta
- quiet
- report-status
- delete-refs
- shallow
Known capabilities that are not supported:
- no-progress
- include-tag
Class |
|
Abstract base class for HTTP Git Clients. |
Class |
|
Result of a fetch-pack operation. |
Class |
|
Git smart server client. |
Class |
|
Git Client that just uses a local Repo. |
Class |
|
SSH vendor that shells out to the local 'plink' command. |
Class |
|
Handle status as reported by servers with 'report-status' capability. |
Class |
|
Result of a upload-pack operation. |
Class |
|
Undocumented |
Class |
|
A client side SSH implementation. |
Class |
|
Git client that talks to a server using a subprocess. |
Class |
|
SSH vendor that shells out to the local 'ssh' command. |
Class |
|
A socket-like object that talks to a subprocess via pipes. |
Class |
|
A Git Client that works over TCP directly (i.e. git://). |
Class |
|
Traditional Git client. |
Class |
|
Undocumented |
Exception |
|
Raised when proxy authentication fails. |
Exception |
|
Raised when authentication fails. |
Exception |
|
Invalid wants. |
Exception |
|
Refusing to connect to strange SSH hostname. |
Function | check |
Undocumented |
Function | check |
Check that a set of wants is valid. |
Function | default |
Return urllib3 connection pool manager. |
Function | default |
Undocumented |
Function | find |
Find command to run for system Git (usually C Git). |
Function | get |
Undocumented |
Function | get |
Obtain a git client from a URL. |
Function | get |
Obtain a git client from a URL. |
Function |
|
Undocumented |
Function | parse |
Parse a rsync-style URL. |
Function | read |
Undocumented |
Constant | COMMON |
Undocumented |
Constant | DEFAULT |
Undocumented |
Constant | RECEIVE |
Undocumented |
Constant | UPLOAD |
Undocumented |
Variable | logger |
Undocumented |
Variable | url2pathname |
Undocumented |
Class | _v1 |
No class docstring; 0/4 instance variable, 1/3 method documented |
Function | _fileno |
Check if a file descriptor is readable. |
Function | _get |
Undocumented |
Function | _handle |
Handle the head of a 'git-upload-pack' request. |
Function | _handle |
Handle the tail of a 'git-upload-pack' request. |
Function | _read |
Undocumented |
Function | _read |
Read per-channel data. |
Function | _remote |
Undocumented |
Function | _win32 |
Wrapper around PeekNamedPipe to check how many bytes are available. |
Function | _win32 |
Convert a file: URL to a path. |
Check that a set of wants is valid.
Returns:
Parameters | |
wants | Set of object SHAs to fetch |
refs | Refs dictionary to check against |
def default_urllib3_manager(config, pool_manager_cls=None, proxy_manager_cls=None, base_url=None, **override_kwargs):
¶
Return urllib3 connection pool manager.
Honour detected proxy configurations.
Parameters | |
config | dulwich.config.ConfigDict instance with Git configuration. |
pool | Undocumented |
proxy | Undocumented |
base | Undocumented |
**override | Additional arguments for urllib3.ProxyManager |
Returns | |
Union[ | Either pool_manager_cls (defaults to urllib3.ProxyManager ) instance for
proxy configurations, proxy_manager_cls
(defaults to urllib3.PoolManager ) instance otherwise |
def get_credentials_from_store(scheme, hostname, username=None, fnames=DEFAULT_GIT_CREDENTIALS_PATHS):
¶
Undocumented
Obtain a git client from a URL.
Parameters | |
location:str | URL or path (a string) |
config:Optional[ | Optional config object |
operation:Optional[ | Kind of operation that'll be performed; "pull" or "push" |
**kwargs:Any | Undocumented |
thin | Whether or not thin packs should be retrieved |
report | Optional callback for reporting transport activity. |
Returns | |
Tuple[ | Tuple with client instance and relative path. |
Obtain a git client from a URL.
Parameters | |
url:str | URL to open (a unicode string) |
config:Optional[ | Optional config object |
operation:Optional[ | Kind of operation that'll be performed; "pull" or "push" |
**kwargs | Undocumented |
thin | Whether or not thin packs should be retrieved |
report | Optional callback for reporting transport activity. |
Returns | |
Tuple[ | Tuple with client instance and relative path. |
DEFAULT_GIT_CREDENTIALS_PATHS =
¶
Undocumented
Value |
|
RECEIVE_CAPABILITIES =
¶
Undocumented
Value |
|
UPLOAD_CAPABILITIES =
¶
Undocumented
Value |
|
Handle the head of a 'git-upload-pack' request.
- whether there is extra graph data to read on proto
- depth: Depth for request
Returns:
Parameters | |
proto | Protocol object to read from |
capabilities | List of negotiated capabilities |
graph | GraphWalker instance to call .ack() on |
wants | List of commits to fetch |
can | function that returns a boolean that indicates |
depth | Undocumented |
def _handle_upload_pack_tail(proto, capabilities, graph_walker, pack_data, progress=None, rbufsize=_RBUFSIZE):
¶
Handle the tail of a 'git-upload-pack' request.
Returns:
Parameters | |
proto | Protocol object to read from |
capabilities | List of negotiated capabilities |
graph | GraphWalker instance to call .ack() on |
pack | Function to call with pack data |
progress | Optional progress reporting function |
rbufsize | Read buffer size |
Read per-channel data.
This requires the side-band-64k capability.
Parameters | |
pkt | Sequence of packets to read |
channel | Dictionary mapping channels to packet handlers to use. None for a callback discards channel data. |