mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-11-10 08:52:39 +01: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:
parent
5aa3bc6ec0
commit
c45053da4c
1 changed files with 6 additions and 0 deletions
|
@ -762,6 +762,12 @@ EOTEXT
|
|||
|
||||
if ($err) {
|
||||
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(
|
||||
"'{$cmd}' failed! Fix the error and push this change manually.");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue