[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Post-commit(.bat) Issues on Windows 2003 Server

From: Ben Nolan <ben.nolan_at_gmail.com>
Date: 2007-01-17 12:00:42 CET

Hiya,

I am having some problems getting the post-commit hook script to work
properly on Windows 2003 Server. I've found similar problems
elsewhere on this list, but they all seem to be using Apache as the
subversion backend. I apologise in advance if this email is a bit
short, but I spent about 40 minutes writing one which was detailed and
easy to read, and then realised you had to confirm the subscription to
this list, which helpfully hasn't bounced the message back to me. >: (

Anyway, our setup is one machine hosting the SVN server and OpenSSH,
which controls SVN logins by authenticating against Active Directory,
one development server on which a working copy of the repo is kept and
is meant to be updated by the post-commit hook, and a team of around
20 developers who work on XP machines using TortoiseSVN or AnkhSVN.
OpenSSH is run as my own user account, which has administrator
privileges on all the revelant machines.

The post-commit script itself is as follows:

@ECHO ON
REM POST-COMMIT HOOK

set repo=%1
set rev=%2
set log="C:\svn.log"
set proclog="C:\svn_commit.log"
set err="C:\error.log"
set svn="\\2699_0000\c$\progra~1\subversion\bin\svn.exe"
set svnpath="\\2699_0000\c$\progra~1\subversion\bin"

( echo ========================================================================
echo Start update from %repo% r%rev%
date /t
time /t ) | \\2699_0000\c$\subversion\utilities\mtee.exe /A /D /T /+ %log%

set cmd=%svn% update
\\serverName\webroot\wwwdev.domainname.co.uk\docs\projectName
(start "start-title" /D%svnpath% /BELOWNORMAL /B %cmd% |
\\2699_0000\c$\subversion\utilities\mtee.exe /A /D /T /+ %log%) >>
%proclog%

( echo Finished update from %repo% r%rev%
date /t
time /t
echo ========================================================================
) | \\2699_0000\c$\subversion\utilities\mtee.exe /A /D /T /+ %log%

When it's run by myself manually, I get this output in the log:

2007-01-17 10:24:33.498
========================================================================
2007-01-17 10:24:33.498 Start update from r
2007-01-17 10:24:33.498 17/01/2007
2007-01-17 10:24:33.498 10:24
2007-01-17 10:24:34.639 At revision 135.
2007-01-17 10:24:35.170 Finished update from r
2007-01-17 10:24:35.170 17/01/2007
2007-01-17 10:24:35.170 10:24
2007-01-17 10:24:35.170
========================================================================

However, when it's called by SVN, I get this in the log:

2007-01-17 10:25:57.842
========================================================================
2007-01-17 10:25:57.842 Start update from
/subversion/repositories/projectName r136
2007-01-17 10:25:57.842 17/01/2007
2007-01-17 10:25:57.842 10:25
2007-01-17 10:25:58.217 Finished update from
/subversion/repositories/projectName r136
2007-01-17 10:25:58.217 17/01/2007
2007-01-17 10:25:58.217 10:25
2007-01-17 10:25:58.217
========================================================================

I've tried using local paths and mapped drives in the script, but
these do not seem to work. From what I gather, this is a permissions
problem of some ilk, but whether it's coming from SVN itself, OpenSSH
or Windows is not something I can figure out.

Anyone got any ideas?

Regards,

Benjamin Nolan.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Wed Jan 17 12:01:05 2007

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.