如何在推送时制作 Mercurial 运行脚本?
我有一台服务器,它托管带有 hgwebdir 的 Mercurial 存储库。当有人推送到此存储库时,是否可以使 Mercurial 运行脚本?
目前,我使用一个脚本每隔几分钟检查存储库状态,但这显然是一个丑陋的解决方案。
I have a server which hosts a mercurial repository with hgwebdir. Is it possible to make mercurial to run a script when someone pushes to this repository?
Currently I use a script that checks the repository state every few minutes, but this is obviously an ugly solution.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您必须向 Mercurial 服务器添加一个钩子:
查看 处理存储库事件有关更多详细信息,请参阅 Mercurial 红豆书籍中的 hooks。
You have to add a hook to your Mercurial server:
Look at Handling repository events with hooks in the Mercurial red-bean book for more details.
您可能想看看 Mercurial hooks,
http ://hgbook.red-bean.com/read/handling-repository-events-with-hooks.html
You might want to take a look at mercurial hooks,
http://hgbook.red-bean.com/read/handling-repository-events-with-hooks.html