Support for the Mercurial SCM
Export a tarball from the repository
The path to the Mercurial repository
The path to the archive tarball
The revision to create an archive from
Format of the resulting archive. Mercurial supports: tar, tbz2, tgz, zip, uzip, and files formats.
Prepend <prefix>/ to every filename in the archive
Run hg as a user other than what the minion runs as
If prefix
is not specified it defaults to the basename of the repo
directory.
CLI Example:
salt '*' hg.archive /path/to/repo output=/tmp/archive.tgz fmt=tgz
Clone a new repository
The path to the Mercurial repository
The hg URI of the repository
Any additional options to add to the command line
Run hg as a user other than what the minion runs as
Private SSH key on the minion server for authentication (ssh://)
New in version 2015.5.0.
CLI Example:
salt '*' hg.clone /path/to/repo https://bitbucket.org/birkenfeld/sphinx
Mimic git describe and return an identifier for the given revision
The path to the Mercurial repository
The path to the archive tarball
Run hg as a user other than what the minion runs as
CLI Example:
salt '*' hg.describe /path/to/repo
Perform a pull on the given repository
The path to the Mercurial repository
Perform pull from the repository different from .hg/hgrc:[paths]:default
Any additional options to add to the command line
Run hg as a user other than what the minion runs as
Private SSH key on the minion server for authentication (ssh://)
New in version 2015.5.0.
CLI Example:
salt '*' hg.pull /path/to/repo opts=-u
Returns the long hash of a given identifier (hash, branch, tag, HEAD, etc)
The path to the Mercurial repository
The revision
Return an abbreviated commit hash
Run hg as a user other than what the minion runs as
CLI Example:
salt '*' hg.revision /path/to/repo mybranch
Show changed files of the given repository
The path to the Mercurial repository
Any additional options to add to the command line
Run hg as a user other than what the minion runs as
CLI Example:
salt '*' hg.status /path/to/repo
Update to a given revision
The path to the Mercurial repository
The revision to update to
Force an update
Run hg as a user other than what the minion runs as
CLI Example:
salt devserver1 hg.update /path/to/repo somebranch