Added support of subversion.

This commit is contained in:
Nicolas LASSALLE
2008-08-29 19:50:10 +02:00
committed by Loic d'Anterroches
parent 763d7ca7f6
commit ccc41c86b0
14 changed files with 713 additions and 35 deletions

View File

@@ -335,6 +335,34 @@ class IDF_Project extends Pluf_Model
return $gitrep.'/'.$this->shortname.'.git';
}
/**
* Get the path to the git repository.
*
* @return string Path to the git repository
*/
public function getSvnDaemonUrl()
{
$conf = new IDF_Conf();
$conf->setProject($this);
return $conf->getVal('svn_daemon_url');
}
/**
* Get the root name of the project scm
*
* @return string SCM root
*/
public function getScmRoot()
{
$roots = array('git' => 'master', 'svn' => 'HEAD');
$conf = new IDF_Conf();
$conf->setProject($this);
$scm = $conf->getVal('scm', 'git');
return $roots[$scm];
}
/**
* Check that the object belongs to the project or rise a 404
* error.