OpenQuizz
Une application de gestion des contenus pédagogiques
|
Public Member Functions | |
def | is_immutable_rev_checkout (self, url, dest) |
def | get_git_version (self) |
def | get_current_branch (cls, location) |
def | get_revision_sha (cls, dest, rev) |
def | resolve_revision (cls, dest, url, rev_options) |
def | is_commit_id_equal (cls, dest, name) |
def | fetch_new (self, dest, url, rev_options) |
def | switch (self, dest, url, rev_options) |
def | update (self, dest, url, rev_options) |
def | get_remote_url (cls, location) |
def | has_commit (cls, location, rev) |
def | get_revision (cls, location, rev=None) |
def | get_subdirectory (cls, location) |
def | get_url_rev_and_auth (cls, url) |
def | update_submodules (cls, location) |
def | get_repository_root (cls, location) |
![]() | |
def | should_add_vcs_url_prefix (cls, remote_url) |
def | get_requirement_revision (cls, repo_dir) |
def | get_src_requirement (cls, repo_dir, project_name) |
def | make_rev_options (cls, rev=None, extra_args=None) |
def | get_netloc_and_auth (cls, netloc, scheme) |
def | get_url_rev_options (self, url) |
def | compare_urls (cls, url1, url2) |
def | obtain (self, dest, url) |
def | unpack (self, location, url) |
def | get_revision (cls, location) |
def | run_command (cls, cmd, show_stdout=True, cwd=None, on_returncode='raise', extra_ok_returncodes=None, command_desc=None, extra_environ=None, spinner=None, log_failed_cmd=True, stdout_only=False) |
def | is_repository_directory (cls, path) |
Static Public Member Functions | |
def | get_base_rev_args (rev) |
![]() | |
def | make_rev_args (username, password) |
def | normalize_url (url) |
Static Public Attributes | |
name | |
dirname | |
repo_name | |
schemes | |
unset_environ | |
default_arg_rev | |
![]() | |
name | |
dirname | |
repo_name | |
schemes | |
unset_environ | |
default_arg_rev | |
def fetch_new | ( | self, | |
dest, | |||
url, | |||
rev_options | |||
) |
Fetch a revision from a repository, in the case that this is the first fetch from the repository. Args: dest: the directory to fetch the repository to. rev_options: a RevOptions object.
Reimplemented from VersionControl.
|
static |
Return the base revision arguments for a vcs command. Args: rev: the name of a revision to install. Cannot be None.
Reimplemented from VersionControl.
def get_current_branch | ( | cls, | |
location | |||
) |
Return the current branch, or None if HEAD isn't at a branch (e.g. detached HEAD).
def get_git_version | ( | self | ) |
def get_remote_url | ( | cls, | |
location | |||
) |
Return URL of the first remote encountered. Raises RemoteNotFoundError if the repository does not have a remote url configured.
Reimplemented from VersionControl.
def get_repository_root | ( | cls, | |
location | |||
) |
Return the "root" (top-level) directory controlled by the vcs, or `None` if the directory is not in any. It is meant to be overridden to implement smarter detection mechanisms for specific vcs. This can do more than is_repository_directory() alone. For example, the Git override checks that Git is actually available.
Reimplemented from VersionControl.
def get_revision | ( | cls, | |
location, | |||
rev = None |
|||
) |
def get_revision_sha | ( | cls, | |
dest, | |||
rev | |||
) |
Return (sha_or_none, is_branch), where sha_or_none is a commit hash if the revision names a remote branch or tag, otherwise None. Args: dest: the repository directory. rev: the revision name.
def get_subdirectory | ( | cls, | |
location | |||
) |
Return the path to setup.py, relative to the repo root. Return None if setup.py is in the repo root.
Reimplemented from VersionControl.
def get_url_rev_and_auth | ( | cls, | |
url | |||
) |
Prefixes stub URLs like 'user@hostname:user/repo.git' with 'ssh://'. That's required because although they use SSH they sometimes don't work with a ssh:// scheme (e.g. GitHub). But we need a scheme for parsing. Hence we remove it again afterwards and return it as a stub.
Reimplemented from VersionControl.
def has_commit | ( | cls, | |
location, | |||
rev | |||
) |
Check if rev is a commit that is available in the local repository.
def is_commit_id_equal | ( | cls, | |
dest, | |||
name | |||
) |
Return whether the current commit hash equals the given name. Args: dest: the repository directory. name: a string name.
Reimplemented from VersionControl.
def is_immutable_rev_checkout | ( | self, | |
url, | |||
dest | |||
) |
Return true if the commit hash checked out at dest matches the revision in url. Always return False, if the VCS does not support immutable commit hashes. This method does not check if there are local uncommitted changes in dest after checkout, as pip currently has no use case for that.
Reimplemented from VersionControl.
def resolve_revision | ( | cls, | |
dest, | |||
url, | |||
rev_options | |||
) |
Resolve a revision to a new RevOptions object with the SHA1 of the branch, tag, or ref if found. Args: rev_options: a RevOptions object.
def switch | ( | self, | |
dest, | |||
url, | |||
rev_options | |||
) |
Switch the repo at ``dest`` to point to ``URL``. Args: rev_options: a RevOptions object.
Reimplemented from VersionControl.
def update | ( | self, | |
dest, | |||
url, | |||
rev_options | |||
) |
Update an already-existing repo to the given ``rev_options``. Args: rev_options: a RevOptions object.
Reimplemented from VersionControl.
def update_submodules | ( | cls, | |
location | |||
) |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |