1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-11-21 22:32:41 +01:00

When "arc land" fails a Mercurial push, actually raise it as an exception

Summary: See PHI1808. Some refactoring of the "passthru" API resulted in error conditinos here being dropped. Instead, raise them as exceptions.

Test Plan: Forced "hg push" to fail, used "arc land" against a failed push, saw error behavior instead of "success" feedback.

Differential Revision: https://secure.phabricator.com/D21394
This commit is contained in:
epriestley 2020-07-08 13:31:55 -07:00
parent 41774ba9cc
commit 710bceab10

View file

@ -834,7 +834,12 @@ final class ArcanistMercurialLandEngine
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) {