class documentation

class LocalGitClient(GitClient):

View In Hierarchy

Git Client that just uses a local Repo.

Class Method from_parsedurl Create an instance of this client from a urlparse.parsed object.
Method __init__ Create a new LocalGitClient instance.
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 get_url Retrieves full url to given path.
Method send_pack Upload a pack to a remote repository.
Class Method _open_repo Undocumented
Instance Variable _report_activity Undocumented

Inherited from GitClient:

Method archive Retrieve an archive of the specified tree.
Method clone Clone a repository.
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_status_parser Undocumented
Instance Variable _send_capabilities Undocumented
@classmethod
def from_parsedurl(cls, parsedurl, **kwargs):

Create an instance of this client from a urlparse.parsed object.

Parameters
parsedurlResult of urlparse()
**kwargsUndocumented
Returns
A GitClient object
def __init__(self, thin_packs=True, report_activity=None, config=None):

Create a new LocalGitClient instance.

Parameters
thin_packsWhether or not thin packs should be retrieved
report_activityOptional callback for reporting transport activity.
config:Optional[Config]Undocumented
def fetch(self, path, target, determine_wants=None, progress=None, depth=None):

Fetch into a target repository.

Parameters
pathPath to fetch from (as bytestring)
targetTarget repository to fetch into
determine_wantsOptional function determine what refs to fetch. Receives dictionary of name->sha, should return list of shas to fetch. Defaults to all shas.
progressOptional progress function
depthShallow fetch depth
Returns
FetchPackResult object
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 get_url(self, path):

Retrieves full url to given path.

Parameters
pathRepository path (as string)
Returns
Url to path (as string)
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) with number of items and pack data to upload.
generate_pack_dataUndocumented
progressOptional progress function
Returns
SendPackResult
Raises
SendPackErrorif server rejects the pack data
@classmethod
def _open_repo(cls, path):

Undocumented

_report_activity =