1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-19 05:12:41 +01:00

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
This commit is contained in:
Michael Peters 2014-03-11 13:07:45 -07:00 committed by epriestley
parent 2dbfb1d5fb
commit 8b6c86e27d

View file

@ -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) {