public function initPerforce($package, $path) { if ($this->perforce) { $this->perforce->initializePath($path); return; } $repository = $package->getRepository(); $repoConfig = null; if ($repository instanceof VcsRepository) { $repoConfig = $this->getRepoConfig($repository); } $this->perforce = Perforce::create($repoConfig, $package->getSourceUrl(), $path); }
public function initPerforce($package, $path, $url) { if (!empty($this->perforce)) { $this->perforce->initializePath($path); return; } $repository = $package->getRepository(); $repoConfig = null; if ($repository instanceof VcsRepository) { $repoConfig = $this->getRepoConfig($repository); } $this->perforce = Perforce::create($repoConfig, $url, $path, $this->process, $this->io); }
public static function supports(IOInterface $io, Config $config, $url, $deep = false) { if ($deep || preg_match('#\\b(perforce|p4)\\b#i', $url)) { return Perforce::checkServerExists($url, new ProcessExecutor($io)); } return false; }
/** * {@inheritDoc} */ protected function getCommitLogs($fromReference, $toReference, $path) { $commitLogs = $this->perforce->getCommitLogs($fromReference, $toReference); return $commitLogs; }
/** * {@inheritDoc} */ public function cleanup() { $this->perforce->cleanupClientSpec(); $this->perforce = null; }
/** * @param array $repoConfig */ public function initialize($repoConfig) { parent::initialize($repoConfig); $this->filename = (string) $repoConfig['filename']; }