Changeset View
Changeset View
Standalone View
Standalone View
src/repository/api/ArcanistRepositoryAPI.php
Show First 20 Lines • Show All 704 Lines • ▼ Show 20 Lines | /* -( Base Commits )------------------------------------------------------- */ | ||||
protected function newCurrentWorkingCopyStateRef() { | protected function newCurrentWorkingCopyStateRef() { | ||||
$commit_ref = $this->getCurrentCommitRef(); | $commit_ref = $this->getCurrentCommitRef(); | ||||
if (!$commit_ref) { | if (!$commit_ref) { | ||||
return null; | return null; | ||||
} | } | ||||
return id(new ArcanistWorkingCopyStateRef()) | return (new ArcanistWorkingCopyStateRef()) | ||||
->setCommitRef($commit_ref); | ->setCommitRef($commit_ref); | ||||
} | } | ||||
final public function getCurrentCommitRef() { | final public function getCurrentCommitRef() { | ||||
if ($this->currentCommitRef === false) { | if ($this->currentCommitRef === false) { | ||||
$this->currentCommitRef = $this->newCurrentCommitRef(); | $this->currentCommitRef = $this->newCurrentCommitRef(); | ||||
} | } | ||||
return $this->currentCommitRef; | return $this->currentCommitRef; | ||||
▲ Show 20 Lines • Show All 51 Lines • ▼ Show 20 Lines | final public function getSupportedMarkerTypes() { | ||||
return $this->newSupportedMarkerTypes(); | return $this->newSupportedMarkerTypes(); | ||||
} | } | ||||
protected function newSupportedMarkerTypes() { | protected function newSupportedMarkerTypes() { | ||||
return array(); | return array(); | ||||
} | } | ||||
final public function newMarkerRefQuery() { | final public function newMarkerRefQuery() { | ||||
return id($this->newMarkerRefQueryTemplate()) | return $this->newMarkerRefQueryTemplate() | ||||
->setRepositoryAPI($this); | ->setRepositoryAPI($this); | ||||
} | } | ||||
protected function newMarkerRefQueryTemplate() { | protected function newMarkerRefQueryTemplate() { | ||||
throw new PhutilMethodNotImplementedException(); | throw new PhutilMethodNotImplementedException(); | ||||
} | } | ||||
final public function newRemoteRefQuery() { | final public function newRemoteRefQuery() { | ||||
return id($this->newRemoteRefQueryTemplate()) | return $this->newRemoteRefQueryTemplate() | ||||
->setRepositoryAPI($this); | ->setRepositoryAPI($this); | ||||
} | } | ||||
protected function newRemoteRefQueryTemplate() { | protected function newRemoteRefQueryTemplate() { | ||||
throw new PhutilMethodNotImplementedException(); | throw new PhutilMethodNotImplementedException(); | ||||
} | } | ||||
final public function newCommitGraphQuery() { | final public function newCommitGraphQuery() { | ||||
return id($this->newCommitGraphQueryTemplate()); | return $this->newCommitGraphQueryTemplate(); | ||||
} | } | ||||
protected function newCommitGraphQueryTemplate() { | protected function newCommitGraphQueryTemplate() { | ||||
throw new PhutilMethodNotImplementedException(); | throw new PhutilMethodNotImplementedException(); | ||||
} | } | ||||
final public function getDisplayHash($hash) { | final public function getDisplayHash($hash) { | ||||
return substr($hash, 0, 12); | return substr($hash, 0, 12); | ||||
Show All 14 Lines | /* -( Base Commits )------------------------------------------------------- */ | ||||
} | } | ||||
protected function newPublishedCommitHashes() { | protected function newPublishedCommitHashes() { | ||||
return array(); | return array(); | ||||
} | } | ||||
final public function getGraph() { | final public function getGraph() { | ||||
if (!$this->graph) { | if (!$this->graph) { | ||||
$this->graph = id(new ArcanistCommitGraph()) | $this->graph = (new ArcanistCommitGraph()) | ||||
->setRepositoryAPI($this); | ->setRepositoryAPI($this); | ||||
} | } | ||||
return $this->graph; | return $this->graph; | ||||
} | } | ||||
} | } |
Content licensed under Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) unless otherwise noted; code licensed under Apache 2.0 or other open source licenses. · CC BY-SA 4.0 · Apache 2.0