Visual SVN、hudson 构建触发器
我在 Windows Server 2008 上安装了 VisualSVN 服务器。我想使用提交后挂钩命令行来调用我在 Hudson 网站上获得的代码:
set REPOS="$1"
set REV="$2"
set UUID=`svnlook uuid $REPOS`
/usr/bin/wget \
--header "Content-Type:text/plain;charset=UTF-8" \
--post-data "`svnlook changed --revision $REV $REPOS`" \
--output-document "-" \
http://server/hudson/subversion/${UUID}/notifyCommit?rev=$REV
我用我的真实服务器名称替换服务器,但脚本不起作用。我不知道它从哪里获取 $1 和 $2,因为它说复制并粘贴到提交后挂钩中,我认为这意味着它不需要更改。我不断收到这些错误:
Error: post-commit hook failed (exit code 1) with output:
Error: The system cannot find the path specified.
Error: '--header' is not recognized as an internal or external command,
Error: operable program or batch file.
Error: '--post-data' is not recognized as an internal or external command,
Error: operable program or batch file.
Error: '--output-document' is not recognized as an internal or external command,
Error: operable program or batch file.
Error: 'http:' is not recognized as an internal or external command,
Error: operable program or batch file.
问题
有谁知道为什么我不断收到这些错误以及如何修复它?
以下是 hudson 文档的链接:
http://wiki.hudson-ci.org/display/HUDSON/Subversion+Plugin
I have visualSVN server installed on windows server 2008. I want to use the post commit hook command line to call this code that I got on the Hudson web site:
set REPOS="$1"
set REV="$2"
set UUID=`svnlook uuid $REPOS`
/usr/bin/wget \
--header "Content-Type:text/plain;charset=UTF-8" \
--post-data "`svnlook changed --revision $REV $REPOS`" \
--output-document "-" \
http://server/hudson/subversion/${UUID}/notifyCommit?rev=$REV
I replace server with my real server name but the script doesn't work. I have no idea where it is getting the $1 and $2 from since it says copy and paste into the post commit hook I figured that means it doesn't need to be changed. I keep getting these errors:
Error: post-commit hook failed (exit code 1) with output:
Error: The system cannot find the path specified.
Error: '--header' is not recognized as an internal or external command,
Error: operable program or batch file.
Error: '--post-data' is not recognized as an internal or external command,
Error: operable program or batch file.
Error: '--output-document' is not recognized as an internal or external command,
Error: operable program or batch file.
Error: 'http:' is not recognized as an internal or external command,
Error: operable program or batch file.
Question
Does anyone know why I keep getting these errors and how I can fix it?
Here is the link to the hudson documentation:
http://wiki.hudson-ci.org/display/HUDSON/Subversion+Plugin
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

您的问题(和错误消息)表明该脚本正在 Windows 上执行,但列出的脚本是 Unix shell 脚本。尝试相应的 Windows 脚本套件。
Your question (and the error messages) indicate that this script is executing on Windows, but the script listed is a Unix shell script. Try the corresponding suite of scripts for Windows.