Changeset View
Changeset View
Standalone View
Standalone View
src/repository/api/ArcanistMercurialAPI.php
Show First 20 Lines • Show All 1,029 Lines • ▼ Show 20 Lines | return new ArcanistRepositoryURINormalizer( | ||||
ArcanistRepositoryURINormalizer::TYPE_MERCURIAL, | ArcanistRepositoryURINormalizer::TYPE_MERCURIAL, | ||||
$uri); | $uri); | ||||
} | } | ||||
protected function newCommitGraphQueryTemplate() { | protected function newCommitGraphQueryTemplate() { | ||||
return new ArcanistMercurialCommitGraphQuery(); | return new ArcanistMercurialCommitGraphQuery(); | ||||
} | } | ||||
protected function newPublishedCommitHashes() { | |||||
$future = $this->newFuture( | |||||
'log --rev %s --template %s', | |||||
hgsprintf('parents(draft()) - draft()'), | |||||
'{node}\n'); | |||||
list($lines) = $future->resolve(); | |||||
$lines = phutil_split_lines($lines, false); | |||||
$hashes = array(); | |||||
foreach ($lines as $line) { | |||||
if (!strlen(trim($line))) { | |||||
continue; | |||||
} | |||||
$hashes[] = $line; | |||||
} | |||||
return $hashes; | |||||
} | |||||
} | } |