Changeset View
Changeset View
Standalone View
Standalone View
src/workflow/ArcanistMarkersWorkflow.php
Show First 20 Lines • Show All 54 Lines • ▼ Show 20 Lines | public function runWorkflow() { | ||||
$disjoint_heads = array(); | $disjoint_heads = array(); | ||||
foreach ($heads as $head) { | foreach ($heads as $head) { | ||||
if (!isset($nodes[$head])) { | if (!isset($nodes[$head])) { | ||||
$disjoint_heads[] = $head; | $disjoint_heads[] = $head; | ||||
} | } | ||||
} | } | ||||
if ($disjoint_heads) { | if ($disjoint_heads) { | ||||
// TODO: Git currently can not query for more than one exact hash at a | |||||
// time. | |||||
foreach ($disjoint_heads as $disjoint_head) { | |||||
$disjoint_nodes = $graph->newQuery() | $disjoint_nodes = $graph->newQuery() | ||||
->withExactHashes(array($disjoint_head)) | ->withExactHashes($disjoint_heads) | ||||
->execute(); | ->execute(); | ||||
$nodes += $disjoint_nodes; | $nodes += $disjoint_nodes; | ||||
} | } | ||||
} | |||||
$state_refs = array(); | $state_refs = array(); | ||||
foreach ($nodes as $node) { | foreach ($nodes as $node) { | ||||
$commit_ref = $node->getCommitRef(); | $commit_ref = $node->getCommitRef(); | ||||
$state_ref = id(new ArcanistWorkingCopyStateRef()) | $state_ref = id(new ArcanistWorkingCopyStateRef()) | ||||
->setCommitRef($commit_ref); | ->setCommitRef($commit_ref); | ||||
▲ Show 20 Lines • Show All 221 Lines • Show Last 20 Lines |