1.2.1.3. rezplugins.release_vcs package

1.2.1.3.1. Submodules

1.2.1.3.2. rezplugins.release_vcs.git module

Git version control

class rezplugins.release_vcs.git.GitReleaseVCS(pkg_root, vcs_root=None)[source]

Bases: rez.release_vcs.ReleaseVCS

create_release_tag(tag_name, message=None)[source]

Create a tag in the repo.

Create a tag in the repository representing the release of the given version.

Parameters:
  • tag_name (str) – Tag name to write to the repo.
  • message (str) – Message string to associate with the release.
classmethod export(revision, path)[source]

Export the repository to the given path at the given revision.

Note

The directory at path must not exist, but the parent directory must exist.

Parameters:
  • revision (object) – Revision to export; current revision if None.
  • path (str) – Directory to export the repository to.
get_changelog(previous_revision=None, max_revisions=None)[source]

Get the changelog text since the given revision.

If previous_revision is not an ancestor (for example, the last release was from a different branch) you should still return a meaningful changelog - perhaps include a warning, and give changelog back to the last common ancestor.

Parameters:
  • previous_revision – The revision to give the changelog since. If
  • give the entire changelog. (None,) –
Returns:

Changelog, as a string.

get_current_revision()[source]

Get the current revision, this can be any type (str, dict etc) appropriate to your VCS implementation.

Note

You must ensure that a revision contains enough information to clone/export/checkout the repo elsewhere - otherwise you will not be able to implement export.

get_local_branch()[source]

Returns the label of the current local branch.

get_relative_to_remote()[source]

Return the number of commits we are relative to the remote. Negative is behind, positive in front, zero means we are matched to remote.

get_tracking_branch()[source]

Returns (remote, branch) tuple, or None,None if there is no remote.

git(*nargs)[source]
classmethod is_valid_root(path)[source]

Return True if the given path is a valid root directory for this version control system.

Note that this is different than whether the path is under the control of this type of vcs; to answer that question, use find_vcs_root

classmethod name()[source]

Return the name of the VCS type, eg ‘git’.

schema_dict = {'allow_no_upstream': <type 'bool'>}
classmethod search_parents_for_root()[source]

Return True if this vcs type should check parent directories to find the root directory

tag_exists(tag_name)[source]

Test if a tag exists in the repo.

Parameters:tag_name (str) – Tag name to check for.
Returns:True if the tag exists, False otherwise.
Return type:bool
validate_repostate()[source]

Ensure that the VCS working copy is up-to-date.

exception rezplugins.release_vcs.git.GitReleaseVCSError(value=None)[source]

Bases: rez.exceptions.ReleaseVCSError

rezplugins.release_vcs.git.register_plugin()[source]

1.2.1.3.3. rezplugins.release_vcs.hg module

Mercurial version control

class rezplugins.release_vcs.hg.HgReleaseVCS(pkg_root, vcs_root=None)[source]

Bases: rez.release_vcs.ReleaseVCS

create_release_tag(tag_name, message=None)[source]

Create a tag in the repo.

Create a tag in the repository representing the release of the given version.

Parameters:
  • tag_name (str) – Tag name to write to the repo.
  • message (str) – Message string to associate with the release.
get_changelog(previous_revision=None, max_revisions=None)[source]

Get the changelog text since the given revision.

If previous_revision is not an ancestor (for example, the last release was from a different branch) you should still return a meaningful changelog - perhaps include a warning, and give changelog back to the last common ancestor.

Parameters:
  • previous_revision – The revision to give the changelog since. If
  • give the entire changelog. (None,) –
Returns:

Changelog, as a string.

get_current_revision()[source]

Get the current revision, this can be any type (str, dict etc) appropriate to your VCS implementation.

Note

You must ensure that a revision contains enough information to clone/export/checkout the repo elsewhere - otherwise you will not be able to implement export.

get_default_url(patch=False)[source]
get_paths(patch=False)[source]
get_tags(patch=False)[source]
hg(*nargs, **kwargs)[source]
is_ancestor(commit1, commit2, patch=False)[source]

Returns True if commit1 is a direct ancestor of commit2, or False otherwise.

This method considers a commit to be a direct ancestor of itself

classmethod is_valid_root(path)[source]

Return True if the given path is a valid root directory for this version control system.

Note that this is different than whether the path is under the control of this type of vcs; to answer that question, use find_vcs_root

classmethod name()[source]

Return the name of the VCS type, eg ‘git’.

classmethod search_parents_for_root()[source]

Return True if this vcs type should check parent directories to find the root directory

tag_exists(tag_name)[source]

Test if a tag exists in the repo.

Parameters:tag_name (str) – Tag name to check for.
Returns:True if the tag exists, False otherwise.
Return type:bool
validate_repostate()[source]

Ensure that the VCS working copy is up-to-date.

exception rezplugins.release_vcs.hg.HgReleaseVCSError(value=None)[source]

Bases: rez.exceptions.ReleaseVCSError

rezplugins.release_vcs.hg.register_plugin()[source]

1.2.1.3.4. rezplugins.release_vcs.svn module

1.2.1.3.5. Module contents