@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Allow "Abandoned" revisions to be commandeered

Summary:
Ref T13216. See PHI985. You currently can't commandeer an abandoned revision, but this workflow is perfectly fine.

The caution here is just around weird use cases where, e.g., users want to reopen a revision to add a revert to it. These workflows tend to create problems so we try to guide users away from them.

Test Plan: {F6026841}

Reviewers: amckinley

Reviewed By: amckinley

Maniphest Tasks: T13216

Differential Revision: https://secure.phabricator.com/D19835

+12 -2
+12 -2
src/applications/differential/xaction/DifferentialRevisionCommandeerTransaction.php
··· 59 59 } 60 60 61 61 protected function validateAction($object, PhabricatorUser $viewer) { 62 - if ($object->isClosed()) { 62 + // If a revision has already landed, we generally want to discourage 63 + // reopening and reusing it since this tends to create a big mess (users 64 + // should create a new revision instead). Thus, we stop you from 65 + // commandeering closed revisions. 66 + 67 + // See PHI985. If the revision was abandoned, there's no peril in allowing 68 + // the commandeer since the change (likely) never actually landed. So 69 + // it's okay to commandeer abandoned revisions. 70 + 71 + if ($object->isClosed() && !$object->isAbandoned()) { 63 72 throw new Exception( 64 73 pht( 65 74 'You can not commandeer this revision because it has already '. 66 - 'been closed. You can only commandeer open revisions.')); 75 + 'been closed. You can only commandeer open or abandoned '. 76 + 'revisions.')); 67 77 } 68 78 69 79 if ($this->isViewerRevisionAuthor($object, $viewer)) {