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

Re: post-commit calling NAnt file (on windows obviously =))

From: D.J. Heap <djheap_at_gmail.com>
Date: 2006-07-13 23:37:15 CEST

On 7/13/06, Hoska, Richard A. (HQ-LD070)[InDyne, Inc]
<Richard.A.Hoska@nasa.gov> wrote:
>
>
>
>
> I'm having a lot of trouble getting a post commit hook to work.
>
>
>
> I'm using post-commit.bat to call a NAnt build file, the code below works
> perfectly when I just run the batch file either from the command line or
> double click on it but its not working with subversion.
>
>
>
> I have played with this endlessly and can't seem to get any further than I
> am now. I think that the hook is working (as in calling the Nant build
> file) because when I have it active commits take noticeably longer than when
> I remove it.
>
>
>
> If anyone has any ideas I would be most appreciative.
>
>
> -----------------post-commit.bat-------------------------------
> @echo off
> cls
>
> cd C:\Program Files\NAnt\bin\
> start /b nant
> -buildfile:c:\svn\PCADS\hooks\UpdateRepository.build
>
>
>
> ----------------
> UpdateRepository.build-----------------------
> <?xml version="1.0"?>
> <project name="Update Repository" default="Update">
> <target name="Update">
> <!--<echo>Attempting to Update the repository</echo>-->
>
> <svn-update
> destination="Z:\pcads\buildv10"
>
> uri="http://198.116.131.106/svn/PCADS/trunk/SourceCode"
> quiet="true"
> username="anonymoose"
> password="Canada"
> />
>
> <!--<echo>Finished updating the repository</echo>-->
> </target>
> </project>
>

Is Z: a network mapped drive? If the repository server is running as
a service (Apache or svnserve) then they need to be running under a
network user (with appropriate permissions on the network) and you
should probably use a UNC path or you'll have to map the drive in the
hook.

Also, try redirecting the nant output to a log file somewhere to see
what is happening.

DJ

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Jul 13 23:39:56 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.