【发布时间】:2013-04-11 15:55:36
【问题描述】:
我已经搜索了一段时间,但没有看到任何东西。这可能意味着,它不应该完成,或者根本无法完成。
我查看了 mercurial 的钩子列表,但在您发出 hg pull 命令后,我似乎找不到(或让一个工作)执行脚本。
谢谢
【问题讨论】:
我已经搜索了一段时间,但没有看到任何东西。这可能意味着,它不应该完成,或者根本无法完成。
我查看了 mercurial 的钩子列表,但在您发出 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.
(文档还详细介绍了配置的实际外观以及如何调用挂钩脚本。)
【讨论】:
pretxnchangegroup 在拉取变更集之后运行,但在它们在本地存储库中永久化之前运行。如果您需要在传入变更集被接受之前对其进行验证,这将非常有用。