[Discuss] SubVersion post-commit configuration under Windows 2000

Alex Randell alex.randell at gmail.com
Thu Aug 10 12:06:17 PDT 2006


I'm having problems getting a subversion post-commit script working on
Windows.
It's not my choice to do this on Windows and Linux is not an option here so
please respect that.
Think of it as me asking for help configuring an Open Source app regardless
of OS..

My setup doesn't use IIS or Apache, just svnserve (Windows Service):
svn-Server-1.3.2-setup.exe
SVNService.zip (no version number?, running as local system account)
TortoiseSVN-Client-1.3.5.6804-svn-1.3.2.msi

I have setup a repository in D:\SVN\Repository, imported files into
it - which I can see and commit remotely using TortoiseSVN. svnserve runs as

the local system account and d:\temp allows full access to Everyone.

When a commit fires my logging looks like:

Start commit D:\SVN\Repository r5
Fri 08/04/2006
4:45p
"committing revision 5 to D:\SVN\Repository "
Skipped 'D:\Temp'
(Note: doesn't have rest of script output in log so it looks like it hung
here..)

But the checkout doesn't update the tree in D:\WorkingCopy

I have googled and seen many running into similar problems with no good
solutions posted.

If I run an update or checkout on D:\Temp at the command prompt then it
works just fine - so I suspect that this has something to do with
environment variables. I don't think it's a permissions problem because if I
do a bogus svn call in the post-commit hook batch it lists the help for svn
in the log so svn does run from the hook.

I recently changed the (%cmd%) to output to %log% and it says "Skipping
D:\Temp". To me that means that it doesn't recognize D:\Temp as an svn
working folder but I had already done a checkout to that folder at the
command line so the files are there and as mentioned, checkouts and updates
work on it at the command line (even if svn is run from a different working
dir).

I thought the issue might be to do with the .NET hack (changes .svn dirs to
_svn) or the fact that svn folders are hidden. To make sure I uninstalled
the .NET Hack, restarted the service, did a fresh checkout and set all .svn
folders writeable - still no go.

Any thoughts?

Cheers,
Alex

Here's the contents of my post-commit.bat:

@ECHO OFF
REM POST-COMMIT HOOK

set repo=%1
set rev=%2
set log="D:\SVN\Repository\logs\post-commit_log.txt"
set err="D:\SVN\Repository\logs\post-commit_err-log.txt"
set svn="C:\Program Files\Subversion\bin\svn.exe"

( echo
======================================================================
==
echo Start commit %repo% r%rev%
date /t
time /t ) >> %log%

set cmd=start /B /BELOWNORMAL "start-title" %svn% update
D:\WorkingCopy
(%cmd% >> %log%) && echo "committing revision %rev% to %repo%" >> %log%

( echo End commit
date /t
time /t ) >> %log%


More information about the Discuss mailing list