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

Re: Running Hook script on Windows

From: Johan Appelgren <johan.appelgren_at_gmail.com>
Date: 2006-05-11 20:39:17 CEST

On 5/11/06, Daniell, Casey B <Casey_Daniell@reyrey.com> wrote:
> Ok, upon further investigation, I have found a pre-commit.bat script
> that works:
> ------------------------------------------------------------------------
> -------
> @echo off
> :: Stops commits that have empty log messages.
>
> setlocal
>
> set "REPOS=%~1"
> set "TXN=%~2"
>
> :: Make sure that the log message contains some text.
> for /f "tokens=*" %%i in ('C:\Progra~1\Subversion\bin\Svnlook.exe log -t
> "%TXN%" "%REPOS%"') do set "LOGMSG=%%i"
> if not "%LOGMSG%"=="" exit 0
>
> echo. 1>&2
> echo Your commit has been cancelled because you didn't enter a log
> message! 1>&2
> echo Please write a brief log message giving an overview of the changes
> 1>&2
> echo that you are checking in.
> exit 1
> ------------------------------------------------------------------------
> -------
>
> However, the below post-commit script still doesn't run, and fails to
> write *anything* to the logfile, c:\Casey_temp_email.txt, when its
> supposed to be automatically run. However manually running this script
> and passing in the correct parameters works every time? Ideas? I have
> confirmed all the patch to exe's are correct.
>
> ------------------------------------------------------------------------
> -------
> echo on
>
> set REPOS=%1
> set REV=%2
>
>
> SET
> PATH=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;E:\Applicat
> ions\Server\Subversion\bin;E:\Applications\Server\Python
>
> E:\Applications\Server\Python\python.exe
> E:\Applications\Server\Subversion\tools\hook-scripts\mailer.py commit
> "%REPOS%" "%REV%"
> E:\Applications\Server\Subversion\tools\hook-scripts\mailer.conf >
> c:\Casey_Temp_email.txt 2>&1

Since you use file access everything is done by the users subversion.
So the hookscript's paths must be valid on the users local machine.
I'm guessing your users have subversion installed in "c:\program
files" and not in e:\applications\server\subversion so in your second
hook script the subversion binaries cannot be found.

/Johan

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu May 11 20:40:41 2006

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.