0

这是我在 vm01 存储库“repos”中的提交后挂钩:

#!/bin/sh
#/var/www/svn/repos/hooks/post-commit
# Include the below line for each slave in the environment
echo "Im gettting called"  >> /var/log/httpd/svnsynclog
/usr/bin/svnsync sync http://vm02/repos >> /var/log/httpd/svnsynclog 2>&1 &

同步过程不会自动“提交后”发生。以下是观察结果:

  • 最初 vm01 和 vm02 分别对存储库“repos”有修订 x 和 0。

  • 我执行了一次提交,vm01 有修订版 (x+1),vm02 有修订版 x。

  • 在 svnsync 日志中,没有错误。即使在写入重定向到此日志的回声之后,也没有条目。因此,我相信发布后提交挂钩不会在我发布后被触发。

  • 如果我手动运行提交后,会发生同步。vm01 和 vm02 都将具有 (x+1) 和 (x+1) 修订版。

  • 我提供了完全权限,检查了所有者等,我什至将提交后的模板移出了钩子目录,但仍然没有调用提交后的钩子。

我还缺少任何其他细节吗?

4

0 回答 0