Index: src/parser/__tests__/ArcanistBaseCommitParserTestCase.php =================================================================== --- src/parser/__tests__/ArcanistBaseCommitParserTestCase.php +++ src/parser/__tests__/ArcanistBaseCommitParserTestCase.php @@ -150,13 +150,11 @@ // isolation for repository-oriented test cases. $root = dirname(phutil_get_library_root('arcanist')); - $working_copy = ArcanistWorkingCopyIdentity::newFromPath($root); - $configuration_manager = new ArcanistConfigurationManager(); - $configuration_manager->setWorkingCopyIdentity($working_copy); - $repo = ArcanistRepositoryAPI::newAPIFromConfigurationManager( - $configuration_manager); + $working_copy = ArcanistWorkingCopy::newFromWorkingDirectory($root); - return new ArcanistBaseCommitParser($repo); + $api = $working_copy->newRepositoryAPI(); + + return new ArcanistBaseCommitParser($api); } } Index: src/workingcopy/ArcanistGitWorkingCopy.php =================================================================== --- src/workingcopy/ArcanistGitWorkingCopy.php +++ src/workingcopy/ArcanistGitWorkingCopy.php @@ -18,5 +18,9 @@ return new self(); } + public function newRepositoryAPI() { + return new ArcanistGitAPI($this->getPath()); + } + } Index: src/workingcopy/ArcanistMercurialWorkingCopy.php =================================================================== --- src/workingcopy/ArcanistMercurialWorkingCopy.php +++ src/workingcopy/ArcanistMercurialWorkingCopy.php @@ -18,5 +18,9 @@ return new self(); } + public function newRepositoryAPI() { + return new ArcanistMercurialAPI($this->getPath()); + } + } Index: src/workingcopy/ArcanistSubversionWorkingCopy.php =================================================================== --- src/workingcopy/ArcanistSubversionWorkingCopy.php +++ src/workingcopy/ArcanistSubversionWorkingCopy.php @@ -70,5 +70,9 @@ return head($candidates); } + public function newRepositoryAPI() { + return new ArcanistSubversionAPI($this->getPath()); + } + } Index: src/workingcopy/ArcanistWorkingCopy.php =================================================================== --- src/workingcopy/ArcanistWorkingCopy.php +++ src/workingcopy/ArcanistWorkingCopy.php @@ -110,4 +110,6 @@ return last($candidates); } + abstract public function newRepositoryAPI(); + }