]> khamidou — GitHub mirrors - arcanist.git/commit
Improve two error handling behaviors in `arc upgrade`
authorepriestley <git@epriestley.com>
Thu, 22 Oct 2015 19:55:16 +0000 (19:55 +0000)
committerepriestley <autocommitter@example.com>
Thu, 22 Oct 2015 19:55:16 +0000 (19:55 +0000)
commitdfde57ff812b1cd552c0fd2ca519c7e15171b3a4
tree6c464958623579810e466014a909190aa5593333
parentb3ea439f4d86353466e7007289fb36c38ee0df09
Improve two error handling behaviors in `arc upgrade`

Summary:
Fixes T9222. Two issues here:

  - First, we currently continue on error. Throw instead. I just swapped us from "phutil_passthru()" to "execx()" since I don't think printing out the "pulling from remote..." status messages is very important, and this makes it easier to raise a useful exception.
  - Second, if you have a dirty working copy we currently may try to do some sort of silly stuff which won't work, like prompt you to amend changes. Instead, do a slightly lower-level check and just bail.

Test Plan:
  - Ran `arc upgrade` with a dirty working copy and got a tailored, useful error.
  - Ran `arc upgrade` with an artificially bad `git pull` command, got a failure with a specific error message.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9222

Differential Revision: https://secure.phabricator.com/D14317
src/workflow/ArcanistUpgradeWorkflow.php