The environment is Windows XP running apache2 using TortoiseSVN. This is a development server that also has a copy of the repository trunk checked out and I want that checkout updated when somebody commits to the repository.
I spent hours on Google today trying to figure out how to get a hook script working on windows for SVN.
I found only one decent resource http://blog.pengoworks.com/index.cfm/2008/2/5/SVN-postcommit-for-Windows that didn’t work. I kept getting the error ‘post-commit hook failed (exit code 1) with output: ’svn is not recognized as an internal or external command, operable program or batch file.
Finally, a friend helped me out by looking up their configuration, which was a similar setup, and pointed me in the right direction. In the post-commit.bat file you create, the only thing in the file should be this windows command:
“pathToYourSVN.exe” update –username yourSVNUserName –password yourSVNPassword pathToYourCodeCheckout
It’s a very different solution and very simple as well. Hope this helps!
Caleb, you need two dashes:
–username
–password
I’m also having problem though (in windows environment). When I run my command directly in shell (cmd) it updates my working copy, fine. When I execute the batch file (with same command inside), it prints only:
Skipped ‘.’
Any idea?
I don’t think I’ve got the file setup right. Here is what I have in the .bat file right now:
“C:\Program Files\Subversion\bin\svn.exe” update –username admin –password adminpassword “E:\www\websitefolder\”
What am I doing wrong?