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

Re: [Subclipse-users] Svnant fails when run as hook

From: Johannes Braunias <Johannes.Braunias_at_sonydadc.com>
Date: 2007-11-23 16:34:58 CET

"Mark Phippard" <markphip@gmail.com> schrieb am 23.11.2007 15:53:52:
> On Nov 23, 2007 5:36 AM, Johannes Braunias
> I do not have anything concrete to tell you, but I can say that when a
> hook script is run, there is no environment at all. So %PATH% will
> not be set, nor will any other variable that you might need.

I set the path variable in the batch script and could verify it
with echo-ing it into a file out of the ant project.

Hmm. But thanks for the hint all the same.

Johannes

Reference to:

### post-commit.bat (exporting revision 30):
set REPOS=%1
set REV=%2
set ANT_HOME=C:\Programme\apache-ant-1.7.0
set JAVA_HOME=C:\Programme\Java\jre1.6.0_02
set SVN_HOME=C:\Programme\svn-win32-1.4.5
set PATH=%PATH%;%ANT_HOME%\bin
set PATH=%PATH%;%SVN_HOME%\bin
ant -f D:\data\svn\repository\hooks\post-commit\post-commit-test.xml
-Drepos=%REPOS% -Drev=30 -logfile
d:\data\svn\repository\hooks\post-commit\log\ant.log

### Ant file:
<project name="post-commit-hook" default="testtask" basedir=".">
        <property name="dir-source" location="c:\temp\repcopy"/>
        <property name="dir-dest" location="c:\temp\dist"/>
        <property name="repos" value="____"/>
        <property name="rev" value="____"/>
 
        <property environment="env"/>

        <typedef resource="svntask.properties"/> <!--
Alternativsyntax: <taskdef name="svn"
classname="org.tigris.subversion.svnant.SvnTask"/> -->

        <target name="testtask">
                <!--<echo message="Repository: ${repos} Revision: ${rev}"
file="c:\temp\antausgabe.txt"/>-->
                <echo message="Environment: ${env.Path}"
file="d:\data\svn\repository\hooks\post-commit\log\echo.txt"/>
 
                <svn javahl="false" username="jbraunia"
password="jbrauniaSVN">
                        <export srcUrl="http://localhost/svn/test"
destPath="c:\temp\rrrrrraus" revision="${rev}" force="true"/>
                </svn>
        </target>
</project>
Received on Fri Nov 23 16:35:23 2007

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

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