Changeset View
Changeset View
Standalone View
Standalone View
src/land/engine/ArcanistMercurialLandEngine.php
Show First 20 Lines • Show All 828 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->newPassthru('%Ls', $command); | $err = $this->newPassthru('%Ls', $command); | ||||
if ($err) { | |||||
throw new ArcanistUsageException( | |||||
pht( | |||||
'Push failed! Fix the error and run "arc land" again.')); | |||||
} | |||||
} | } | ||||
} 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 |