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

RE: Re: Running Hook script on Windows

From: Daniell, Casey B <Casey_Daniell_at_reyrey.com>
Date: 2006-05-12 23:30:48 CEST

Ahhhh, that's it exactly, I found the log file I was trying to create on
my local machine. Too bad *none* of the documentation I was reading
mentioned this, it would have saved a day or so.

Thanks for the help
Casey

---------------------------------------------
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
-----Original Message-----
From: Johan Appelgren [mailto:johan.appelgren@gmail.com]
Sent: Thursday, May 11, 2006 1:39 PM
To: Subversion Mailing List
Subject: Re: Running Hook script on Windows

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:\Applic
> at 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

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Fri May 12 23:32:08 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.