Changeset View
Changeset View
Standalone View
Standalone View
src/workflow/ArcanistWorkflow.php
Show First 20 Lines • Show All 1,190 Lines • ▼ Show 20 Lines | |||||
final private function loadBundleFromConduit( | final private function loadBundleFromConduit( | ||||
ConduitClient $conduit, | ConduitClient $conduit, | ||||
$params) { | $params) { | ||||
$future = $conduit->callMethod('differential.querydiffs', $params); | $future = $conduit->callMethod('differential.querydiffs', $params); | ||||
$diff = head($future->resolve()); | $diff = head($future->resolve()); | ||||
if ($diff == null) { | |||||
throw new Exception( | |||||
phutil_console_wrap( | |||||
epriestley: For consistency of editorial voice, prefer a complete sentence with a period at the end. | |||||
pht("The diff or revision you specified is either invalid or you ". | |||||
"don't have permission to view it.")) | |||||
); | |||||
} | |||||
$changes = array(); | $changes = array(); | ||||
foreach ($diff['changes'] as $changedict) { | foreach ($diff['changes'] as $changedict) { | ||||
$changes[] = ArcanistDiffChange::newFromDictionary($changedict); | $changes[] = ArcanistDiffChange::newFromDictionary($changedict); | ||||
} | } | ||||
$bundle = ArcanistBundle::newFromChanges($changes); | $bundle = ArcanistBundle::newFromChanges($changes); | ||||
$bundle->setConduit($conduit); | $bundle->setConduit($conduit); | ||||
// since the conduit method has changes, assume that these fields | // since the conduit method has changes, assume that these fields | ||||
// could be unset | // could be unset | ||||
▲ Show 20 Lines • Show All 860 Lines • Show Last 20 Lines |
For consistency of editorial voice, prefer a complete sentence with a period at the end.