![]() |
Qucs-S S-parameter Viewer & RF Synthesis Tools
|


Public Member Functions | |
| bool | should_add_vcs_url_prefix (cls, str remote_url) |
| Optional[str] | get_subdirectory (cls, str location) |
| str | get_requirement_revision (cls, str repo_dir) |
| str | get_src_requirement (cls, str repo_dir, str project_name) |
| bool | is_immutable_rev_checkout (self, str url, str dest) |
| RevOptions | make_rev_options (cls, Optional[str] rev=None, Optional[CommandArgs] extra_args=None) |
| Tuple[str, Tuple[Optional[str], Optional[str]]] | get_netloc_and_auth (cls, str netloc, str scheme) |
| Tuple[str, Optional[str], AuthInfo] | get_url_rev_and_auth (cls, str url) |
| Tuple[HiddenText, RevOptions] | get_url_rev_options (self, HiddenText url) |
| bool | compare_urls (cls, str url1, str url2) |
| None | fetch_new (self, str dest, HiddenText url, RevOptions rev_options, int verbosity) |
| None | switch (self, str dest, HiddenText url, RevOptions rev_options) |
| None | update (self, str dest, HiddenText url, RevOptions rev_options) |
| bool | is_commit_id_equal (cls, str dest, Optional[str] name) |
| None | obtain (self, str dest, HiddenText url, int verbosity) |
| None | unpack (self, str location, HiddenText url, int verbosity) |
| str | get_remote_url (cls, str location) |
| str | get_revision (cls, str location) |
| str | run_command (cls, Union[List[str], CommandArgs] cmd, bool show_stdout=True, Optional[str] cwd=None, 'Literal["raise", "warn", "ignore"]' on_returncode="raise", Optional[Iterable[int]] extra_ok_returncodes=None, Optional[str] command_desc=None, Optional[Mapping[str, Any]] extra_environ=None, Optional[SpinnerInterface] spinner=None, bool log_failed_cmd=True, bool stdout_only=False) |
| bool | is_repository_directory (cls, str path) |
| Optional[str] | get_repository_root (cls, str location) |
Static Public Member Functions | |
| List[str] | get_base_rev_args (str rev) |
| CommandArgs | make_rev_args (Optional[str] username, Optional[HiddenText] password) |
| str | normalize_url (str url) |
Public Attributes | |
| repo_name | |
| name | |
| dirname | |
Static Public Attributes | |
| str | name = "" |
| str | dirname = "" |
| str | repo_name = "" |
| tuple | schemes = () |
| tuple | unset_environ = () |
| Optional | default_arg_rev = None |
Protected Member Functions | |
| bool | _is_local_repository (cls, str repo) |
|
protected |
posix absolute paths start with os.path.sep, win32 ones start with drive (like c:\\folder)
| bool pip._internal.vcs.versioncontrol.VersionControl.compare_urls | ( | cls, | |
| str | url1, | ||
| str | url2 | ||
| ) |
Compare two repo URLs for identity, ignoring incidental differences.
| None pip._internal.vcs.versioncontrol.VersionControl.fetch_new | ( | self, | |
| str | dest, | ||
| HiddenText | url, | ||
| RevOptions | rev_options, | ||
| int | verbosity | ||
| ) |
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. verbosity: verbosity level.
Reimplemented in pip._internal.vcs.bazaar.Bazaar, pip._internal.vcs.mercurial.Mercurial, and pip._internal.vcs.subversion.Subversion.
|
static |
Return the base revision arguments for a vcs command. Args: rev: the name of a revision to install. Cannot be None.
Reimplemented in pip._internal.vcs.bazaar.Bazaar, pip._internal.vcs.mercurial.Mercurial, and pip._internal.vcs.subversion.Subversion.
| Tuple[str, Tuple[Optional[str], Optional[str]]] pip._internal.vcs.versioncontrol.VersionControl.get_netloc_and_auth | ( | cls, | |
| str | netloc, | ||
| str | scheme | ||
| ) |
Parse the repository URL's netloc, and return the new netloc to use along with auth information. Args: netloc: the original repository URL netloc. scheme: the repository URL's scheme without the vcs prefix. This is mainly for the Subversion class to override, so that auth information can be provided via the --username and --password options instead of through the URL. For other subclasses like Git without such an option, auth information must stay in the URL. Returns: (netloc, (username, password)).
Reimplemented in pip._internal.vcs.subversion.Subversion.
| str pip._internal.vcs.versioncontrol.VersionControl.get_remote_url | ( | cls, | |
| str | location | ||
| ) |
Return the url used at location Raises RemoteNotFoundError if the repository does not have a remote url configured.
Reimplemented in pip._internal.vcs.bazaar.Bazaar, pip._internal.vcs.mercurial.Mercurial, and pip._internal.vcs.subversion.Subversion.
| Optional[str] pip._internal.vcs.versioncontrol.VersionControl.get_repository_root | ( | cls, | |
| str | 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 in pip._internal.vcs.mercurial.Mercurial.
| str pip._internal.vcs.versioncontrol.VersionControl.get_requirement_revision | ( | cls, | |
| str | repo_dir | ||
| ) |
Return the revision string that should be used in a requirement.
Reimplemented in pip._internal.vcs.mercurial.Mercurial.
| str pip._internal.vcs.versioncontrol.VersionControl.get_revision | ( | cls, | |
| str | location | ||
| ) |
Return the current commit id of the files at the given location.
Reimplemented in pip._internal.vcs.bazaar.Bazaar, pip._internal.vcs.mercurial.Mercurial, and pip._internal.vcs.subversion.Subversion.
| str pip._internal.vcs.versioncontrol.VersionControl.get_src_requirement | ( | cls, | |
| str | repo_dir, | ||
| str | project_name | ||
| ) |
Return the requirement string to use to redownload the files
currently at the given repository directory.
Args:
project_name: the (unescaped) project name.
The return value has a form similar to the following:
{repository_url}@{revision}#egg={project_name}
| Optional[str] pip._internal.vcs.versioncontrol.VersionControl.get_subdirectory | ( | cls, | |
| str | location | ||
| ) |
Return the path to Python project root, relative to the repo root. Return None if the project root is in the repo root.
Reimplemented in pip._internal.vcs.mercurial.Mercurial.
| Tuple[str, Optional[str], AuthInfo] pip._internal.vcs.versioncontrol.VersionControl.get_url_rev_and_auth | ( | cls, | |
| str | url | ||
| ) |
Parse the repository URL to use, and return the URL, revision, and auth info to use. Returns: (url, rev, (username, password)).
Reimplemented in pip._internal.vcs.bazaar.Bazaar, and pip._internal.vcs.subversion.Subversion.
| Tuple[HiddenText, RevOptions] pip._internal.vcs.versioncontrol.VersionControl.get_url_rev_options | ( | self, | |
| HiddenText | url | ||
| ) |
Return the URL and RevOptions object to use in obtain(), as a tuple (url, rev_options).
| bool pip._internal.vcs.versioncontrol.VersionControl.is_commit_id_equal | ( | cls, | |
| str | dest, | ||
| Optional[str] | name | ||
| ) |
Return whether the id of the current commit equals the given name. Args: dest: the repository directory. name: a string name.
Reimplemented in pip._internal.vcs.bazaar.Bazaar, pip._internal.vcs.mercurial.Mercurial, and pip._internal.vcs.subversion.Subversion.
| bool pip._internal.vcs.versioncontrol.VersionControl.is_immutable_rev_checkout | ( | self, | |
| str | url, | ||
| str | 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.
| bool pip._internal.vcs.versioncontrol.VersionControl.is_repository_directory | ( | cls, | |
| str | path | ||
| ) |
Return whether a directory path is a repository directory.
|
static |
Return the RevOptions "extra arguments" to use in obtain().
Reimplemented in pip._internal.vcs.subversion.Subversion.
| RevOptions pip._internal.vcs.versioncontrol.VersionControl.make_rev_options | ( | cls, | |
| Optional[str] | rev = None, |
||
| Optional[CommandArgs] | extra_args = None |
||
| ) |
Return a RevOptions object. Args: rev: the name of a revision to install. extra_args: a list of extra options.
|
static |
Normalize a URL for comparison by unquoting it and removing any trailing slash.
| None pip._internal.vcs.versioncontrol.VersionControl.obtain | ( | self, | |
| str | dest, | ||
| HiddenText | url, | ||
| int | verbosity | ||
| ) |
Install or update in editable mode the package represented by this VersionControl object. :param dest: the repository directory in which to install or update. :param url: the repository URL starting with a vcs prefix. :param verbosity: verbosity level.
| str pip._internal.vcs.versioncontrol.VersionControl.run_command | ( | cls, | |
| Union[List[str], CommandArgs] | cmd, | ||
| bool | show_stdout = True, |
||
| Optional[str] | cwd = None, |
||
| 'Literal["raise", "warn", "ignore"]' | on_returncode = "raise", |
||
| Optional[Iterable[int]] | extra_ok_returncodes = None, |
||
| Optional[str] | command_desc = None, |
||
| Optional[Mapping[str, Any]] | extra_environ = None, |
||
| Optional[SpinnerInterface] | spinner = None, |
||
| bool | log_failed_cmd = True, |
||
| bool | stdout_only = False |
||
| ) |
Run a VCS subcommand This is simply a wrapper around call_subprocess that adds the VCS command name, and checks that the VCS is available
| bool pip._internal.vcs.versioncontrol.VersionControl.should_add_vcs_url_prefix | ( | cls, | |
| str | remote_url | ||
| ) |
Return whether the vcs prefix (e.g. "git+") should be added to a repository's remote url when used in a requirement.
Reimplemented in pip._internal.vcs.subversion.Subversion.
| None pip._internal.vcs.versioncontrol.VersionControl.switch | ( | self, | |
| str | dest, | ||
| HiddenText | url, | ||
| RevOptions | rev_options | ||
| ) |
Switch the repo at ``dest`` to point to ``URL``. Args: rev_options: a RevOptions object.
Reimplemented in pip._internal.vcs.bazaar.Bazaar, pip._internal.vcs.mercurial.Mercurial, and pip._internal.vcs.subversion.Subversion.
| None pip._internal.vcs.versioncontrol.VersionControl.unpack | ( | self, | |
| str | location, | ||
| HiddenText | url, | ||
| int | verbosity | ||
| ) |
Clean up current location and download the url repository (and vcs infos) into location :param url: the repository URL starting with a vcs prefix. :param verbosity: verbosity level.
| None pip._internal.vcs.versioncontrol.VersionControl.update | ( | self, | |
| str | dest, | ||
| HiddenText | url, | ||
| RevOptions | rev_options | ||
| ) |
Update an already-existing repo to the given ``rev_options``. Args: rev_options: a RevOptions object.
Reimplemented in pip._internal.vcs.bazaar.Bazaar, pip._internal.vcs.mercurial.Mercurial, and pip._internal.vcs.subversion.Subversion.