Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14412204
D19835.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D19835.diff
View Options
diff --git a/src/applications/differential/xaction/DifferentialRevisionCommandeerTransaction.php b/src/applications/differential/xaction/DifferentialRevisionCommandeerTransaction.php
--- a/src/applications/differential/xaction/DifferentialRevisionCommandeerTransaction.php
+++ b/src/applications/differential/xaction/DifferentialRevisionCommandeerTransaction.php
@@ -59,11 +59,21 @@
}
protected function validateAction($object, PhabricatorUser $viewer) {
- if ($object->isClosed()) {
+ // If a revision has already landed, we generally want to discourage
+ // reopening and reusing it since this tends to create a big mess (users
+ // should create a new revision instead). Thus, we stop you from
+ // commandeering closed revisions.
+
+ // See PHI985. If the revision was abandoned, there's no peril in allowing
+ // the commandeer since the change (likely) never actually landed. So
+ // it's okay to commandeer abandoned revisions.
+
+ if ($object->isClosed() && !$object->isAbandoned()) {
throw new Exception(
pht(
'You can not commandeer this revision because it has already '.
- 'been closed. You can only commandeer open revisions.'));
+ 'been closed. You can only commandeer open or abandoned '.
+ 'revisions.'));
}
if ($this->isViewerRevisionAuthor($object, $viewer)) {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Dec 25, 12:46 PM (10 h, 53 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6924879
Default Alt Text
D19835.diff (1 KB)
Attached To
Mode
D19835: Allow "Abandoned" revisions to be commandeered
Attached
Detach File
Event Timeline
Log In to Comment