From 7e0bdbe00796a6678648d50da7b671a1bce264af Mon Sep 17 00:00:00 2001 From: epriestley Date: Thu, 12 Apr 2018 14:46:21 -0700 Subject: [PATCH] (stable) Toggle revision "shouldBroadcast" correctly when "--draft" is used with prototypes off Summary: See PHI573. Ref T13120. Drafts were recently changed so that "draft" and "broadcast" are separate flags, and you can have non-broadcasting revisions in states other than "draft" if builds fail on a draft or you abandon a draft. However, when draft mode is entered with `arc diff --draft` and you have prototypes off, this flag wasn't being set correctly. Test Plan: Disabled prototypes, created a revision with `arc diff --draft`, observed that `draft.broadcast` is now correctly `false`. Reviewers: amckinley Reviewed By: amckinley Maniphest Tasks: T13120 Differential Revision: https://secure.phabricator.com/D19360 --- .../xaction/DifferentialRevisionHoldDraftTransaction.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/applications/differential/xaction/DifferentialRevisionHoldDraftTransaction.php b/src/applications/differential/xaction/DifferentialRevisionHoldDraftTransaction.php index 2562f18209..4d31f39f02 100644 --- a/src/applications/differential/xaction/DifferentialRevisionHoldDraftTransaction.php +++ b/src/applications/differential/xaction/DifferentialRevisionHoldDraftTransaction.php @@ -22,7 +22,9 @@ final class DifferentialRevisionHoldDraftTransaction // TODO: This can probably be removed once Draft is the universal default. if ($this->isNewObject()) { if ($object->isNeedsReview()) { - $object->setModernRevisionStatus(DifferentialRevisionStatus::DRAFT); + $object + ->setModernRevisionStatus(DifferentialRevisionStatus::DRAFT) + ->setShouldBroadcast(false); } } }