Jump to content

Writng Subversion hook scrips in PHP


emehrkay

Recommended Posts

Alright, I have some simple length checking down for my pre-commit using svnlook log to get the commit comment. Pretty easy stuff so far

 

<?php

/*
	test to see if comment length is greater than or equal to 10 chars
*/
$log = exec("svnlook log -t ". $argv[2] ." ". $argv[1]);
if(strlen($log) > 9){
	exit(0);
}else{
	exit(1);
}
?>

Im such a noob and scared to go outside of php. lol not really, but php is easiest at the moment for me to churn out results. and my place of employment is not trying ot hear "we'll it took me about an hour to learn python..." 

 

workin for the man sucks

 

anyway, I have that script running, checkin the strlen. I just need to set the STDERR so that I can tell the user that the comment that they've entered was too damn short. Anyone know how to do this?

 

Thanks guys

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.