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)
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
Unknown Object (File)
Feb 15 2024, 6:24 AM
Unknown Object (File)
Feb 4 2024, 4:33 PM
Unknown Object (File)
Feb 4 2024, 4:32 PM
Unknown Object (File)
Jan 17 2024, 6:35 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.