From 8b6c86e27d141df489788a40f39c69dcc50eedd4 Mon Sep 17 00:00:00 2001 From: Michael Peters Date: Tue, 11 Mar 2014 13:07:45 -0700 Subject: [PATCH] Fix the script that saves lint for a repo into the database and updates diffusion. Summary: It appears a change to the way the configuration was loaded into ArcanistRepositoryAPI in rARCa2285b2b broke the save_lint script. This updates the DiffusionLintSaveRunner to use the configuration correctly, allowing the linter to run Test Plan: cd /your/project; ../../../path/to/phabricator/scripts/repository/save_lint.php Reviewers: epriestley, #blessed_reviewers Reviewed By: epriestley, #blessed_reviewers Subscribers: aran, epriestley, Korvin Differential Revision: https://secure.phabricator.com/D8487 --- src/applications/diffusion/DiffusionLintSaveRunner.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/applications/diffusion/DiffusionLintSaveRunner.php b/src/applications/diffusion/DiffusionLintSaveRunner.php index 687c08ea96..de07e680a7 100644 --- a/src/applications/diffusion/DiffusionLintSaveRunner.php +++ b/src/applications/diffusion/DiffusionLintSaveRunner.php @@ -44,7 +44,10 @@ final class DiffusionLintSaveRunner { public function run($dir) { $working_copy = ArcanistWorkingCopyIdentity::newFromPath($dir); - $api = ArcanistRepositoryAPI::newAPIFromWorkingCopyIdentity($working_copy); + $configuration_manager = new ArcanistConfigurationManager(); + $configuration_manager->setWorkingCopyIdentity($working_copy); + $api = ArcanistRepositoryAPI::newAPIFromConfigurationManager( + $configuration_manager); $this->svnRoot = id(new PhutilURI($api->getSourceControlPath()))->getPath(); if ($api instanceof ArcanistGitAPI) { -- 2.51.2