我正在笔记本电脑上的Mercurial存储库中编写代码,然后通过hg push将其推送到服务器,然后在服务器上运行hg update,然后在服务器上运行新编写的代码。从笔记本电脑推送到服务器后,是否有任何方法可以强制将服务器上的存储库自动更新为最新版本,因此可以保存步骤?

最佳答案

查看有关HG常见问题的以下条目:Any way to 'hg push' and have an automatic 'hg update' on the remote server?

根据常见问题解答,您可以使用挂钩在推送后自动调用“ Mercurial 更新”

[hooks]
changegroup = hg update >&2

这在远程存储库中的.hg / hgrc中。输出必须重定向到stderr(或/ dev / null),因为stdout用于数据流。

关于version-control - 推送到远程 Mercurial 仓库后,是否可以强制进行 Mercurial 更新?,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/4300245/

10-10 04:41
查看更多