Page MenuHomePhabricator

Improve two error handling behaviors in `arc upgrade`
ClosedPublic

Authored by epriestley on Oct 22 2015, 7:27 PM.
Tags
None
Referenced Files
F18229867: D14317.id.diff
Wed, Aug 20, 11:40 AM
F18215569: D14317.diff
Tue, Aug 19, 6:56 AM
F17886397: D14317.id34565.diff
Jul 29 2025, 12:58 AM
F17886322: D14317.id34566.diff
Jul 29 2025, 12:54 AM
F17885976: D14317.id.diff
Jul 29 2025, 12:42 AM
F17883877: D14317.id34563.diff
Jul 28 2025, 11:36 PM
F17866304: D14317.id34564.diff
Jul 28 2025, 4:24 AM
F17854668: D14317.diff
Jul 27 2025, 3:24 PM
Subscribers
None

Details

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.

Diff Detail

Repository
rARC Arcanist
Branch
up1
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 8374
Build 9611: Run Core Tests
Build 9610: arc lint + arc unit

Event Timeline

epriestley retitled this revision from to Improve two error handling behaviors in `arc upgrade`.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: chad.
chad edited edge metadata.
This revision is now accepted and ready to land.Oct 22 2015, 7:45 PM
src/workflow/ArcanistWorkflow.php
1070–1077

(Oh, I didn't actually need this. I'll toss it.)

epriestley edited edge metadata.
  • Slightly smaller changeset.
  • I'm about to press the "Land" button. Spooky!
  • Clean diff that might be more landable.
This revision was automatically updated to reflect the committed changes.

Okay, that eventually worked. Close enough!