Changeset View
Changeset View
Standalone View
Standalone View
src/land/engine/ArcanistMercurialLandEngine.php
Show First 20 Lines • Show All 110 Lines • ▼ Show 20 Lines | foreach ($marker_types as $marker_type) { | ||||
echo tsprintf('%s', $named_marker->newRefView()); | echo tsprintf('%s', $named_marker->newRefView()); | ||||
} | } | ||||
echo tsprintf("\n"); | echo tsprintf("\n"); | ||||
throw new PhutilArgumentUsageException( | throw new PhutilArgumentUsageException( | ||||
pht( | pht( | ||||
'Symbol "%s" is ambiguous.', | 'Symbol "%s" is ambiguous.', | ||||
$symbol)); | $raw_symbol)); | ||||
} | } | ||||
$marker = head($named_markers); | $marker = head($named_markers); | ||||
$symbol->setCommit($marker->getCommitHash()); | $symbol->setCommit($marker->getCommitHash()); | ||||
unset($unresolved[$key]); | unset($unresolved[$key]); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 360 Lines • ▼ Show 20 Lines | if (count($ontos) > 1) { | ||||
pht( | pht( | ||||
'Will merge into target "%s" by default, because this is the "onto" '. | 'Will merge into target "%s" by default, because this is the "onto" '. | ||||
'target.', | 'target.', | ||||
$onto)); | $onto)); | ||||
} | } | ||||
} | } | ||||
protected function selectIntoCommit() { | protected function selectIntoCommit() { | ||||
$api = $this->getRepositoryAPI(); | |||||
$log = $this->getLogEngine(); | $log = $this->getLogEngine(); | ||||
if ($this->getIntoEmpty()) { | if ($this->getIntoEmpty()) { | ||||
// If we're running under "--into-empty", we don't have to do anything. | // If we're running under "--into-empty", we don't have to do anything. | ||||
$log->writeStatus( | $log->writeStatus( | ||||
pht('INTO COMMIT'), | pht('INTO COMMIT'), | ||||
pht('Preparing merge into the empty state.')); | pht('Preparing merge into the empty state.')); | ||||
return null; | return null; | ||||
} | } | ||||
if ($this->getIntoLocal()) { | if ($this->getIntoLocal()) { | ||||
// If we're running under "--into-local", just make sure that the | // If we're running under "--into-local", just make sure that the | ||||
// target identifies some actual commit. | // target identifies some actual commit. | ||||
$api = $this->getRepositoryAPI(); | |||||
$local_ref = $this->getIntoRef(); | $local_ref = $this->getIntoRef(); | ||||
// TODO: This error handling could probably be cleaner, it will just | // TODO: This error handling could probably be cleaner, it will just | ||||
// raise an exception without any context. | // raise an exception without any context. | ||||
$into_commit = $api->getCanonicalRevisionName($local_ref); | $into_commit = $api->getCanonicalRevisionName($local_ref); | ||||
$log->writeStatus( | $log->writeStatus( | ||||
▲ Show 20 Lines • Show All 309 Lines • ▼ Show 20 Lines | protected function pushChange($into_commit) { | ||||
list($head, $body, $tail) = $this->newPushCommands($into_commit); | list($head, $body, $tail) = $this->newPushCommands($into_commit); | ||||
foreach ($head as $command) { | foreach ($head as $command) { | ||||
$api->execxLocal('%Ls', $command); | $api->execxLocal('%Ls', $command); | ||||
} | } | ||||
try { | try { | ||||
foreach ($body as $command) { | foreach ($body as $command) { | ||||
$this->newPasthru('%Ls', $command); | $this->newPassthru('%Ls', $command); | ||||
} | } | ||||
} finally { | } finally { | ||||
foreach ($tail as $command) { | foreach ($tail as $command) { | ||||
$api->execxLocal('%Ls', $command); | $api->execxLocal('%Ls', $command); | ||||
} | } | ||||
} | } | ||||
} | } | ||||
▲ Show 20 Lines • Show All 248 Lines • Show Last 20 Lines |