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

Re: PHP, Subversion and Hook Scripts

From: Ben Collins-Sussman <sussman_at_collab.net>
Date: 2005-03-19 13:06:13 CET

On Mar 19, 2005, at 5:49 AM, swdev wrote:

> Hi all
> My system
> Windows XP Pro + SP2
> Apache 2.0.52
> PHP 4.3.10
> Subversion 1.1.3 (r12730)
> TortoiseSVN 1.1.3 (2502)
> Thanks for creating a great version control system and for making
> it FREE!!
> I have seen the example hook scripts and they use PERL and PYTHON.
> 1) Can I use PHP as I don't have either PERL or PYTHON installed on my
> system and I don't know either language?

It doesn't matter... you can write a hook script in COBOL if you want.
Subversion simply tries to execute a particular filename, and then
looks at the program's return value.

> 2) Are there any further examples of the kind of things these hook
> scripts
> can do?

Have you read the template hook-scripts? The ones you get when you
create a repository? They answer this question. So does chapter 5 in
the book.

> 3) Is there a website with a collection of scripts?

The most common ones (authorization-checking ones for pre-commit, and
mail-sending ones for post-commit) are kept in svn's own tree, in
/trunk/contrib/hook-scripts/ and /trunk/tools/hook-scripts/

> 4) Has anyone looked at creating a PHP extension module (library) that
> can interface directly to the Subverion libraries?

We use SWIG to generate Perl and Python bindings to the svn C
libraries... in theory it can generate bindings for PHP also. Nobody's
bothered to make that happen yet, so we're always looking for

To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Sat Mar 19 13:08:37 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.