class documentation

Traditional Git client.

Method __init__ Create a new GitClient instance.
Method archive Retrieve an archive of the specified tree.
Method fetch_pack Retrieve a pack from a git smart server.
Method get_refs Retrieve the current refs from a git smart server.
Method send_pack Upload a pack to a remote repository.
Constant DEFAULT_ENCODING Undocumented
Async Method _connect Create a connection to the server.
Instance Variable _remote_path_encoding Undocumented
Instance Variable _report_status_parser Undocumented

Inherited from GitClient:

Class Method from_parsedurl 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_url Retrieves full url to given path.
Static Method _should_send_pack Undocumented
Method _handle_receive_pack_tail Handle the tail of a 'git-receive-pack' request.
Method _negotiate_receive_pack_capabilities Undocumented
Method _negotiate_upload_pack_capabilities Undocumented
Instance Variable _fetch_capabilities Undocumented
Instance Variable _report_activity Undocumented
Instance Variable _send_capabilities Undocumented
def __init__(self, path_encoding=DEFAULT_ENCODING, **kwargs):

Create a new GitClient instance.

Parameters
path_encodingUndocumented
**kwargsUndocumented
thin_packsWhether or not thin packs should be retrieved
report_activityOptional callback for reporting transport activity.
include_tagssend 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):

Retrieve an archive of the specified tree.

def fetch_pack(self, path, determine_wants, graph_walker, pack_data, progress=None, depth=None):

Retrieve a pack from a git smart server.

Parameters
pathRemote path to fetch from
determine_wantsFunction determine what refs to fetch. Receives dictionary of name->sha, should return list of shas to fetch.
graph_walkerObject with next() and ack().
pack_dataCallback called for each bit of data in the pack
progressCallback for progress reports (strings)
depthShallow fetch depth
Returns
FetchPackResult object
def get_refs(self, path):

Retrieve the current refs from a git smart server.

def send_pack(self, path, update_refs, generate_pack_data, progress=None):

Upload a pack to a remote repository.

Parameters
pathRepository path (as bytestring)
update_refsFunction 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_dataFunction that can return a tuple with number of objects and pack data to upload.
progressOptional callback called with progress updates
Returns
SendPackResult
Raises
SendPackErrorif server rejects the pack data
DEFAULT_ENCODING: str =

Undocumented

Value
'utf-8'
async def _connect(self, cmd, path):

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
cmdThe git service name to which we should connect.
pathThe path we should pass to the service. (as bytestirng)
_remote_path_encoding =

Undocumented

_report_status_parser =