/** * Initializes fresh checkout * * Initialize repository from the given URL. Optionally username and * password may be passed to the method, if required for the repository. * * @param string $url * @param string $user * @param string $password * @return void */ public function initialize($url, $user = null, $password = null) { $count = substr_count($url, '#'); if ($count === 1) { $revision = null; list($repoUrl, $module) = explode('#', $url); } else { if ($count === 2) { list($repoUrl, $module, $revision) = explode('#', $url); } else { throw new vcsInvalidRepositoryUrlException($url, 'cvs'); } } $process = new vcsCvsCliProcess(); $process->argument('-d')->argument($repoUrl)->argument('checkout')->argument('-P')->argument('-r')->argument($revision)->argument('-d')->argument($this->root)->argument($module)->execute(); }