From c69beb7988d1e8364fb1a92a3261e83bef914441 Mon Sep 17 00:00:00 2001 From: epriestley Date: Mon, 21 Oct 2013 16:59:22 -0700 Subject: [PATCH] Stop writes to the old Relationship table Summary: Ref T1279. The new stuff seems stable, so stop writes to the old tables. Test Plan: - Added and removed reviewers. - Grepped for `::RELATIONSHIP_TABLE` to verify we really have no more reads. - Grepped for `::RELATION_REVIEWER`. Reviewers: btrahan Reviewed By: btrahan CC: aran Maniphest Tasks: T1279 Differential Revision: https://secure.phabricator.com/D7360 --- .../editor/DifferentialRevisionEditor.php | 40 ------------------- 1 file changed, 40 deletions(-) diff --git a/src/applications/differential/editor/DifferentialRevisionEditor.php b/src/applications/differential/editor/DifferentialRevisionEditor.php index b79bcf7ce9..e5418ecab2 100644 --- a/src/applications/differential/editor/DifferentialRevisionEditor.php +++ b/src/applications/differential/editor/DifferentialRevisionEditor.php @@ -618,15 +618,6 @@ final class DifferentialRevisionEditor extends PhabricatorEditor { $reviewers = $revision->getReviewers(); - // This is here until the new way proves stable enough - // See https://secure.phabricator.com/T1279 - self::alterReviewers( - $revision, - $reviewers, - $remove_phids, - $add_phids, - $actor->getPHID()); - $editor = id(new PhabricatorEdgeEditor()) ->setActor($actor); @@ -679,18 +670,6 @@ final class DifferentialRevisionEditor extends PhabricatorEditor { $reviewer_phid, $status) { - $reviewers = $revision->getReviewers(); - if (!in_array($reviewer_phid, $reviewers)) { - // This is here until the new way proves stable enough - // See https://secure.phabricator.com/T1279 - self::alterReviewers( - $revision, - $reviewers, - array(), - array($reviewer_phid), - $actor->getPHID()); - } - $options = array( 'data' => array( 'status' => $status @@ -712,25 +691,6 @@ final class DifferentialRevisionEditor extends PhabricatorEditor { ->save(); } - /** - * @deprecated - */ - private static function alterReviewers( - DifferentialRevision $revision, - array $stable_phids, - array $rem_phids, - array $add_phids, - $reason_phid) { - - return self::alterRelationships( - $revision, - $stable_phids, - $rem_phids, - $add_phids, - $reason_phid, - DifferentialRevision::RELATION_REVIEWER); - } - private static function alterRelationships( DifferentialRevision $revision, array $stable_phids, -- 2.51.2