From 47245b1b59c7523af8f442ba05ffb4a4a8b41991 Mon Sep 17 00:00:00 2001 From: epriestley Date: Mon, 14 Apr 2014 12:08:04 -0700 Subject: [PATCH] Remove some ad-hoc loading of repositories from Releeph Summary: Ref T3551. Since we now require repositories in order to perform policy checks, things that did loads properly don't need to load this data explicitly. Test Plan: Edited a product, cut a new branch. Reviewers: btrahan Reviewed By: btrahan Subscribers: epriestley Maniphest Tasks: T3551 Differential Revision: https://secure.phabricator.com/D8769 --- .../controller/branch/ReleephBranchCreateController.php | 3 +-- .../controller/project/ReleephProductEditController.php | 4 +--- src/applications/releeph/query/ReleephProjectQuery.php | 1 - 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/applications/releeph/controller/branch/ReleephBranchCreateController.php b/src/applications/releeph/controller/branch/ReleephBranchCreateController.php index bc6cca3877..08243bf8ee 100644 --- a/src/applications/releeph/controller/branch/ReleephBranchCreateController.php +++ b/src/applications/releeph/controller/branch/ReleephBranchCreateController.php @@ -31,11 +31,10 @@ final class ReleephBranchCreateController extends ReleephProductController { $symbolic_name = $request->getStr('symbolicName'); if (!$cut_point) { - $repository = $product->loadPhabricatorRepository(); + $repository = $product->getRepository(); switch ($repository->getVersionControlSystem()) { case PhabricatorRepositoryType::REPOSITORY_TYPE_SVN: break; - case PhabricatorRepositoryType::REPOSITORY_TYPE_GIT: $cut_point = $product->getTrunkBranch(); break; diff --git a/src/applications/releeph/controller/project/ReleephProductEditController.php b/src/applications/releeph/controller/project/ReleephProductEditController.php index 2f921db7e4..c3b8ac5572 100644 --- a/src/applications/releeph/controller/project/ReleephProductEditController.php +++ b/src/applications/releeph/controller/project/ReleephProductEditController.php @@ -139,9 +139,7 @@ final class ReleephProductEditController extends ReleephProductController { id(new AphrontFormStaticControl()) ->setLabel(pht('Repository')) ->setValue( - $product - ->loadPhabricatorRepository() - ->getName())) + $product->getRepository()->getName())) ->appendChild( id(new AphrontFormStaticControl()) ->setLabel(pht('Arc Project')) diff --git a/src/applications/releeph/query/ReleephProjectQuery.php b/src/applications/releeph/query/ReleephProjectQuery.php index a4fe82a45f..dcd5112e31 100644 --- a/src/applications/releeph/query/ReleephProjectQuery.php +++ b/src/applications/releeph/query/ReleephProjectQuery.php @@ -7,7 +7,6 @@ final class ReleephProjectQuery private $ids; private $phids; - private $needRepositories; private $needArcanistProjects; private $order = 'order-id';