Support for the Mercurial SCM
salt.modules.hg.
archive
(cwd, output, rev='tip', fmt=None, prefix=None, user=None)¶Export a tarball from the repository
If prefix
is not specified it defaults to the basename of the repo
directory.
CLI 范例:
salt '*' hg.archive /path/to/repo output=/tmp/archive.tgz fmt=tgz
salt.modules.hg.
clone
(cwd, repository, opts=None, user=None, identity=None)¶Clone a new repository
Private SSH key on the minion server for authentication (ssh://)
2015.5.0 新版功能.
CLI 范例:
salt '*' hg.clone /path/to/repo https://bitbucket.org/birkenfeld/sphinx
salt.modules.hg.
describe
(cwd, rev='tip', user=None)¶Mimic git describe and return an identifier for the given revision
CLI 范例:
salt '*' hg.describe /path/to/repo
salt.modules.hg.
pull
(cwd, opts=None, user=None, identity=None, repository=None)¶Perform a pull on the given repository
Private SSH key on the minion server for authentication (ssh://)
2015.5.0 新版功能.
CLI 范例:
salt '*' hg.pull /path/to/repo opts=-u
salt.modules.hg.
revision
(cwd, rev='tip', short=False, user=None)¶Returns the long hash of a given identifier (hash, branch, tag, HEAD, etc)
CLI 范例:
salt '*' hg.revision /path/to/repo mybranch
salt.modules.hg.
status
(cwd, opts=None, user=None)¶Show changed files of the given repository
CLI 范例:
salt '*' hg.status /path/to/repo
salt.modules.hg.
update
(cwd, rev, force=False, user=None)¶Update to a given revision
CLI 范例:
salt devserver1 hg.update /path/to/repo somebranch