Changeset View
Changeset View
Standalone View
Standalone View
src/land/engine/ArcanistGitLandEngine.php
Show First 20 Lines • Show All 984 Lines • ▼ Show 20 Lines | protected function confirmOntoRefs(array $onto_refs) { | ||||
$new_markers = array(); | $new_markers = array(); | ||||
foreach ($onto_refs as $onto_ref) { | foreach ($onto_refs as $onto_ref) { | ||||
if (isset($markers[$onto_ref])) { | if (isset($markers[$onto_ref])) { | ||||
// Remote already has a branch with this name, so we're fine: we | // Remote already has a branch with this name, so we're fine: we | ||||
// aren't creatinga new branch. | // aren't creatinga new branch. | ||||
continue; | continue; | ||||
} | } | ||||
$new_markers[] = id(new ArcanistMarkerRef()) | $new_markers[] = (new ArcanistMarkerRef()) | ||||
->setMarkerType(ArcanistMarkerRef::TYPE_BRANCH) | ->setMarkerType(ArcanistMarkerRef::TYPE_BRANCH) | ||||
->setName($onto_ref); | ->setName($onto_ref); | ||||
} | } | ||||
if ($new_markers) { | if ($new_markers) { | ||||
echo tsprintf( | echo tsprintf( | ||||
"\n%!\n%W\n\n", | "\n%!\n%W\n\n", | ||||
pht('CREATE %s BRANCHE(S)', phutil_count($new_markers)), | pht('CREATE %s BRANCHE(S)', phutil_count($new_markers)), | ||||
▲ Show 20 Lines • Show All 411 Lines • ▼ Show 20 Lines | if ($this->getIntoLocal()) { | ||||
pht( | pht( | ||||
'Preparing merge into local target "%s", at commit "%s".', | 'Preparing merge into local target "%s", at commit "%s".', | ||||
$local_ref, | $local_ref, | ||||
$api->getDisplayHash($into_commit))); | $api->getDisplayHash($into_commit))); | ||||
return $into_commit; | return $into_commit; | ||||
} | } | ||||
$target = id(new ArcanistLandTarget()) | $target = (new ArcanistLandTarget()) | ||||
->setRemote($this->getIntoRemote()) | ->setRemote($this->getIntoRemote()) | ||||
->setRef($this->getIntoRef()); | ->setRef($this->getIntoRef()); | ||||
$commit = $this->fetchTarget($target); | $commit = $this->fetchTarget($target); | ||||
if ($commit !== null) { | if ($commit !== null) { | ||||
$log->writeStatus( | $log->writeStatus( | ||||
pht('INTO COMMIT'), | pht('INTO COMMIT'), | ||||
pht( | pht( | ||||
▲ Show 20 Lines • Show All 152 Lines • ▼ Show 20 Lines | foreach ($symbols as $symbol) { | ||||
if (strlen($parents)) { | if (strlen($parents)) { | ||||
$parents = explode(' ', $parents); | $parents = explode(' ', $parents); | ||||
} else { | } else { | ||||
$parents = array(); | $parents = array(); | ||||
} | } | ||||
$summary = $parts[2]; | $summary = $parts[2]; | ||||
$commit_map[$hash] = id(new ArcanistLandCommit()) | $commit_map[$hash] = (new ArcanistLandCommit()) | ||||
->setHash($hash) | ->setHash($hash) | ||||
->setParents($parents) | ->setParents($parents) | ||||
->setSummary($summary); | ->setSummary($summary); | ||||
} | } | ||||
$commit = $commit_map[$hash]; | $commit = $commit_map[$hash]; | ||||
if ($is_first) { | if ($is_first) { | ||||
$commit->addDirectSymbol($symbol); | $commit->addDirectSymbol($symbol); | ||||
▲ Show 20 Lines • Show All 207 Lines • Show Last 20 Lines |
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