Changeset View
Changeset View
Standalone View
Standalone View
src/applications/repository/storage/PhabricatorRepository.php
Show All 37 Lines | final class PhabricatorRepository extends PhabricatorRepositoryDAO | ||||
protected $pushPolicy; | protected $pushPolicy; | ||||
protected $versionControlSystem; | protected $versionControlSystem; | ||||
protected $details = array(); | protected $details = array(); | ||||
protected $credentialPHID; | protected $credentialPHID; | ||||
private $commitCount = self::ATTACHABLE; | private $commitCount = self::ATTACHABLE; | ||||
private $mostRecentCommit = self::ATTACHABLE; | private $mostRecentCommit = self::ATTACHABLE; | ||||
private $projectPHIDs = self::ATTACHABLE; | |||||
public static function initializeNewRepository(PhabricatorUser $actor) { | public static function initializeNewRepository(PhabricatorUser $actor) { | ||||
$app = id(new PhabricatorApplicationQuery()) | $app = id(new PhabricatorApplicationQuery()) | ||||
->setViewer($actor) | ->setViewer($actor) | ||||
->withClasses(array('PhabricatorApplicationDiffusion')) | ->withClasses(array('PhabricatorApplicationDiffusion')) | ||||
->executeOne(); | ->executeOne(); | ||||
$view_policy = $app->getPolicy(DiffusionCapabilityDefaultView::CAPABILITY); | $view_policy = $app->getPolicy(DiffusionCapabilityDefaultView::CAPABILITY); | ||||
▲ Show 20 Lines • Show All 134 Lines • ▼ Show 20 Lines | public function getSubversionPathURI($path = null, $commit = null) { | ||||
if ($commit !== null) { | if ($commit !== null) { | ||||
$uri .= $commit; | $uri .= $commit; | ||||
} | } | ||||
return $uri; | return $uri; | ||||
} | } | ||||
public function attachProjectPHIDs(array $project_phids) { | |||||
$this->projectPHIDs = $project_phids; | |||||
return $this; | |||||
} | |||||
public function getProjectPHIDs() { | |||||
return $this->assertAttached($this->projectPHIDs); | |||||
} | |||||
/* -( Remote Command Execution )------------------------------------------- */ | /* -( Remote Command Execution )------------------------------------------- */ | ||||
public function execRemoteCommand($pattern /* , $arg, ... */) { | public function execRemoteCommand($pattern /* , $arg, ... */) { | ||||
$args = func_get_args(); | $args = func_get_args(); | ||||
return $this->newRemoteCommandFuture($args)->resolve(); | return $this->newRemoteCommandFuture($args)->resolve(); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 877 Lines • Show Last 20 Lines |