[TYPO3-dev] SVN pre-commit hooks to avoid commiting php files with syntax errors

Bastian Waidelich bastian at typo3.org
Mon Sep 21 12:53:14 CEST 2009


Sebastian Kurfürst wrote:

Hey,

>> But I think, it should be configurable in the project settings of forge,
>> so you could enable/disable hooks for certain projects.

> In general this would be possible, though this would complicate the 
> pre/post commit hooks quite a bit as you need to figure out the project 
> name from the SVN path.

But the SVN root is stored in the projects repository settings, right?
So theoretically it could be a PHP/Ruby script that is executed for all 
commits, would read the configuration for the respective project and 
forward the control to configured hooks, if any are active!?


> In general yes, but I currently won't have the time to implement such 
> more complex stuff.

Fair enough! Unfortunately I don't know Redmine/Ruby too well.. But I 
think, it would be a neat feature ;)

Anyways, for now we could hard-code the paths to be checked. I just 
wouldn't activate it by default!
That's how we've done it for the FLOW3 pre-commit hook 
(http://scratchpad.cmlenz.net/58bff31f51f731e5dc924b2aa39d8e90/ => 
$includePaths)

Bastian




More information about the TYPO3-dev mailing list