Page MenuHomePhabricator

Explicitly check for supported VCS
ClosedPublic

Authored by joshuaspence on Jan 29 2015, 11:17 AM.
Tags
None
Referenced Files
F13159156: D11550.diff
Sun, May 5, 11:58 PM
Unknown Object (File)
Fri, May 3, 3:39 AM
Unknown Object (File)
Mon, Apr 29, 3:42 PM
Unknown Object (File)
Wed, Apr 24, 11:41 PM
Unknown Object (File)
Sun, Apr 21, 12:14 PM
Unknown Object (File)
Thu, Apr 11, 10:12 AM
Unknown Object (File)
Mar 18 2024, 8:29 AM
Unknown Object (File)
Feb 22 2024, 2:59 AM
Subscribers

Details

Summary

Instead of having an ArcanistWorkflow subclass explicitly throw an exception when run in an unsupported VCS, consolidate this code and move it to arcanist.php. In doing so, we lose some specificity in some of the error messages, but this otherwise feels cleaner. We could consider adding a getUnsupportedRevisionControlSystemMessage() method to provide a more tailored error message. Depends on D11604.

Test Plan

Ran arc bookmark in a git working copy:

Usage Exception: `arc bookmark` is only supported under hg.

Diff Detail

Repository
rARC Arcanist
Branch
master
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 4217
Build 4230: [Placeholder Plan] Wait for 30 Seconds

Event Timeline

joshuaspence retitled this revision from to Explicitly checking for supported VCS.
joshuaspence updated this object.
joshuaspence edited the test plan for this revision. (Show Details)
joshuaspence added a reviewer: epriestley.
joshuaspence retitled this revision from Explicitly checking for supported VCS to Explicitly check for supported VCS.
epriestley edited edge metadata.

It's very slightly unfortunate to lose the "land" -> "commit" hint, but I can add a getSuggestedAlternateCommandForRevisionControlSystem() or something later if users seem confused.

This revision is now accepted and ready to land.Feb 2 2015, 2:04 PM
This revision was automatically updated to reflect the committed changes.