You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by "J. Bakshi" <jo...@infoservices.in> on 2009/10/12 07:17:42 UTC
syntax checking before commit; possible ?
Dear list,
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 ?
Please enlighten me.
Thanks
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2406530
To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].
Re: syntax checking before commit; possible ?
Posted by Ryan Schmidt <su...@ryandesign.com>.
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:
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2392142
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2406544
To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].