gpt4 book ai didi

mercurial-hook - 如何通过 mercurial 传入 Hook 运行 "hg update"

转载 作者:行者123 更新时间:2023-12-04 14:32:30 24 4
gpt4 key购买 nike

什么是正确的运行方式hg update在传入的钩子(Hook)中?

是吗:

[hooks]
incoming.foo = hg update

this

还是有更优雅的方式来做到这一点?

最佳答案

FAQ提出这个建议:

[hooks]
changegroup = hg update

This goes in .hg/hgrc on the remote repository



所以,确实,这是简单而正确的做法。您的示例使用了 incoming ,但该 Hook 为每个变更集运行一次。 changegroup钩子(Hook)在所有更改都被拉入后完成一次,所以我认为它可能更适合您的需求。

如果您最终需要更多控制,您可以创建一个进程内 Hook 脚本来满足这些需求。 Wiki 有一些 good examples .

关于mercurial-hook - 如何通过 mercurial 传入 Hook 运行 "hg update",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10292917/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com