Changeset View
Changeset View
Standalone View
Standalone View
src/repository/api/__tests__/ArcanistRepositoryAPIStateTestCase.php
| Show All 28 Lines | public function testSvnStateParsing() { | ||||
| } | } | ||||
| } | } | ||||
| private function parseState($test) { | private function parseState($test) { | ||||
| $dir = dirname(__FILE__).'/state/'; | $dir = dirname(__FILE__).'/state/'; | ||||
| $fixture = PhutilDirectoryFixture::newFromArchive($dir.'/'.$test); | $fixture = PhutilDirectoryFixture::newFromArchive($dir.'/'.$test); | ||||
| $fixture_path = $fixture->getPath(); | $fixture_path = $fixture->getPath(); | ||||
| $working_copy = ArcanistWorkingCopyIdentity::newFromPath($fixture_path); | $working_copy = ArcanistWorkingCopy::newFromWorkingDirectory($fixture_path); | ||||
| $configuration_manager = new ArcanistConfigurationManager(); | |||||
| $configuration_manager->setWorkingCopyIdentity($working_copy); | $api = $working_copy->newRepositoryAPI(); | ||||
| $api = ArcanistRepositoryAPI::newAPIFromConfigurationManager( | |||||
| $configuration_manager); | |||||
| $api->setBaseCommitArgumentRules('arc:this'); | $api->setBaseCommitArgumentRules('arc:this'); | ||||
| if ($api instanceof ArcanistSubversionAPI) { | if ($api instanceof ArcanistSubversionAPI) { | ||||
| // Upgrade the repository so that the test will still pass if the local | // Upgrade the repository so that the test will still pass if the local | ||||
| // `svn` is newer than the `svn` which created the repository. | // `svn` is newer than the `svn` which created the repository. | ||||
| // NOTE: Some versions of Subversion (1.7.x?) exit with an error code on | // NOTE: Some versions of Subversion (1.7.x?) exit with an error code on | ||||
| ▲ Show 20 Lines • Show All 152 Lines • Show Last 20 Lines | |||||