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

Update from post-commit hook

From: Phil Endecott <spam_from_subversion_users_at_chezphil.org>
Date: 2005-11-09 21:05:25 CET

Dear All,

I have been thinking about using a post-commit hook to keep a public
"latest snapshot" of part of the repository up to date. This could be
as simple as putting

        cd /latest/snapshot/; svn update

in the post-commit hook. I've done some quick experiments which have
not been very sucessful, so I have some questions:

- Where do error messages from the hook scripts go? (Using Apache.)

- Access is normally via Apache; is the nested call to svn OK, or does
/latest/snapshot/ need to be a file: checkout, or what? (One of my
experiments led to a runaway svn process, making me think that something
recursive was going on.)

- (Possibly related to the above:) I rquire HTTP AUTH for both read and
write to the repository. How can the apache user, who runs the hook
script, authenticate itself in the nested call?

- Only part of the repository is being tracked in this snapshot. I
could make the update conditional by checking if it has changed using
svnlook, maybe something like: "snvlook changed | grep -q something ||
svn update". But maybe an svn update when nothing has changed is just
as fast - any comments?

- I don't want this to slow down commits if I can help it. Is it OK to
background the hook script, i.e. to have "svn update &" in the
post-commit file?

Any suggestions much appreciated.

--Phil.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Wed Nov 9 21:07:44 2005

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.