class documentation
class TraditionalGitClient(GitClient):
Known subclasses: dulwich.client.SSHGitClient
, dulwich.client.SubprocessGitClient
, dulwich.client.TCPGitClient
, dulwich.tests.test_client.DummyClient
Traditional Git client.
Method | __init__ |
Create a new GitClient instance. |
Method | archive |
Retrieve an archive of the specified tree. |
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 |
Async Method | _connect |
Create a connection to the server. |
Instance Variable | _remote |
Undocumented |
Instance Variable | _report |
Undocumented |
Inherited from GitClient
:
Class Method | from |
Create an instance of this client from a urlparse.parsed object. |
Method | clone |
Clone a repository. |
Method | fetch |
Fetch into a target repository. |
Method | get |
Retrieves full url to given path. |
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.__init__
overridden in
dulwich.client.SSHGitClient
, dulwich.client.TCPGitClient
, dulwich.tests.test_client.DummyClient
Create a new GitClient instance.
Parameters | |
path | 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 |
def archive(self, path, committish, write_data, progress=None, write_error=None, format=None, subdirs=None, prefix=None):
¶
overrides
dulwich.client.GitClient.archive
Retrieve an archive of the specified tree.
overrides
dulwich.client.GitClient.fetch_pack
Retrieve a pack from a git smart server.
Parameters | |
path | Remote path to fetch from |
determine | Function determine what refs to fetch. Receives dictionary of name->sha, should return list of shas 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 | Shallow fetch depth |
Returns | |
FetchPackResult object |
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. Receive 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 objects and pack data to upload. |
progress | Optional callback called with progress updates |
Returns | |
SendPackResult | |
Raises | |
SendPackError | if server rejects the pack data |
overridden in
dulwich.client.SSHGitClient
, dulwich.client.SubprocessGitClient
, dulwich.client.TCPGitClient
, dulwich.tests.test_client.DummyClient
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 | The git service name to which we should connect. |
path | The path we should pass to the service. (as bytestirng) |