public static function getScm($request=null)␊ |
{␊ |
// Get scm type from project conf ; defaults to git␊ |
$scm = $request->conf->getVal('scm', 'git');␊ |
␊ |
// CASE: git␊ |
if ($scm === 'git') {␊ |
return new IDF_Git($request->project->getGitRepository());␊ |
}␊ |
␊ |
// CASE: svn␊ |
if ($scm === 'svn') {␊ |
switch ($request->conf->getVal('scm', 'git')) {␊ |
case 'svn':␊ |
return new IDF_Svn($request->conf->getVal('svn_repository'),␊ |
$request->conf->getVal('svn_username'),␊ |
$request->conf->getVal('svn_password'));␊ |
}␊ |
case 'git':␊ |
default:␊ |
return new IDF_Git($request->project->getGitRepository());␊ |
}␊ |
}␊ |
␊ |