[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: <illarane_at_vinari.co.uk>
Date: 2007-01-17 11:38:06 CET


I'm having some problems getting the post-commit hook .bat file working
properly on Windows 2003 Server.

Our setup is the SVN server on one dedicated machine, a development server
hosting IIS6 and a team of about 20 developers using TortoiseSVN and
Ankh/VS7 to do the actual committing. The SVN backend is accessed using
svn+ssh which is running on an OpenSSH backend that authenticates users
against our primary domain server and a list of users on the machine
itself. Commits, updates, etc, all work fine through TortoiseSVN, but not
when called using the command-line svn.exe client through the .bat file.

At the moment, the .bat contains this script:

    @ECHO ON

    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 /+

    set cmd=%svn% update
    (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
======================================================================== )
| \\2699_0000\c$\subversion\utilities\mtee.exe /A /D /T /+ %log%

That's based on something I found elsewhere on this list. mtee.exe grabs
all output and dumps it in to %log%. The output of the last command is
also sent to %proclog% so I can see if anything is actually running without
having to trawl through the main log.

OpenSSH is run as my own user account, which can execute the script fine.
I get this appear if I run the script myself by double-clicking the file:

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 the script is called by SVN this appears:

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

As you can see, there is no output from svn.exe there. There is also
nothing appearing in %proclog% when the .bat is run by SVN.

As I understand it, the .bat file runs locally on the machine which
instigates the commit and not the machine which hosts the server. If this
is wrong, it might explain some things, heh. The machine hosting the SVN
server is 2699_0000 and does have a drive mapped to the remote working
copy, but that didn't seem to work either so I changed the references to
SMB references.

I have found a few references to similar problems, but they all seem to be
or people who are using Apache as the SVN backend, which is not possible
here for various reasons. We have a Linux development server coming, but
this will not arrive for the best part of a month and we need to be able to
have some kind of version management system in place as soon as possible.
At the moment we are triggering the remote update manually using a shortcut
on the Quick Launch bar, but this is a waste of time and irritating as it's
an extra click for every commit, which happens quite regularly due to the
method through which the company's developers work. The repository has
been in use for only two days and is already at revision 276, so you can
see why it's an issue.

If anyone knows how we may be able to rectify this problem, please do let
me know, as it's driving me insane and I've been trying to fix it since


Benjamin Nolan.

mail2web - Check your email from the web at
http://mail2web.com/ .

To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Wed Jan 17 16:04:10 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.