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);
 }
Beispiel #2
0
 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);
 }
Beispiel #3
0
 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;
 }
Beispiel #4
0
 /**
  * {@inheritDoc}
  */
 protected function getCommitLogs($fromReference, $toReference, $path)
 {
     $commitLogs = $this->perforce->getCommitLogs($fromReference, $toReference);
     return $commitLogs;
 }
Beispiel #5
0
 /**
  * {@inheritDoc}
  */
 public function cleanup()
 {
     $this->perforce->cleanupClientSpec();
     $this->perforce = null;
 }
Beispiel #6
0
 /**
  * @param array $repoConfig
  */
 public function initialize($repoConfig)
 {
     parent::initialize($repoConfig);
     $this->filename = (string) $repoConfig['filename'];
 }