You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by "Hoska, Richard A. (HQ-LD070)[InDyne, Inc]" <Ri...@nasa.gov> on 2006/07/13 21:30:36 UTC

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

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>

 

 


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

Posted by "D.J. Heap" <dj...@gmail.com>.
On 7/13/06, Hoska, Richard A. (HQ-LD070)[InDyne, Inc]
<Ri...@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