1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-29 18:22:41 +01:00

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
This commit is contained in:
epriestley 2018-04-12 14:46:21 -07:00
parent c52e10d1ec
commit 4068aaef61

View file

@ -22,7 +22,9 @@ final class DifferentialRevisionHoldDraftTransaction
// TODO: This can probably be removed once Draft is the universal default. // TODO: This can probably be removed once Draft is the universal default.
if ($this->isNewObject()) { if ($this->isNewObject()) {
if ($object->isNeedsReview()) { if ($object->isNeedsReview()) {
$object->setModernRevisionStatus(DifferentialRevisionStatus::DRAFT); $object
->setModernRevisionStatus(DifferentialRevisionStatus::DRAFT)
->setShouldBroadcast(false);
} }
} }
} }