Changeset View
Changeset View
Standalone View
Standalone View
src/repository/api/ArcanistRepositoryAPI.php
| Show First 20 Lines • Show All 57 Lines • ▼ Show 20 Lines | abstract class ArcanistRepositoryAPI { | ||||
| public static function newAPIFromConfigurationManager( | public static function newAPIFromConfigurationManager( | ||||
| ArcanistConfigurationManager $configuration_manager) { | ArcanistConfigurationManager $configuration_manager) { | ||||
| $working_copy = $configuration_manager->getWorkingCopyIdentity(); | $working_copy = $configuration_manager->getWorkingCopyIdentity(); | ||||
| if (!$working_copy) { | if (!$working_copy) { | ||||
| throw new Exception( | throw new Exception( | ||||
| pht( | pht( | ||||
| 'Trying to create a RepositoryAPI without a working copy!')); | 'Trying to create a %s without a working copy!', | ||||
| __CLASS__)); | |||||
| } | } | ||||
| $root = $working_copy->getProjectRoot(); | $root = $working_copy->getProjectRoot(); | ||||
| switch ($working_copy->getVCSType()) { | switch ($working_copy->getVCSType()) { | ||||
| case 'svn': | case 'svn': | ||||
| $api = new ArcanistSubversionAPI($root); | $api = new ArcanistSubversionAPI($root); | ||||
| break; | break; | ||||
| case 'hg': | case 'hg': | ||||
| ▲ Show 20 Lines • Show All 585 Lines • Show Last 20 Lines | |||||