]> khamidou — GitHub mirrors - arcanist.git/commit
Explicitly check for supported VCS
authorJoshua Spence <josh@joshuaspence.com>
Mon, 2 Feb 2015 19:54:22 +0000 (06:54 +1100)
committerJoshua Spence <josh@joshuaspence.com>
Mon, 2 Feb 2015 19:54:22 +0000 (06:54 +1100)
commite4be03177810b61d43d5f7f2db38cb578b82cfb2
treeeb7a71277e981a530411e1ffab994da1174e46b3
parent52277fc06f8db2fe73c88b76022d91baee1129f3
Explicitly check for supported VCS

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.
```

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D11550
scripts/arcanist.php
src/workflow/ArcanistAmendWorkflow.php
src/workflow/ArcanistBookmarkWorkflow.php
src/workflow/ArcanistCommitWorkflow.php
src/workflow/ArcanistLandWorkflow.php
src/workflow/ArcanistRevertWorkflow.php
src/workflow/ArcanistWorkflow.php