Page MenuHomePhabricator

Explicitly check for supported VCS
ClosedPublic

Authored by joshuaspence on Jan 29 2015, 11:17 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Nov 19, 11:51 PM
Unknown Object (File)
Thu, Nov 7, 12:30 AM
Unknown Object (File)
Mon, Oct 28, 1:59 PM
Unknown Object (File)
Fri, Oct 25, 6:38 AM
Unknown Object (File)
Oct 21 2024, 9:20 PM
Unknown Object (File)
Oct 11 2024, 4:45 PM
Unknown Object (File)
Oct 8 2024, 11:09 AM
Unknown Object (File)
Oct 4 2024, 11:16 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
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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.