readthedocs.vcs_support

readthedocs.vcs_support.base

class readthedocs.vcs_support.base.BaseCLI

Helper class for CLI-heavy classes.

run(*args)
Parameters:bits – list of command and args. See subprocess docs
class readthedocs.vcs_support.base.BaseVCS(project, version, **kwargs)

Base for VCS Classes. Built on top of the BaseCLI.

branches

Returns a list of VCSVersion objects. See VCSVersion for more information.

checkout(identifier=None)

Set the state to the given identifier.

If identifier is None, checkout to the latest revision.

The type and format of identifier may change from VCS to VCS, so each backend is responsible to understand it’s identifiers.

commit

Returns a string representing the current commit.

make_clean_working_dir()

Ensures that the working dir exists and is empty

tags

Returns a list of VCSVersion objects. See VCSVersion for more information.

update()

If self.working_dir is already a valid local copy of the repository, update the repository, else create a new local copy of the repository.

class readthedocs.vcs_support.base.VCSProject

Transient object to encapsulate a projects stuff

class readthedocs.vcs_support.base.VCSVersion(repository, identifier, verbose_name)

Represents a Version (tag or branch) in a VCS.

This class should only be instantiated in BaseVCS subclasses.

It can act as a context manager to temporarily switch to this tag (eg to build docs for this tag).