管理和同步多个git、mercurial和svn仓库
项目描述
$ vcspull ·

通过 JSON 或 YAML 文件管理并同步多个 git、svn 和 mercurial 仓库。与 myrepos、mu-repo 相比。基于 libvcs 构建。
如果您在多台机器上使用相同位置的仓库,或者想要克隆/更新一组仓库而不必逐个进入,这将非常有用。
- 使用
$ vcspull
克隆/更新到最新的仓库 - 使用过滤器指定位置、仓库 URL 或清单中的模式以克隆/更新
- 支持 svn、git、hg 版本控制系统
- 自动检出新的仓库
- 支持 pip-style URL(基于 RFC3986 的 URL 方案)
如何
安装
$ pip install --user vcspull
开发版本
您可以在发布之前测试未发布的 vcspull 版本。
-
pip:
$ pip install --user --upgrade --pre vcspull
-
pipx:
$ pipx install --suffix=@next 'vcspull' --pip-args '\--pre' --force
然后使用
vcspull@next sync [config]...
。
配置
将您的仓库添加到 ~/.vcspull.yaml
。
vcspull 当前不会在您的系统上扫描仓库,但将来可能会
~/code/:
flask: "git+https://github.com/mitsuhiko/flask.git"
~/study/c:
awesome: "git+git://git.naquadah.org/awesome.git"
~/study/data-structures-algorithms/c:
libds: "git+https://github.com/zhemao/libds.git"
algoxy:
repo: "git+https://github.com/liuxinyu95/AlgoXY.git"
remotes:
tony: "git+ssh://git@github.com/tony/AlgoXY.git"
(见作者.vcspull.yaml,更多配置)
$HOME/.vcspull.yaml
和 $XDG_CONFIG_HOME/vcspull/
(~/.config/vcspull
)可以用作声明性清单,以便在多台机器上一致地克隆您的仓库。后续同步已初始化的仓库将获取最新的提交。
同步您的仓库
$ vcspull sync
同时保持嵌套 VCS 仓库更新,例如,您有一个 mercurial 或 svn 项目,其中包含 git 依赖项
在项目根目录中的 external_deps.yaml
(任何文件名都可以)
./vendor/:
sdl2pp: "git+https://github.com/libSDL2pp/libSDL2pp.git"
通过配置文件克隆/更新仓库
$ vcspull sync -c external_deps.yaml '*'
更多请参阅快速入门。
拉取特定仓库
有很多仓库吗?
您可以通过 fnmatch 模式选择仅更新选定的仓库。请记住先将仓库添加到您的 ~/.vcspull.{json,yaml}
中。
这些模式可以按目录、仓库名称或 VCS URL 过滤。
任何以 "fla" 开头的仓库
$ vcspull sync "fla*"
任何名称中包含 django 的仓库
$ vcspull sync "*django*"
通过 vcs + url 搜索,因为 URL 格式为 +://
$ vcspull sync "git+*"
任何包含 python 的 git 仓库
$ vcspull sync "git+*python*
任何 vcs URL 中包含 django 的 git 仓库
$ vcspull sync "git+*django*"
您的 ~/code 目录中的所有仓库
$ vcspull sync "$HOME/code/*"
捐赠
您的捐赠将用于开发新功能、测试和支持。您的资金将直接用于项目的维护和开发。如果您是个人,请根据您从项目中获得的价值随意捐赠。
请参阅https://git-pull.com/support.html 中的捐赠选项。
更多信息
- Python 支持:>= 3.9,pypy
- 支持的 VCS:git(1),svn(1),hg(1)
- 源:https://github.com/vcs-python/vcspull
- 文档:https://vcspull.git-pull.com
- 变更日志:https://vcspull.git-pull.com/history.html
- API:https://vcspull.git-pull.com/api.html
- 问题:https://github.com/vcs-python/vcspull/issues
- 测试覆盖率:https://codecov.io/gh/vcs-python/vcspull
- PyPI:https://pypi.python.org/pypi/vcspull
- Open Hub:https://www.openhub.net/p/vcspull
- 许可证:MIT。
项目详情
下载文件
下载适合您平台文件的文件。如果您不确定选择哪个,请了解更多关于安装包的信息。