Fixed crash of the Subversion backend when requesting a non existing revision.

master
Loic d'Anterroches 2009-07-09 00:05:36 +02:00
parent c321e4828b
commit 1a067ca107
1 changed files with 3 additions and 0 deletions

View File

@ -350,6 +350,9 @@ class IDF_Scm_Svn extends IDF_Scm
*/ */
public function getCommit($commit, $getdiff=false) public function getCommit($commit, $getdiff=false)
{ {
if (!$this->isValidRevision($commit)) {
return false;
}
$res = array(); $res = array();
$cmd = sprintf(Pluf::f('svn_path', 'svn').' log --xml --limit 1 -v --username=%s --password=%s %s@%s', $cmd = sprintf(Pluf::f('svn_path', 'svn').' log --xml --limit 1 -v --username=%s --password=%s %s@%s',
escapeshellarg($this->username), escapeshellarg($this->username),