gpt4 book ai didi

Mercurial:如何在拉动时添加钩子(Hook)

转载 作者:行者123 更新时间:2023-12-02 23:33:06 25 4
gpt4 key购买 nike

我已经搜索了一段时间,但没有看到任何东西。这可能意味着,这是不应该完成的,或者根本无法完成的。

我查看了 Mercurial 的钩子(Hook)列表,但似乎找不到(或无法工作)在发出 hg pull 命令后执行脚本。

谢谢

最佳答案

来自hgrc docs section on "hooks" -

"incoming"
Run after a changeset has been pulled, pushed, or unbundled into the
local repository. The ID of the newly arrived changeset is in
"$HG_NODE". URL that was source of changes came is in "$HG_URL".

或者...

"post-<command>"
Run after successful invocations of the associated command. The contents
of the command line are passed as "$HG_ARGS" and the result code in
"$HG_RESULT". Parsed command line arguments are passed as "$HG_PATS" and
"$HG_OPTS". These contain string representations of the python data
internally passed to <command>. "$HG_OPTS" is a dictionary of options
(with unspecified options set to their defaults). "$HG_PATS" is a list
of arguments. Hook failure is ignored.

(文档还详细介绍了配置的实际外观以及如何调用 Hook 脚本。)

关于Mercurial:如何在拉动时添加钩子(Hook),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15953441/

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