【问题标题】:How to let a Mercurial repository automatically push to another when it receives a new changeset?如何让 Mercurial 存储库在收到新的变更集时自动推送到另一个?
【发布时间】:2012-09-06 04:15:18
【问题描述】:

我有三个 Mercurial 存储库 reporepoArepoB。我希望发生以下情况

repoA 中的一些编辑 提交给repoA 手动推送到repo repo 在收到来自repoA 的提交后立即自动更新并推送到repoB

【问题讨论】:

  • push 可能会失败。你会怎么处理?

标签: mercurial automation push commit


【解决方案1】:

Mercurial hooks怎么样?

例如:

[hooks]
changegroup = hg up; hg push repoB

如果您使用的是 Windows,则挂钩命令行将改为 hg up & hg push repoB

(请注意,对于更复杂的东西,您可以只调用 Bash/Cmd 脚本而不是像这样的单行)

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2020-09-03
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-02-18
    • 1970-01-01
    相关资源
    最近更新 更多