class documentation
class AbstractHttpGitClient(GitClient):
Known subclasses: dulwich.client.Urllib3HttpGitClient
, dulwich.contrib.requests_vendor.RequestsHttpGitClient
Abstract base class for HTTP Git Clients.
This is agonistic of the actual HTTP implementation.
Subclasses should provide an implementation of the _http_request method.
Class Method | from |
Create an instance of this client from a urlparse.parsed object. |
Method | __init__ |
Create a new GitClient instance. |
Method | __repr__ |
Undocumented |
Method | fetch |
Retrieve a pack from a git smart server. |
Method | get |
Retrieve the current refs from a git smart server. |
Method | get |
Retrieves full url to given path. |
Method | send |
Upload a pack to a remote repository. |
Instance Variable | dumb |
Undocumented |
Method | _discover |
Undocumented |
Method | _get |
Undocumented |
Method | _http |
Perform HTTP request. |
Method | _smart |
Send a 'smart' HTTP request. |
Instance Variable | _base |
Undocumented |
Instance Variable | _report |
Undocumented |
Inherited from GitClient
:
Method | archive |
Retrieve an archive of the specified tree. |
Method | clone |
Clone a repository. |
Method | fetch |
Fetch into a target repository. |
Static Method | _should |
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 |
overrides
dulwich.client.GitClient.from_parsedurl
Create an instance of this client from a urlparse.parsed object.
Parameters | |
parsedurl | Result of urlparse() |
**kwargs | Undocumented |
Returns | |
A GitClient object |
overrides
dulwich.client.GitClient.__init__
overridden in
dulwich.client.Urllib3HttpGitClient
, dulwich.contrib.requests_vendor.RequestsHttpGitClient
Create a new GitClient instance.
Parameters | |
base | Undocumented |
dumb | Undocumented |
**kwargs | Undocumented |
thin | Whether or not thin packs should be retrieved |
report | Optional callback for reporting transport activity. |
include | send annotated tags when sending the objects they point to |
overrides
dulwich.client.GitClient.fetch_pack
Retrieve a pack from a git smart server.
Parameters | |
path | Path to fetch from |
determine | Callback that returns list of commits to fetch |
graph | Object with next() and ack(). |
pack | Callback called for each bit of data in the pack |
progress | Callback for progress reports (strings) |
depth | Depth for request |
Returns | |
FetchPackResult object |
overrides
dulwich.client.GitClient.get_url
Retrieves full url to given path.
Parameters | |
path | Repository path (as string) |
Returns | |
Url to path (as string) |
overrides
dulwich.client.GitClient.send_pack
Upload a pack to a remote repository.
Parameters | |
path | Repository path (as bytestring) |
update | Function to determine changes to remote refs. Receives dict with existing remote refs, returns dict with changed refs (name -> sha, where sha=ZERO_SHA for deletions) |
generate | Function that can return a tuple with number of elements and pack data to upload. |
progress | Optional progress function |
Returns | |
SendPackResult | |
Raises | |
SendPackError | if server rejects the pack data |
overridden in
dulwich.client.Urllib3HttpGitClient
, dulwich.contrib.requests_vendor.RequestsHttpGitClient
Perform HTTP request.
Parameters | |
url | Request URL. |
headers | Optional custom headers to override defaults. |
data | Request data. |
Returns | |
Tuple (response, read), where response is an urllib3 response object with additional content_type and redirect_location properties, and read is a consumable read method for the response data. |