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

Re: flag to disable hook scripts

From: Mark Phippard <markp_at_softlanding.com>
Date: 2006-02-03 19:50:35 CET

"Renaud Waldura" <renaud+subversion@waldura.com> wrote on 02/03/2006
01:33:11 PM:

> > We currently update a working copy in our post-commit hook, and this
is
> > quite a bad idea. :-)
>
> Ryan, could you elaborate a bit? I'm about to do the same thing. What
else
> should be done instead?
>
> A word about our setup: Java developers compile/run/test locally, then
> commit to the repository (classic programming model). But our HTML
> developers (who outnumber Java developers 3 times over) don't run an app

> server locally. They check files out, edit them, and commit them to the
> staging server to see their changes, where an appserver runs.
>
> I was therefore writing a post-commit hook to update a WC that is read
by
> the appserver, so that HTML developers see their changes right away, as
> expected. They work with one finger on the F5 (refresh) key.
>
> Comments? Anyone else in this situation? Thanks.

I think what Ryan is alluding to is that control does not return to the
user doing the commit until the hook completes. So he thinks the hook is
a bad idea because it ties up every user doing a commit. It also ties up
the server from being able to finalize another commit.

Another solution would be to figure out a way to get your hook to fire off
the update as an asynchronous event. We do something in a hook where we
create a file with the repository and revision info in it. A daemon
process written in Java monitors the folder where this file is created and
does stuff based on the file being created. This allows the hook to run
very fast and the work is done in the daemon process.

Mark

_____________________________________________________________________________
Scanned for SoftLanding Systems, Inc. and SoftLanding Europe Plc by IBM Email Security Management Services powered by MessageLabs.
_____________________________________________________________________________

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Fri Feb 3 19:58:23 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.