Changeset View
Changeset View
Standalone View
Standalone View
src/repository/api/ArcanistGitAPI.php
| Show First 20 Lines • Show All 1,767 Lines • ▼ Show 20 Lines | |||||
| } | } | ||||
| protected function newNormalizedURI($uri) { | protected function newNormalizedURI($uri) { | ||||
| return new ArcanistRepositoryURINormalizer( | return new ArcanistRepositoryURINormalizer( | ||||
| ArcanistRepositoryURINormalizer::TYPE_GIT, | ArcanistRepositoryURINormalizer::TYPE_GIT, | ||||
| $uri); | $uri); | ||||
| } | } | ||||
| protected function newPublishedCommitHashes() { | |||||
| $remotes = $this->newRemoteRefQuery() | |||||
| ->execute(); | |||||
| if (!$remotes) { | |||||
| return array(); | |||||
| } | |||||
| $markers = $this->newMarkerRefQuery() | |||||
| ->withIsRemoteCache(true) | |||||
| ->execute(); | |||||
| if (!$markers) { | |||||
| return array(); | |||||
| } | |||||
| $runtime = $this->getRuntime(); | |||||
| $workflow = $runtime->getCurrentWorkflow(); | |||||
| $workflow->loadHardpoints( | |||||
| $remotes, | |||||
| ArcanistRemoteRef::HARDPOINT_REPOSITORYREFS); | |||||
| $remotes = mpull($remotes, null, 'getRemoteName'); | |||||
| $hashes = array(); | |||||
| foreach ($markers as $marker) { | |||||
| $remote_name = $marker->getRemoteName(); | |||||
| $remote = idx($remotes, $remote_name); | |||||
| if (!$remote) { | |||||
| continue; | |||||
| } | |||||
| if (!$remote->isPermanentRef($marker)) { | |||||
| continue; | |||||
| } | |||||
| $hashes[] = $marker->getCommitHash(); | |||||
| } | |||||
| return $hashes; | |||||
| } | |||||
| } | } | ||||