颠覆提交后失败!
我刚刚运行了 subversion,但我的 post-commit.tmpl 失败了。
我想在每次主干提交时更新我的实时目录,这样我总是可以看到新的工作代码。虽然这似乎在我通过 ssh 更新午餐时有效,但在模板文件中无效。
这是我在 post-commit.tmpl 中得到的:
REPOS="$1"
REV="$2"
/usr/share/subversion/hook-scripts/commit-email.pl \
"$REPOS" "$REV" [email protected]
svn update /var/www/vhosts/mysite.nu/devlive >> /var/www/vhosts/mysite.nu/log/log-dev-live
此外,我在日志中什么也没有得到。
我已将目录的所有权限更改为我的网络服务器用户 (www-data) 和 chmod 777。
我做错了什么?
I have just got subversion up running, but my post-commit.tmpl is failing.
I want to update my live directory at every trunk commit, so i always can see the new working code. Although this seems to work when i lunch the update by ssh, but not in the template file.
This is what i got in my post-commit.tmpl:
REPOS="$1"
REV="$2"
/usr/share/subversion/hook-scripts/commit-email.pl \
"$REPOS" "$REV" [email protected]
svn update /var/www/vhosts/mysite.nu/devlive >> /var/www/vhosts/mysite.nu/log/log-dev-live
Furthermore i get nothing in the log.
I have changed all permissions to the directories towards my webserver user (www-data) and chmod 777.
What am i doing wrong?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
由于可能未设置
PATH
变量,因此您需要在此处使用svn
的完整路径(例如/usr/bin/svn
)。另外,IIRC 文件应命名为
post-commit
,而不是post-commit.tmpl
(这只是一个模板,是有关如何执行此操作的示例)。Since the
PATH
variable may not be set you need to use the full path tosvn
here (like/usr/bin/svn
).Also, IIRC the file should be named
post-commit
, notpost-commit.tmpl
(which is just a template, an example on how you can do it).