mozversioncontrol package
Submodules
mozversioncontrol.errors module
- exception mozversioncontrol.errors.CannotDeleteFromRootOfRepositoryException
Bases:
Exception
Represents that the code attempted to delete all files from the root of the repository, which is not permitted.
- exception mozversioncontrol.errors.InvalidRepoPath
Bases:
Exception
Represents a failure to find a VCS repo at a specified path.
- exception mozversioncontrol.errors.MissingConfigureInfo
Bases:
MissingVCSInfo
Represents error finding VCS info from configure data.
- exception mozversioncontrol.errors.MissingUpstreamRepo
Bases:
Exception
Represents a failure to automatically detect an upstream repo.
- exception mozversioncontrol.errors.MissingVCSExtension(ext)
Bases:
MissingVCSInfo
Represents error finding a required VCS extension.
- exception mozversioncontrol.errors.MissingVCSInfo
Bases:
Exception
Represents a general failure to resolve a VCS interface.
- exception mozversioncontrol.errors.MissingVCSTool
Bases:
Exception
Represents a failure to find a version control tool binary.
mozversioncontrol.factory module
- mozversioncontrol.factory.get_repository_from_build_config(config)
Obtain a repository from the build configuration.
Accepts an object that has a
topsrcdir
andsubst
attribute.
- mozversioncontrol.factory.get_repository_from_env()
Obtain a repository object by looking at the environment.
If inside a build environment (denoted by presence of a
buildconfig
module), VCS info is obtained from it, as found via configure. This allows us to respect what was passed into configure. Otherwise, we fall back to scanning the filesystem.
- mozversioncontrol.factory.get_repository_object(path: str | Path | None, hg='hg', git='git', src='src')
Get a repository object for the repository at path. If path is not a known VCS repository, raise an exception.
mozversioncontrol.repoupdate module
- mozversioncontrol.repoupdate.update_git_repo(repo: str, path: str | Path)
Ensure a git repository exists at a path and is up to date.
- mozversioncontrol.repoupdate.update_mercurial_repo(repo: str, path: str | Path, revision='default', hostfingerprints=None, global_args=None)
Ensure a HG repository exists at a path and is up to date.