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

Re: Linux post commit script help

From: Ryan Schmidt <subversion-2008b_at_ryandesign.com>
Date: Mon, 26 May 2008 17:58:29 -0500

On May 26, 2008, at 14:56, joncarl wrote:

>> Jon probably wants to _update_ a working copy as soon as a new commit
>> enters
> That's exactly what I want to do. Database migrations aren't an
> issue at
> this stage. I've just read the post-commit section of the book
> (http://svnbook.red-bean.com/en/1.4/svn.ref.reposhooks.post-
> commit.html) but
> it doesn't go into any detail of how to construct such a script.

Off the top of my head, here's a bash post-commit hook script:




$SVN update --non-interactive $WC

You would first need to check out a working copy to the path at $WC.

You would need to make sure that the user as whom this script is
running (i.e. the user as whom the repository is served) has
permission to write to that working copy. Also, that user's
~/.subversion directory needs to have the appropriate credentials
cached already (otherwise the $SVN update command will ask for a
username and password, which the process running the hook script
won't be able to provide).

To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-05-27 00:58:53 CEST

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.