1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-09-20 17:09:01 +02:00

Reset master after unsuccessful push

Test Plan: None.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D4717
This commit is contained in:
vrana 2013-01-28 17:05:09 -08:00
parent 5aa3bc6ec0
commit c45053da4c

View file

@ -762,6 +762,12 @@ EOTEXT
if ($err) { if ($err) {
echo phutil_console_format("<bg:red>** PUSH FAILED! **</bg>\n"); echo phutil_console_format("<bg:red>** PUSH FAILED! **</bg>\n");
if ($this->isGit) {
$repository_api->execxLocal('reset --hard HEAD^');
$this->restoreBranch();
throw new ArcanistUsageException(
"'{$cmd}' failed! Fix the error and run 'arc land' again.");
}
throw new ArcanistUsageException( throw new ArcanistUsageException(
"'{$cmd}' failed! Fix the error and push this change manually."); "'{$cmd}' failed! Fix the error and push this change manually.");
} }