Changeset View
Changeset View
Standalone View
Standalone View
src/repository/api/ArcanistRepositoryAPI.php
Show All 36 Lines | abstract class ArcanistRepositoryAPI extends Phobject { | ||||
private $commitRangeStatusCache; | private $commitRangeStatusCache; | ||||
private $symbolicBaseCommit; | private $symbolicBaseCommit; | ||||
private $resolvedBaseCommit; | private $resolvedBaseCommit; | ||||
private $runtime; | private $runtime; | ||||
private $currentWorkingCopyStateRef = false; | private $currentWorkingCopyStateRef = false; | ||||
private $currentCommitRef = false; | private $currentCommitRef = false; | ||||
private $graph; | |||||
abstract public function getSourceControlSystemName(); | abstract public function getSourceControlSystemName(); | ||||
public function getDiffLinesOfContext() { | public function getDiffLinesOfContext() { | ||||
return $this->diffLinesOfContext; | return $this->diffLinesOfContext; | ||||
} | } | ||||
public function setDiffLinesOfContext($lines) { | public function setDiffLinesOfContext($lines) { | ||||
▲ Show 20 Lines • Show All 736 Lines • ▼ Show 20 Lines | final public function newRemoteRefQuery() { | ||||
return id($this->newRemoteRefQueryTemplate()) | return id($this->newRemoteRefQueryTemplate()) | ||||
->setRepositoryAPI($this); | ->setRepositoryAPI($this); | ||||
} | } | ||||
protected function newRemoteRefQueryTemplate() { | protected function newRemoteRefQueryTemplate() { | ||||
throw new PhutilMethodNotImplementedException(); | throw new PhutilMethodNotImplementedException(); | ||||
} | } | ||||
final public function newCommitGraphQuery() { | |||||
return id($this->newCommitGraphQueryTemplate()); | |||||
} | |||||
protected function newCommitGraphQueryTemplate() { | |||||
throw new PhutilMethodNotImplementedException(); | |||||
} | |||||
final public function getDisplayHash($hash) { | final public function getDisplayHash($hash) { | ||||
return substr($hash, 0, 12); | return substr($hash, 0, 12); | ||||
} | } | ||||
final public function getNormalizedURI($uri) { | final public function getNormalizedURI($uri) { | ||||
$normalized_uri = $this->newNormalizedURI($uri); | $normalized_uri = $this->newNormalizedURI($uri); | ||||
return $normalized_uri->getNormalizedURI(); | return $normalized_uri->getNormalizedURI(); | ||||
} | } | ||||
protected function newNormalizedURI($uri) { | protected function newNormalizedURI($uri) { | ||||
return $uri; | return $uri; | ||||
} | } | ||||
final public function getPublishedCommitHashes() { | final public function getPublishedCommitHashes() { | ||||
return $this->newPublishedCommitHashes(); | return $this->newPublishedCommitHashes(); | ||||
} | } | ||||
protected function newPublishedCommitHashes() { | protected function newPublishedCommitHashes() { | ||||
return array(); | return array(); | ||||
} | } | ||||
final public function getGraph() { | |||||
if (!$this->graph) { | |||||
$this->graph = id(new ArcanistCommitGraph()) | |||||
->setRepositoryAPI($this); | |||||
} | |||||
return $this->graph; | |||||
} | |||||
} | } |