Page MenuHomePhabricator

D8403.diff
No OneTemporary

D8403.diff

Index: src/applications/differential/constants/DifferentialRevisionStatus.php
===================================================================
--- src/applications/differential/constants/DifferentialRevisionStatus.php
+++ src/applications/differential/constants/DifferentialRevisionStatus.php
@@ -21,12 +21,16 @@
self::COLOR_STATUS_DEFAULT,
ArcanistDifferentialRevisionStatus::NEEDS_REVISION =>
self::COLOR_STATUS_RED,
+ ArcanistDifferentialRevisionStatus::CHANGES_PLANNED =>
+ self::COLOR_STATUS_RED,
ArcanistDifferentialRevisionStatus::ACCEPTED =>
self::COLOR_STATUS_GREEN,
ArcanistDifferentialRevisionStatus::CLOSED =>
self::COLOR_STATUS_DARK,
ArcanistDifferentialRevisionStatus::ABANDONED =>
self::COLOR_STATUS_DARK,
+ ArcanistDifferentialRevisionStatus::IN_PREPARATION =>
+ self::COLOR_STATUS_DARK,
);
return idx($map, $status, $default);
}
@@ -39,12 +43,16 @@
'oh-open',
ArcanistDifferentialRevisionStatus::NEEDS_REVISION =>
'oh-open-red',
+ ArcanistDifferentialRevisionStatus::CHANGES_PLANNED =>
+ 'oh-open-red',
ArcanistDifferentialRevisionStatus::ACCEPTED =>
'oh-open-green',
ArcanistDifferentialRevisionStatus::CLOSED =>
'oh-closed-dark',
ArcanistDifferentialRevisionStatus::ABANDONED =>
'oh-closed-dark',
+ ArcanistDifferentialRevisionStatus::IN_PREPARATION =>
+ 'question-blue',
);
return idx($map, $status, $default);
}
@@ -92,9 +100,11 @@
return array(
ArcanistDifferentialRevisionStatus::NEEDS_REVIEW,
ArcanistDifferentialRevisionStatus::NEEDS_REVISION,
+ ArcanistDifferentialRevisionStatus::CHANGES_PLANNED,
ArcanistDifferentialRevisionStatus::ACCEPTED,
ArcanistDifferentialRevisionStatus::CLOSED,
ArcanistDifferentialRevisionStatus::ABANDONED,
+ ArcanistDifferentialRevisionStatus::IN_PREPARATION,
);
}
Index: src/applications/differential/controller/DifferentialRevisionViewController.php
===================================================================
--- src/applications/differential/controller/DifferentialRevisionViewController.php
+++ src/applications/differential/controller/DifferentialRevisionViewController.php
@@ -523,6 +523,7 @@
$actions[DifferentialAction::ACTION_RETHINK] = true;
break;
case ArcanistDifferentialRevisionStatus::NEEDS_REVISION:
+ case ArcanistDifferentialRevisionStatus::CHANGES_PLANNED:
$actions[DifferentialAction::ACTION_ACCEPT] = $allow_self_accept;
$actions[DifferentialAction::ACTION_ABANDON] = true;
$actions[DifferentialAction::ACTION_REQUEST] = true;
@@ -547,6 +548,7 @@
$actions[DifferentialAction::ACTION_RESIGN] = $viewer_is_reviewer;
break;
case ArcanistDifferentialRevisionStatus::NEEDS_REVISION:
+ case ArcanistDifferentialRevisionStatus::CHANGES_PLANNED:
$actions[DifferentialAction::ACTION_ACCEPT] = true;
$actions[DifferentialAction::ACTION_REJECT] = !$viewer_has_rejected;
$actions[DifferentialAction::ACTION_RESIGN] = $viewer_is_reviewer;
Index: src/applications/differential/editor/DifferentialRevisionEditor.php
===================================================================
--- src/applications/differential/editor/DifferentialRevisionEditor.php
+++ src/applications/differential/editor/DifferentialRevisionEditor.php
@@ -437,6 +437,7 @@
// be able to put the revision into "accepted".
switch ($revision->getStatus()) {
case ArcanistDifferentialRevisionStatus::NEEDS_REVISION:
+ case ArcanistDifferentialRevisionStatus::CHANGES_PLANNED:
case ArcanistDifferentialRevisionStatus::NEEDS_REVIEW:
$revision = self::updateAcceptedStatus(
$this->getActor(),
Index: src/applications/differential/editor/DifferentialTransactionEditor.php
===================================================================
--- src/applications/differential/editor/DifferentialTransactionEditor.php
+++ src/applications/differential/editor/DifferentialTransactionEditor.php
@@ -72,6 +72,7 @@
$status_abandoned = ArcanistDifferentialRevisionStatus::ABANDONED;
$status_review = ArcanistDifferentialRevisionStatus::NEEDS_REVIEW;
$status_revision = ArcanistDifferentialRevisionStatus::NEEDS_REVISION;
+ $status_plan = ArcanistDifferentialRevisionStatus::CHANGES_PLANNED;
$action_type = $xaction->getNewValue();
switch ($action_type) {
@@ -86,7 +87,7 @@
$actor = $this->getActor();
$actor_phid = $actor->getPHID();
- // These transactions can cause effects in to ways: by altering the
+ // These transactions can cause effects in two ways: by altering the
// status of an existing reviewer; or by adding the actor as a new
// reviewer.
@@ -112,7 +113,7 @@
case DifferentialAction::ACTION_REOPEN:
return ($object->getStatus() == $status_closed);
case DifferentialAction::ACTION_RETHINK:
- return ($object->getStatus() != $status_revision);
+ return ($object->getStatus() != $status_plan);
case DifferentialAction::ACTION_REQUEST:
return ($object->getStatus() != $status_review);
case DifferentialAction::ACTION_RESIGN:
@@ -139,6 +140,7 @@
$status_review = ArcanistDifferentialRevisionStatus::NEEDS_REVIEW;
$status_revision = ArcanistDifferentialRevisionStatus::NEEDS_REVISION;
+ $status_plan = ArcanistDifferentialRevisionStatus::CHANGES_PLANNED;
switch ($xaction->getTransactionType()) {
case PhabricatorTransactions::TYPE_VIEW_POLICY:
@@ -169,7 +171,7 @@
$object->setStatus(ArcanistDifferentialRevisionStatus::ABANDONED);
return;
case DifferentialAction::ACTION_RETHINK:
- $object->setStatus($status_revision);
+ $object->setStatus($status_plan);
return;
case DifferentialAction::ACTION_RECLAIM:
$object->setStatus($status_review);
@@ -714,7 +716,7 @@
if (!$actor_is_author) {
return pht(
"You can not plan changes to this revision because you do not ".
- "own it. To plan chagnes to a revision, you must be its owner.");
+ "own it. To plan changes to a revision, you must be its owner.");
}
switch ($revision_status) {
@@ -723,6 +725,9 @@
case ArcanistDifferentialRevisionStatus::NEEDS_REVIEW:
// These are OK.
break;
+ case ArcanistDifferentialRevisionStatus::CHANGES_PLANNED:
+ // Let this through, it's a no-op.
+ break;
case ArcanistDifferentialRevisionStatus::ABANDONED:
return pht(
"You can not plan changes to this revision because it has ".
@@ -752,6 +757,7 @@
switch ($revision_status) {
case ArcanistDifferentialRevisionStatus::ACCEPTED:
case ArcanistDifferentialRevisionStatus::NEEDS_REVISION:
+ case ArcanistDifferentialRevisionStatus::CHANGES_PLANNED:
// These are OK.
break;
case ArcanistDifferentialRevisionStatus::NEEDS_REVIEW:
Index: src/applications/differential/view/DifferentialRevisionListView.php
===================================================================
--- src/applications/differential/view/DifferentialRevisionListView.php
+++ src/applications/differential/view/DifferentialRevisionListView.php
@@ -182,6 +182,7 @@
case ArcanistDifferentialRevisionStatus::NEEDS_REVIEW:
break;
case ArcanistDifferentialRevisionStatus::NEEDS_REVISION:
+ case ArcanistDifferentialRevisionStatus::CHANGES_PLANNED:
$item->setBarColor('red');
break;
case ArcanistDifferentialRevisionStatus::ACCEPTED:

File Metadata

Mime Type
text/plain
Expires
Wed, Dec 25, 11:28 AM (11 h, 17 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6926059
Default Alt Text
D8403.diff (7 KB)

Event Timeline