i'm trying to integrate svn in a php script to automate a website startup and versioning.
I've made some check during the steps of the creation using the exec php command together with the svn and svnadmin command.
so, when i make and hotcopy (of an unexsistant repository) it returns value 1 (and its correct) but svnadmin create (with a path completely absurd) always returns 0 (like if the content was created, but that is not true!)
public function routine($istr, $search, $replace) {
$output = array();
$returnvar = 0;
$istr = str_replace($search,$replace,$istr);
exec($istr." 2>&1", $output,$returnvar);
$this->addMessage($istr);
if($returnvar != 0) {
$this->addMessage("!!! GOT ERRORS !!!");
$this->addMessage(implode("\n", $output));
}
}
This route actually works, but the returnvar is always 0 (if the svnadmin command is different from hotcopy).
The meaning of the function is that i would like to show the complete output only if there is an error. not show anything otherwise (or maybe a confirmation message)
hope soeone can help ty in advance
"