From 64d03ff68bf2ff4ef99186472704df8aface9ef3 Mon Sep 17 00:00:00 2001 From: Joshua Spence Date: Tue, 26 May 2015 07:08:56 +1000 Subject: [PATCH] Remove arcanist projects from working copy code Summary: Ref T7604. Remove "arcanist projects" from `ArcanistWorkingCopy` and a few other callsites. Depends on D12999. Test Plan: Can't really think of how to test this. Reviewers: #blessed_reviewers, epriestley Reviewed By: #blessed_reviewers, epriestley Subscribers: epriestley Maniphest Tasks: T7604 Differential Revision: https://secure.phabricator.com/D12945 --- src/configuration/ArcanistSettings.php | 9 --------- src/parser/ArcanistBundle.php | 2 -- src/repository/api/ArcanistSubversionAPI.php | 15 ++------------- .../ArcanistWorkingCopyIdentity.php | 10 ---------- 4 files changed, 2 insertions(+), 34 deletions(-) diff --git a/src/configuration/ArcanistSettings.php b/src/configuration/ArcanistSettings.php index b6ede180..cd5f8f01 100644 --- a/src/configuration/ArcanistSettings.php +++ b/src/configuration/ArcanistSettings.php @@ -49,15 +49,6 @@ final class ArcanistSettings { 'Associates this working copy with a specific installation of '. 'Phabricator.'), ), - 'project.name' => array( - 'type' => 'string', - 'legacy' => 'project_id', - 'example' => '"arcanist"', - 'help' => pht( - 'Associates this working copy with a named Arcanist Project. '. - 'This is primarily useful if you use SVN and have several different '. - 'projects in the same repository.'), - ), 'lint.engine' => array( 'type' => 'string', 'legacy' => 'lint_engine', diff --git a/src/parser/ArcanistBundle.php b/src/parser/ArcanistBundle.php index b642292c..14ebbe05 100644 --- a/src/parser/ArcanistBundle.php +++ b/src/parser/ArcanistBundle.php @@ -133,7 +133,6 @@ final class ArcanistBundle { $path); $meta_info = $future->resolveJSON(); $version = idx($meta_info, 'version', 0); - $project_name = idx($meta_info, 'projectName'); $base_revision = idx($meta_info, 'baseRevision'); $revision_id = idx($meta_info, 'revisionID'); $encoding = idx($meta_info, 'encoding'); @@ -142,7 +141,6 @@ final class ArcanistBundle { } else { // this arc bundle was probably made before we started storing meta info $version = 0; - $project_name = null; $base_revision = null; $revision_id = null; $encoding = null; diff --git a/src/repository/api/ArcanistSubversionAPI.php b/src/repository/api/ArcanistSubversionAPI.php index 707d2d93..d8420a1b 100644 --- a/src/repository/api/ArcanistSubversionAPI.php +++ b/src/repository/api/ArcanistSubversionAPI.php @@ -648,17 +648,7 @@ EODIFF; ConduitClient $conduit, array $query) { - // We don't have much to go on in SVN, look for revisions that came from - // this directory and belong to the same project. - - $project = $this->getWorkingCopyIdentity()->getProjectID(); - if (!$project) { - return array(); - } - - $results = $conduit->callMethodSynchronous( - 'differential.query', - $query); + $results = $conduit->callMethodSynchronous('differential.query', $query); foreach ($results as $key => $result) { if ($result['sourcePath'] != $this->getPath()) { @@ -667,8 +657,7 @@ EODIFF; } foreach ($results as $key => $result) { - $results[$key]['why'] = pht( - 'Matching arcanist project name and working copy directory path.'); + $results[$key]['why'] = pht('Matching working copy directory path.'); } return $results; diff --git a/src/workingcopyidentity/ArcanistWorkingCopyIdentity.php b/src/workingcopyidentity/ArcanistWorkingCopyIdentity.php index ba1985df..122997de 100644 --- a/src/workingcopyidentity/ArcanistWorkingCopyIdentity.php +++ b/src/workingcopyidentity/ArcanistWorkingCopyIdentity.php @@ -216,16 +216,6 @@ final class ArcanistWorkingCopyIdentity { $this->projectConfig = $config; } - public function getProjectID() { - $project_id = $this->getProjectConfig('project.name'); - if ($project_id) { - return $project_id; - } - - // This is an older name for the setting. - return $this->getProjectConfig('project_id'); - } - public function getProjectRoot() { return $this->projectRoot; }