dulwich.client.GitClient(object)
class documentationdulwich.client
(View In Hierarchy)
Known subclasses: dulwich.client.HttpGitClient, dulwich.client.LocalGitClient, dulwich.client.TraditionalGitClient
Method | __init__ | Create a new GitClient instance. |
Method | get_url | Retrieves full url to given path. |
Class Method | from_parsedurl | Create an instance of this client from a urlparse.parsed object. |
Method | send_pack | Upload a pack to a remote repository. |
Method | fetch | Fetch into a target repository. |
Method | fetch_pack | Retrieve a pack from a git smart server. |
Method | get_refs | Retrieve the current refs from a git smart server. |
Method | _parse_status_report | Undocumented |
Method | _read_side_band64k_data | Read per-channel data. |
Method | _handle_receive_pack_head | Handle the head of a 'git-receive-pack' request. |
Method | _negotiate_receive_pack_capabilities | Undocumented |
Method | _handle_receive_pack_tail | Handle the tail of a 'git-receive-pack' request. |
Method | _negotiate_upload_pack_capabilities | Undocumented |
Method | _handle_upload_pack_head | Handle the head of a 'git-upload-pack' request. |
Method | _handle_upload_pack_tail | Handle the tail of a 'git-upload-pack' request. |
Parameters | thin_packs | Whether or not thin packs should be retrieved |
report_activity | Optional callback for reporting transport activity. |
Parameters | path | Repository path (as string) |
Returns | Url to path (as string) |
Parameters | parsedurl | Result of urlparse.urlparse() |
Returns | A GitClient object |
Parameters | path | Repository path (as bytestring) |
update_refs | Function to determine changes to remote refs. Receive dict with existing remote refs, returns dict with changed refs (name -> sha, where sha=ZERO_SHA for deletions) | |
generate_pack_data | Function that can return a tuple with number of objects and list of pack data to include | |
progress | Optional progress function | |
Returns | new_refs dictionary containing the changes that were made {refname: new_ref}, including deleted refs. | |
Raises | SendPackError | if server rejects the pack data |
UpdateRefsError | if the server supports report-status and rejects ref updates |
Parameters | path | Path to fetch from (as bytestring) |
target | Target repository to fetch into | |
determine_wants | Optional function to determine what refs to fetch. Receives dictionary of name->sha, should return list of shas to fetch. Defaults to all shas. | |
progress | Optional progress function | |
depth | Depth to fetch at | |
Returns | Dictionary with all remote refs (not just those fetched) |
Parameters | path | Remote path to fetch from |
determine_wants | Function determine what refs to fetch. Receives dictionary of name->sha, should return list of shas to fetch. | |
graph_walker | Object with next() and ack(). | |
pack_data | Callback called for each bit of data in the pack | |
progress | Callback for progress reports (strings) | |
depth | Shallow fetch depth | |
Returns | FetchPackResult object |
Parameters | path | Path to the repo to fetch from. (as bytestring) |
Read per-channel data.
This requires the side-band-64k capability.
Parameters | proto | Protocol object to read from |
channel_callbacks | Dictionary mapping channels to packet handlers to use. None for a callback discards channel data. |
Parameters | proto | Protocol object to read from |
capabilities | List of negotiated capabilities | |
old_refs | Old refs, as received from the server | |
new_refs | Refs to change | |
Returns | (have, want) tuple |
Parameters | proto | Protocol object to read from |
capabilities | List of negotiated capabilities | |
progress | Optional progress reporting function |
Parameters | proto | Protocol object to read from |
capabilities | List of negotiated capabilities | |
graph_walker | GraphWalker instance to call .ack() on | |
wants | List of commits to fetch | |
can_read | function that returns a boolean that indicates whether there is extra graph data to read on proto | |
depth | Depth for request |
Parameters | proto | Protocol object to read from |
capabilities | List of negotiated capabilities | |
graph_walker | GraphWalker instance to call .ack() on | |
pack_data | Function to call with pack data | |
progress | Optional progress reporting function | |
rbufsize | Read buffer size |