libvcs.projects.base#

Base objects / classes for projects.

Adding your own VCS / Extending libvcs can be done through subclassing BaseProject.

Base class for VCS Project plugins.

class libvcs.projects.base.BaseProject(*, url, dir, progress_callback=None, **kwargs)[source]#

Base class for repositories.

Parameters:
  • url (str) –

  • dir (libvcs._internal.types.StrPath) –

bin_name = #

VCS app name, e.g. ‘git’

ensure_dir(self, *args, **kwargs)[source]#

Assure destination path exists. If not, create directories.

Return type:

bool

classmethod from_pip_url(cls, pip_url, **kwargs)[source]#
log_in_real_time#

Log command output to buffer

abstract obtain(self, *args, **kwargs)[source]#
property repo_name(self)#
Return type:

str

schemes = []#

List of supported schemes to register in urlparse.uses_netloc

abstract update_repo(self, *args, **kwargs)[source]#
class libvcs.projects.base.VCSLocation[source]#

Bases: NamedTuple

rev#
url#
libvcs.projects.base.convert_pip_url(pip_url)[source]#

Parse pip URL via libvcs.projects.base.BaseProject.url.

Parameters:

pip_url (str) –

Return type:

VCSLocation