views:

34

answers:

1

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

+3  A: 

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.

Anders Lindahl