Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F13967080
D15084.id36420.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D15084.id36420.diff
View Options
diff --git a/src/differential/constants/ArcanistDifferentialRevisionStatus.php b/src/differential/constants/ArcanistDifferentialRevisionStatus.php
--- a/src/differential/constants/ArcanistDifferentialRevisionStatus.php
+++ b/src/differential/constants/ArcanistDifferentialRevisionStatus.php
@@ -9,6 +9,7 @@
const ABANDONED = 4;
const CHANGES_PLANNED = 5;
const IN_PREPARATION = 6;
+ const CLOSED_FROM_ACCEPTED = 7;
public static function getNameForRevisionStatus($status) {
$map = array(
@@ -19,6 +20,7 @@
self::ABANDONED => pht('Abandoned'),
self::CHANGES_PLANNED => pht('Changes Planned'),
self::IN_PREPARATION => pht('In Preparation'),
+ self::CLOSED_FROM_ACCEPTED => pht('Closed'),
);
return idx($map, coalesce($status, '?'), pht('Unknown'));
diff --git a/src/workflow/ArcanistCloseRevisionWorkflow.php b/src/workflow/ArcanistCloseRevisionWorkflow.php
--- a/src/workflow/ArcanistCloseRevisionWorkflow.php
+++ b/src/workflow/ArcanistCloseRevisionWorkflow.php
@@ -98,6 +98,8 @@
$status_accepted = ArcanistDifferentialRevisionStatus::ACCEPTED;
$status_closed = ArcanistDifferentialRevisionStatus::CLOSED;
+ $status_closed_accepted =
+ ArcanistDifferentialRevisionStatus::CLOSED_FROM_ACCEPTED;
if (!$is_finalize && $revision['status'] != $status_accepted) {
throw new ArcanistUsageException(
@@ -142,7 +144,12 @@
}
$status = $revision['status'];
- if ($status == $status_accepted || $status == $status_closed) {
+ $good_states = array(
+ $status_accepted => true,
+ $status_closed => true,
+ $status_closed_accepted => true,
+ );
+ if (idx($good_states, $status)) {
// If this has already been attached to commits, don't show the
// "you can push this commit" message since we know it's been pushed
// already.
diff --git a/src/workflow/ArcanistPatchWorkflow.php b/src/workflow/ArcanistPatchWorkflow.php
--- a/src/workflow/ArcanistPatchWorkflow.php
+++ b/src/workflow/ArcanistPatchWorkflow.php
@@ -1065,7 +1065,9 @@
$found_revision = null;
$revisions = isort($revisions, 'dateModified');
foreach ($revisions as $revision) {
- if ($revision['status'] == ArcanistDifferentialRevisionStatus::CLOSED) {
+ $status = $revision['status'];
+ if ($status == ArcanistDifferentialRevisionStatus::CLOSED ||
+ $status == ArcanistDifferentialRevisionStatus::CLOSED_FROM_ACCEPTED) {
$found_revision = $revision;
}
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Oct 17, 11:34 AM (4 w, 14 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6721891
Default Alt Text
D15084.id36420.diff (2 KB)
Attached To
Mode
D15084: Revision substate CLOSED_FROM_ACCEPTED
Attached
Detach File
Event Timeline
Log In to Comment