Page MenuHomePhabricator

Explicitly check for supported VCS
ClosedPublic

Authored by joshuaspence on Jan 29 2015, 11:17 AM.
Tags
None
Referenced Files
F17615405: D11550.id27804.diff
Wed, Jul 9, 1:30 PM
F17615364: D11550.id27924.diff
Wed, Jul 9, 1:28 PM
F17615363: D11550.id27923.diff
Wed, Jul 9, 1:28 PM
Unknown Object (File)
Jun 5 2025, 9:34 PM
Unknown Object (File)
May 19 2025, 6:49 AM
Unknown Object (File)
Apr 27 2025, 6:27 AM
Unknown Object (File)
Apr 25 2025, 9:44 PM
Unknown Object (File)
Apr 25 2025, 6:47 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.