Mercurial文件服务器后端
To enable, add hg to the fileserver_backend option in the
Master config file.
fileserver_backend:
- hg
After enabling this backend, branches, bookmarks, and tags in a remote
mercurial repository are exposed to salt as different environments. This
feature is managed by the fileserver_backend option in the salt
master config file.
This fileserver has an additional option hgfs_branch_method that
will set the desired branch method. Possible values are: branches,
bookmarks, or mixed. If using branches or mixed, the
default branch will be mapped to base.
在 2014.1.0 版更改: The hgfs_base master config parameter was added, allowing
for a branch other than default to be used for the base
environment, and allowing for a base environment to be specified when
using an hgfs_branch_method of bookmarks.
| depends: |
|
|---|
salt.fileserver.hgfs.clear_cache()¶Completely clear hgfs cache
salt.fileserver.hgfs.clear_lock(remote=None)¶Clear update.lk
remote can either be a dictionary containing repo configuration
information, or a pattern. If the latter, then remotes for which the URL
matches the pattern will be locked.
salt.fileserver.hgfs.dir_list(load)¶返回一个在master所有目录的列表。
salt.fileserver.hgfs.envs(ignore_cache=False)¶Return a list of refs that can be used as environments
salt.fileserver.hgfs.file_hash(load, fnd)¶返回一个文件hash,hash类型在master配置文件中设置。
salt.fileserver.hgfs.file_list(load)¶在指定环境中返回文件服务器的所有文件列表
salt.fileserver.hgfs.file_list_emptydirs(load)¶Return a list of all empty directories on the master
salt.fileserver.hgfs.find_file(path, tgt_env='base', **kwargs)¶Find the first file to match the path and ref, read the file out of hg and send the path to the newly cached file
salt.fileserver.hgfs.init()¶Return a list of hglib objects for the various hgfs remotes
salt.fileserver.hgfs.lock(remote=None)¶Place an update.lk
remote can either be a dictionary containing repo configuration
information, or a pattern. If the latter, then remotes for which the URL
matches the pattern will be locked.
salt.fileserver.hgfs.serve_file(load, fnd)¶从一个基于接收到的文件中返回数据块
salt.fileserver.hgfs.update()¶Execute an hg pull on all of the repos