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

Get Svnlook output from .bat file

From: Roth, Pierre <pierre.roth_at_covidien.com>
Date: 2007-11-20 10:46:01 CET

Hi,

I posted some days ago on which Os is prefered to run subversion on ? My
answer is definitly *nix.
I'm trying to setup the trac-pre-commit hook on a Windows environment
and batch can't really be compared to bash...

But this is not the subject of my email; so here's my question : I would
like to get the svnlook output.

I tried to write the output to a temp file as described in another
thread. But now, that log info is in this temp file, I can't get it back
to my batch, to pass it to my trac-pre-commit-hook python script... I
tried the file:%LOG_FILE% ... Did not work...

Here is my pre-commit.bat hook....

Any help from somebody who has some batch knowledge would be very
precious !

Thanks,
Pierre

-----------------------------------
@ECHO OFF
SET REPOS=%1
SET REV=%2

SET SVN_DIR=C:\Program Files\Subversion
SET PYTHON_DIR=C:\Python24
SET HOOKS_DIR=D:\svn_repos\Legendair\hooks
SET TRAC_ENV=D:\trac\initenv\
SET TRAC_URL=http://localhost/trac/

SET PYTHON="%PYTHON_DIR%\python.exe"
SET SVN="%SVN_DIR%\bin\svn.exe"
SET SVNADMIN="%SVN_DIR%\bin\svnadmin.exe"
SET SVNLOOK="%SVN_DIR%\bin\svnlook.exe"
SET TEMP=C:\temp
SET LOG_FILE=%TEMP%\svnfileT-%REV%

%SVNLOOK% log -t %REV% %REPOS%>%LOG_FILE%

"%PYTHON%" "%HOOKS_DIR%\trac-pre-commit-hook" %TRAC_ENV% file:%LOG_FILE%

IF ERRORLEVEL 1 SET TRAC_CANCEL=YES
rem DEL %LOG_FILE%
IF DEFINED TRAC_CANCEL GOTO :ERROR
:SUCCESS
EXIT 0
:ERROR
EXIT 1

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Tue Nov 20 10:46:30 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.