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

Re: svn update in post-commit hook

From: Ryan Schmidt <subversion-2005_at_ryandesign.com>
Date: 2005-11-09 02:33:47 CET

On Nov 8, 2005, at 23:19, Rob Brandt wrote:

> Cool: set .html files to mime-type: text/html and my simple html
> site is
> viewable! :)
> Uncool: Doesn't work for php. :( I even tried mime-type:
> application/x-httpd-php, but that makes the browser want to
> download the file.

Yes, it cannot work for PHP or any other scripts.

We tried to make it work by mounting the repository on the server as
a WebDAV file system, then pointing an Apache DocumentRoot at it.
Let's just say it was a very bad idea and was very slow. Let me save
you some trouble and recommend you don't even think about that.

> I searched this mailing list for solutions, and while many others
> have looked
> for an answer none have found one.
>
> I did find a reference to this though, and it looks like I can use
> it to kill
> two birds with one stone:
>
> http://nshb.net/node/73

It's a PHP script that sends commit mails and updates a working copy.
That sounds reasonable. I wrote a script to do that for our company,
since it seemed to me to be less trouble than evaluating and choosing
one of the existing scripts. :-) I soon had to disable the commit
mail part though as it was taking too much time (I had been clever
with colored diffs....). Even the working copy updates take some
time. This is a problem because the Subversion client will not return
control to the user after a commit until after the post-commit hook
has finished running. When I have 5 minutes to rewrite it, I'll have
the post-commit just fork off another process to do the updates and
mails, or possibly just touch a temporary file with the revision
number and have a periodic cronjob do the real work, so the
programmers don't have to wait for it and can get back to work more
quickly.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Wed Nov 9 02:36:02 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.