Page MenuHomePhabricator

D9303.id.diff
No OneTemporary

D9303.id.diff

diff --git a/resources/sql/autopatches/20140527.diffaction.sql b/resources/sql/autopatches/20140527.diffaction.sql
new file mode 100644
--- /dev/null
+++ b/resources/sql/autopatches/20140527.diffaction.sql
@@ -0,0 +1,2 @@
+UPDATE {$NAMESPACE}_differential.differential_comment
+ SET action = 'request_changes' WHERE action = 'reject';
diff --git a/src/applications/differential/constants/DifferentialAction.php b/src/applications/differential/constants/DifferentialAction.php
--- a/src/applications/differential/constants/DifferentialAction.php
+++ b/src/applications/differential/constants/DifferentialAction.php
@@ -5,7 +5,7 @@
const ACTION_CLOSE = 'commit';
const ACTION_COMMENT = 'none';
const ACTION_ACCEPT = 'accept';
- const ACTION_REJECT = 'reject';
+ const ACTION_CHANGE = 'request_changes';
const ACTION_RETHINK = 'rethink';
const ACTION_ABANDON = 'abandon';
const ACTION_REQUEST = 'request_review';
@@ -23,81 +23,63 @@
public static function getBasicStoryText($action, $author_name) {
switch ($action) {
case DifferentialAction::ACTION_COMMENT:
- $title = pht('%s commented on this revision.',
- $author_name);
- break;
+ $title = pht('%s commented on this revision.', $author_name);
+ break;
case DifferentialAction::ACTION_ACCEPT:
- $title = pht('%s accepted this revision.',
- $author_name);
- break;
- case DifferentialAction::ACTION_REJECT:
- $title = pht('%s requested changes to this revision.',
- $author_name);
- break;
+ $title = pht('%s accepted this revision.', $author_name);
+ break;
+ case DifferentialAction::ACTION_CHANGE:
+ $title = pht('%s requested changes to this revision.', $author_name);
+ break;
case DifferentialAction::ACTION_RETHINK:
- $title = pht('%s planned changes to this revision.',
- $author_name);
- break;
+ $title = pht('%s planned changes to this revision.', $author_name);
+ break;
case DifferentialAction::ACTION_ABANDON:
- $title = pht('%s abandoned this revision.',
- $author_name);
- break;
+ $title = pht('%s abandoned this revision.', $author_name);
+ break;
case DifferentialAction::ACTION_CLOSE:
- $title = pht('%s closed this revision.',
- $author_name);
- break;
+ $title = pht('%s closed this revision.', $author_name);
+ break;
case DifferentialAction::ACTION_REQUEST:
- $title = pht('%s requested a review of this revision.',
- $author_name);
- break;
+ $title = pht('%s requested a review of this revision.', $author_name);
+ break;
case DifferentialAction::ACTION_RECLAIM:
- $title = pht('%s reclaimed this revision.',
- $author_name);
- break;
+ $title = pht('%s reclaimed this revision.', $author_name);
+ break;
case DifferentialAction::ACTION_UPDATE:
- $title = pht('%s updated this revision.',
- $author_name);
- break;
+ $title = pht('%s updated this revision.', $author_name);
+ break;
case DifferentialAction::ACTION_RESIGN:
- $title = pht('%s resigned from this revision.',
- $author_name);
- break;
+ $title = pht('%s resigned from this revision.', $author_name);
+ break;
case DifferentialAction::ACTION_SUMMARIZE:
- $title = pht('%s summarized this revision.',
- $author_name);
- break;
+ $title = pht('%s summarized this revision.', $author_name);
+ break;
case DifferentialAction::ACTION_TESTPLAN:
$title = pht('%s explained the test plan for this revision.',
$author_name);
- break;
+ break;
case DifferentialAction::ACTION_CREATE:
- $title = pht('%s created this revision.',
- $author_name);
- break;
+ $title = pht('%s created this revision.', $author_name);
+ break;
case DifferentialAction::ACTION_ADDREVIEWERS:
- $title = pht('%s added reviewers to this revision.',
- $author_name);
- break;
+ $title = pht('%s added reviewers to this revision.', $author_name);
+ break;
case DifferentialAction::ACTION_ADDCCS:
- $title = pht('%s added CCs to this revision.',
- $author_name);
- break;
+ $title = pht('%s added CCs to this revision.', $author_name);
+ break;
case DifferentialAction::ACTION_CLAIM:
- $title = pht('%s commandeered this revision.',
- $author_name);
- break;
+ $title = pht('%s commandeered this revision.', $author_name);
+ break;
case DifferentialAction::ACTION_REOPEN:
- $title = pht('%s reopened this revision.',
- $author_name);
- break;
+ $title = pht('%s reopened this revision.', $author_name);
+ break;
case DifferentialTransaction::TYPE_INLINE:
- $title = pht(
- '%s added an inline comment.',
- $author_name);
+ $title = pht('%s added an inline comment.', $author_name);
break;
default:
$title = pht('Ghosts happened to this revision.');
- break;
+ break;
}
return $title;
}
@@ -106,7 +88,7 @@
$verbs = array(
self::ACTION_COMMENT => pht('Comment'),
self::ACTION_ACCEPT => pht("Accept Revision \xE2\x9C\x94"),
- self::ACTION_REJECT => pht("Request Changes \xE2\x9C\x98"),
+ self::ACTION_CHANGE => pht("Request Changes \xE2\x9C\x98"),
self::ACTION_RETHINK => pht("Plan Changes \xE2\x9C\x98"),
self::ACTION_ABANDON => pht('Abandon Revision'),
self::ACTION_REQUEST => pht('Request Review'),
diff --git a/src/applications/differential/controller/DifferentialRevisionViewController.php b/src/applications/differential/controller/DifferentialRevisionViewController.php
--- a/src/applications/differential/controller/DifferentialRevisionViewController.php
+++ b/src/applications/differential/controller/DifferentialRevisionViewController.php
@@ -587,18 +587,18 @@
switch ($status) {
case ArcanistDifferentialRevisionStatus::NEEDS_REVIEW:
$actions[DifferentialAction::ACTION_ACCEPT] = true;
- $actions[DifferentialAction::ACTION_REJECT] = true;
+ $actions[DifferentialAction::ACTION_CHANGE] = true;
$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_CHANGE] = !$viewer_has_rejected;
$actions[DifferentialAction::ACTION_RESIGN] = $viewer_is_reviewer;
break;
case ArcanistDifferentialRevisionStatus::ACCEPTED:
$actions[DifferentialAction::ACTION_ACCEPT] = !$viewer_has_accepted;
- $actions[DifferentialAction::ACTION_REJECT] = true;
+ $actions[DifferentialAction::ACTION_CHANGE] = true;
$actions[DifferentialAction::ACTION_RESIGN] = $viewer_is_reviewer;
break;
case ArcanistDifferentialRevisionStatus::CLOSED:
diff --git a/src/applications/differential/editor/DifferentialTransactionEditor.php b/src/applications/differential/editor/DifferentialTransactionEditor.php
--- a/src/applications/differential/editor/DifferentialTransactionEditor.php
+++ b/src/applications/differential/editor/DifferentialTransactionEditor.php
@@ -111,7 +111,7 @@
$action_type = $xaction->getNewValue();
switch ($action_type) {
case DifferentialAction::ACTION_ACCEPT:
- case DifferentialAction::ACTION_REJECT:
+ case DifferentialAction::ACTION_CHANGE:
if ($action_type == DifferentialAction::ACTION_ACCEPT) {
$new_status = DifferentialReviewerStatus::STATUS_ACCEPTED;
} else {
@@ -209,7 +209,7 @@
switch ($xaction->getNewValue()) {
case DifferentialAction::ACTION_RESIGN:
case DifferentialAction::ACTION_ACCEPT:
- case DifferentialAction::ACTION_REJECT:
+ case DifferentialAction::ACTION_CHANGE:
// These have no direct effects, and affect review status only
// indirectly by altering reviewers with TYPE_EDGE transactions.
return;
@@ -414,7 +414,7 @@
switch ($action_type) {
case DifferentialAction::ACTION_ACCEPT:
- case DifferentialAction::ACTION_REJECT:
+ case DifferentialAction::ACTION_CHANGE:
if ($action_type == DifferentialAction::ACTION_ACCEPT) {
$data = array(
'status' => DifferentialReviewerStatus::STATUS_ACCEPTED,
@@ -572,8 +572,6 @@
return $result;
}
-
-
protected function applyFinalEffects(
PhabricatorLiskDAO $object,
array $xactions) {
@@ -824,10 +822,9 @@
}
break;
- case DifferentialAction::ACTION_REJECT:
+ case DifferentialAction::ACTION_CHANGE:
if ($actor_is_author) {
- return pht(
- 'You can not request changes to your own revision.');
+ return pht('You can not request changes to your own revision.');
}
if ($revision_status == $status_abandoned) {
diff --git a/src/applications/differential/mail/DifferentialReplyHandler.php b/src/applications/differential/mail/DifferentialReplyHandler.php
--- a/src/applications/differential/mail/DifferentialReplyHandler.php
+++ b/src/applications/differential/mail/DifferentialReplyHandler.php
@@ -79,7 +79,7 @@
public function getSupportedCommands() {
$actions = array(
DifferentialAction::ACTION_COMMENT,
- DifferentialAction::ACTION_REJECT,
+ DifferentialAction::ACTION_CHANGE,
DifferentialAction::ACTION_ABANDON,
DifferentialAction::ACTION_RECLAIM,
DifferentialAction::ACTION_RESIGN,
diff --git a/src/applications/differential/storage/DifferentialTransaction.php b/src/applications/differential/storage/DifferentialTransaction.php
--- a/src/applications/differential/storage/DifferentialTransaction.php
+++ b/src/applications/differential/storage/DifferentialTransaction.php
@@ -4,7 +4,6 @@
private $isCommandeerSideEffect;
-
public function setIsCommandeerSideEffect($is_side_effect) {
$this->isCommandeerSideEffect = $is_side_effect;
return $this;
@@ -113,7 +112,6 @@
}
public function getActionStrength() {
-
switch ($this->getTransactionType()) {
case self::TYPE_ACTION:
return 3;
@@ -141,7 +139,7 @@
case self::TYPE_ACTION:
$map = array(
DifferentialAction::ACTION_ACCEPT => pht('Accepted'),
- DifferentialAction::ACTION_REJECT => pht('Requested Changes To'),
+ DifferentialAction::ACTION_CHANGE => pht('Requested Changes To'),
DifferentialAction::ACTION_RETHINK => pht('Planned Changes To'),
DifferentialAction::ACTION_ABANDON => pht('Abandoned'),
DifferentialAction::ACTION_CLOSE => pht('Closed'),
@@ -238,14 +236,11 @@
case self::TYPE_STATUS:
switch ($this->getNewValue()) {
case ArcanistDifferentialRevisionStatus::ACCEPTED:
- return pht(
- 'This revision is now accepted and ready to land.');
+ return pht('This revision is now accepted and ready to land.');
case ArcanistDifferentialRevisionStatus::NEEDS_REVISION:
- return pht(
- 'This revision now requires changes to proceed.');
+ return pht('This revision now requires changes to proceed.');
case ArcanistDifferentialRevisionStatus::NEEDS_REVIEW:
- return pht(
- 'This revision now requires review to proceed.');
+ return pht('This revision now requires review to proceed.');
}
}
@@ -280,7 +275,7 @@
'%s accepted %s.',
$author_link,
$object_link);
- case DifferentialAction::ACTION_REJECT:
+ case DifferentialAction::ACTION_CHANGE:
return pht(
'%s requested changes to %s.',
$author_link,
@@ -369,7 +364,7 @@
return 'fa-check';
case DifferentialAction::ACTION_ACCEPT:
return 'fa-check-circle-o';
- case DifferentialAction::ACTION_REJECT:
+ case DifferentialAction::ACTION_CHANGE:
return 'fa-times-circle-o';
case DifferentialAction::ACTION_ABANDON:
return 'fa-plane';
@@ -436,7 +431,7 @@
return PhabricatorTransactions::COLOR_BLUE;
case DifferentialAction::ACTION_ACCEPT:
return PhabricatorTransactions::COLOR_GREEN;
- case DifferentialAction::ACTION_REJECT:
+ case DifferentialAction::ACTION_CHANGE:
return PhabricatorTransactions::COLOR_RED;
case DifferentialAction::ACTION_ABANDON:
return PhabricatorTransactions::COLOR_BLACK;
@@ -455,7 +450,6 @@
}
}
-
return parent::getColor();
}
@@ -496,11 +490,9 @@
'You can not commandeer this revision because you already own '.
'it.');
case DifferentialAction::ACTION_ACCEPT:
- return pht(
- 'You have already accepted this revision.');
- case DifferentialAction::ACTION_REJECT:
- return pht(
- 'You have already requested changes to this revision.');
+ return pht('You have already accepted this revision.');
+ case DifferentialAction::ACTION_CHANGE:
+ return pht('You have already requested changes to this revision.');
}
break;
}
@@ -508,5 +500,4 @@
return parent::getNoEffectDescription();
}
-
}
diff --git a/src/applications/feed/story/PhabricatorFeedStoryDifferential.php b/src/applications/feed/story/PhabricatorFeedStoryDifferential.php
--- a/src/applications/feed/story/PhabricatorFeedStoryDifferential.php
+++ b/src/applications/feed/story/PhabricatorFeedStoryDifferential.php
@@ -52,79 +52,79 @@
case DifferentialAction::ACTION_COMMENT:
$one_line = pht('%s commented on revision %s',
$actor_link, $revision_link);
- break;
+ break;
case DifferentialAction::ACTION_ACCEPT:
$one_line = pht('%s accepted revision %s',
$actor_link, $revision_link);
- break;
- case DifferentialAction::ACTION_REJECT:
+ break;
+ case DifferentialAction::ACTION_CHANGE:
$one_line = pht('%s requested changes to revision %s',
$actor_link, $revision_link);
- break;
+ break;
case DifferentialAction::ACTION_RETHINK:
$one_line = pht('%s planned changes to revision %s',
$actor_link, $revision_link);
- break;
+ break;
case DifferentialAction::ACTION_ABANDON:
$one_line = pht('%s abandoned revision %s',
$actor_link, $revision_link);
- break;
+ break;
case DifferentialAction::ACTION_CLOSE:
$one_line = pht('%s closed revision %s',
$actor_link, $revision_link);
- break;
+ break;
case DifferentialAction::ACTION_REQUEST:
$one_line = pht('%s requested a review of revision %s',
$actor_link, $revision_link);
- break;
+ break;
case DifferentialAction::ACTION_RECLAIM:
$one_line = pht('%s reclaimed revision %s',
$actor_link, $revision_link);
- break;
+ break;
case DifferentialAction::ACTION_UPDATE:
$one_line = pht('%s updated revision %s',
$actor_link, $revision_link);
- break;
+ break;
case DifferentialAction::ACTION_RESIGN:
$one_line = pht('%s resigned from revision %s',
$actor_link, $revision_link);
- break;
+ break;
case DifferentialAction::ACTION_SUMMARIZE:
$one_line = pht('%s summarized revision %s',
$actor_link, $revision_link);
- break;
+ break;
case DifferentialAction::ACTION_TESTPLAN:
$one_line = pht('%s explained the test plan for revision %s',
$actor_link, $revision_link);
- break;
+ break;
case DifferentialAction::ACTION_CREATE:
$one_line = pht('%s created revision %s',
$actor_link, $revision_link);
- break;
+ break;
case DifferentialAction::ACTION_ADDREVIEWERS:
$one_line = pht('%s added reviewers to revision %s',
$actor_link, $revision_link);
- break;
+ break;
case DifferentialAction::ACTION_ADDCCS:
$one_line = pht('%s added CCs to revision %s',
$actor_link, $revision_link);
- break;
+ break;
case DifferentialAction::ACTION_CLAIM:
$one_line = pht('%s commandeered revision %s',
$actor_link, $revision_link);
- break;
+ break;
case DifferentialAction::ACTION_REOPEN:
$one_line = pht('%s reopened revision %s',
- $actor_link, $revision_link);
- break;
+ $actor_link, $revision_link);
+ break;
case DifferentialTransaction::TYPE_INLINE:
$one_line = pht('%s added inline comments to %s',
- $actor_link, $revision_link);
- break;
+ $actor_link, $revision_link);
+ break;
default:
$one_line = pht('%s edited %s',
- $actor_link, $revision_link);
- break;
+ $actor_link, $revision_link);
+ break;
}
return $one_line;
@@ -143,71 +143,71 @@
case DifferentialAction::ACTION_COMMENT:
$one_line = pht('%s commented on revision %s %s',
$author_name, $revision_title, $revision_uri);
- break;
+ break;
case DifferentialAction::ACTION_ACCEPT:
$one_line = pht('%s accepted revision %s %s',
$author_name, $revision_title, $revision_uri);
- break;
- case DifferentialAction::ACTION_REJECT:
+ break;
+ case DifferentialAction::ACTION_CHANGE:
$one_line = pht('%s requested changes to revision %s %s',
$author_name, $revision_title, $revision_uri);
- break;
+ break;
case DifferentialAction::ACTION_RETHINK:
$one_line = pht('%s planned changes to revision %s %s',
$author_name, $revision_title, $revision_uri);
- break;
+ break;
case DifferentialAction::ACTION_ABANDON:
$one_line = pht('%s abandoned revision %s %s',
$author_name, $revision_title, $revision_uri);
- break;
+ break;
case DifferentialAction::ACTION_CLOSE:
$one_line = pht('%s closed revision %s %s',
$author_name, $revision_title, $revision_uri);
- break;
+ break;
case DifferentialAction::ACTION_REQUEST:
$one_line = pht('%s requested a review of revision %s %s',
$author_name, $revision_title, $revision_uri);
- break;
+ break;
case DifferentialAction::ACTION_RECLAIM:
$one_line = pht('%s reclaimed revision %s %s',
$author_name, $revision_title, $revision_uri);
- break;
+ break;
case DifferentialAction::ACTION_UPDATE:
$one_line = pht('%s updated revision %s %s',
$author_name, $revision_title, $revision_uri);
- break;
+ break;
case DifferentialAction::ACTION_RESIGN:
$one_line = pht('%s resigned from revision %s %s',
$author_name, $revision_title, $revision_uri);
- break;
+ break;
case DifferentialAction::ACTION_SUMMARIZE:
$one_line = pht('%s summarized revision %s %s',
$author_name, $revision_title, $revision_uri);
- break;
+ break;
case DifferentialAction::ACTION_TESTPLAN:
$one_line = pht('%s explained the test plan for revision %s %s',
$author_name, $revision_title, $revision_uri);
- break;
+ break;
case DifferentialAction::ACTION_CREATE:
$one_line = pht('%s created revision %s %s',
$author_name, $revision_title, $revision_uri);
- break;
+ break;
case DifferentialAction::ACTION_ADDREVIEWERS:
$one_line = pht('%s added reviewers to revision %s %s',
$author_name, $revision_title, $revision_uri);
- break;
+ break;
case DifferentialAction::ACTION_ADDCCS:
$one_line = pht('%s added CCs to revision %s %s',
$author_name, $revision_title, $revision_uri);
- break;
+ break;
case DifferentialAction::ACTION_CLAIM:
$one_line = pht('%s commandeered revision %s %s',
$author_name, $revision_title, $revision_uri);
- break;
+ break;
case DifferentialAction::ACTION_REOPEN:
$one_line = pht('%s reopened revision %s %s',
$author_name, $revision_title, $revision_uri);
- break;
+ break;
case DifferentialTransaction::TYPE_INLINE:
$one_line = pht('%s added inline comments to %s %s',
$author_name, $revision_title, $revision_uri);
@@ -252,86 +252,85 @@
$revision_name = $this->getHandle($revision_phid)->getFullName();
if ($implied_context) {
- $title = DifferentialAction::getBasicStoryText(
- $action, $author_name);
+ $title = DifferentialAction::getBasicStoryText($action, $author_name);
} else {
switch ($action) {
case DifferentialAction::ACTION_COMMENT:
$title = pht('%s commented on revision %s',
$author_name, $revision_name);
- break;
+ break;
case DifferentialAction::ACTION_ACCEPT:
$title = pht('%s accepted revision %s',
$author_name, $revision_name);
- break;
- case DifferentialAction::ACTION_REJECT:
+ break;
+ case DifferentialAction::ACTION_CHANGE:
$title = pht('%s requested changes to revision %s',
$author_name, $revision_name);
- break;
+ break;
case DifferentialAction::ACTION_RETHINK:
$title = pht('%s planned changes to revision %s',
$author_name, $revision_name);
- break;
+ break;
case DifferentialAction::ACTION_ABANDON:
$title = pht('%s abandoned revision %s',
$author_name, $revision_name);
- break;
+ break;
case DifferentialAction::ACTION_CLOSE:
$title = pht('%s closed revision %s',
$author_name, $revision_name);
- break;
+ break;
case DifferentialAction::ACTION_REQUEST:
$title = pht('%s requested a review of revision %s',
$author_name, $revision_name);
- break;
+ break;
case DifferentialAction::ACTION_RECLAIM:
$title = pht('%s reclaimed revision %s',
$author_name, $revision_name);
- break;
+ break;
case DifferentialAction::ACTION_UPDATE:
$title = pht('%s updated revision %s',
$author_name, $revision_name);
- break;
+ break;
case DifferentialAction::ACTION_RESIGN:
$title = pht('%s resigned from revision %s',
$author_name, $revision_name);
- break;
+ break;
case DifferentialAction::ACTION_SUMMARIZE:
$title = pht('%s summarized revision %s',
$author_name, $revision_name);
- break;
+ break;
case DifferentialAction::ACTION_TESTPLAN:
$title = pht('%s explained the test plan for revision %s',
$author_name, $revision_name);
- break;
+ break;
case DifferentialAction::ACTION_CREATE:
$title = pht('%s created revision %s',
$author_name, $revision_name);
- break;
+ break;
case DifferentialAction::ACTION_ADDREVIEWERS:
$title = pht('%s added reviewers to revision %s',
$author_name, $revision_name);
- break;
+ break;
case DifferentialAction::ACTION_ADDCCS:
$title = pht('%s added CCs to revision %s',
$author_name, $revision_name);
- break;
+ break;
case DifferentialAction::ACTION_CLAIM:
$title = pht('%s commandeered revision %s',
$author_name, $revision_name);
- break;
+ break;
case DifferentialAction::ACTION_REOPEN:
$title = pht('%s reopened revision %s',
- $author_name, $revision_name);
- break;
+ $author_name, $revision_name);
+ break;
case DifferentialTransaction::TYPE_INLINE:
$title = pht('%s added inline comments to %s',
- $author_name, $revision_name);
- break;
+ $author_name, $revision_name);
+ break;
default:
$title = pht('%s edited revision %s',
- $author_name, $revision_name);
- break;
+ $author_name, $revision_name);
+ break;
}
}
@@ -385,9 +384,7 @@
}
}
-
return $title;
}
-
}
diff --git a/src/applications/releeph/field/specification/ReleephDiffChurnFieldSpecification.php b/src/applications/releeph/field/specification/ReleephDiffChurnFieldSpecification.php
--- a/src/applications/releeph/field/specification/ReleephDiffChurnFieldSpecification.php
+++ b/src/applications/releeph/field/specification/ReleephDiffChurnFieldSpecification.php
@@ -41,7 +41,7 @@
break;
case DifferentialTransaction::TYPE_ACTION:
switch ($xaction->getNewValue()) {
- case DifferentialAction::ACTION_REJECT:
+ case DifferentialAction::ACTION_CHANGE:
$rejections++;
break;
}

File Metadata

Mime Type
text/plain
Expires
Sun, Dec 22, 1:48 AM (13 h, 58 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6916945
Default Alt Text
D9303.id.diff (25 KB)

Event Timeline