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

Re: syntax checking before commit; possible ?

From: Ryan Schmidt <subversion-2009b_at_ryandesign.com>
Date: Mon, 12 Oct 2009 02:44:53 -0500

On Oct 12, 2009, at 02:17, J. Bakshi wrote:

> My post-commit hook is running well and automatically update the
> concerned htdocs directory so that the change can be reflected in
> apache whenever a commit is applied. Sometimes there are some syntax
> error in the php file and as a result the successful commit cause
> error
> in apache level. Obviously it is not a svn related issue; but it would
> be great if a mechanism is there to check the syntax before committing
> and deny the commit if there is any such syntax error. I don't know
> the
> actual process but is there anything which can be done through a hook
> maybe pre-commit hook ?

Absolutely, you could write a pre-commit hook to do that. Examples
have been posted to this list before.

There's even a script in the official Subversion repository that
syntax-checks php files, so you could probably use that without
modification. See this prior discussion thread:



To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-10-12 09:46:13 CEST

This is an archived mail posted to the Subversion Users mailing list.