Differential D18415 Diff 44259 src/applications/differential/xaction/DifferentialRevisionReclaimTransaction.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/differential/xaction/DifferentialRevisionReclaimTransaction.php
| Show First 20 Lines • Show All 41 Lines • ▼ Show 20 Lines | public function getCommandSummary() { | ||||
| return pht('Reclaim a revision.'); | return pht('Reclaim a revision.'); | ||||
| } | } | ||||
| public function generateOldValue($object) { | public function generateOldValue($object) { | ||||
| return !$object->isAbandoned(); | return !$object->isAbandoned(); | ||||
| } | } | ||||
| public function applyInternalEffects($object, $value) { | public function applyInternalEffects($object, $value) { | ||||
| $object->setStatus(ArcanistDifferentialRevisionStatus::NEEDS_REVIEW); | $status_review = DifferentialRevisionStatus::NEEDS_REVIEW; | ||||
| $object->setModernRevisionStatus($status_review); | |||||
| } | } | ||||
| protected function validateAction($object, PhabricatorUser $viewer) { | protected function validateAction($object, PhabricatorUser $viewer) { | ||||
| if (!$object->isAbandoned()) { | if (!$object->isAbandoned()) { | ||||
| throw new Exception( | throw new Exception( | ||||
| pht( | pht( | ||||
| 'You can not reclaim this revision because it has not been '. | 'You can not reclaim this revision because it has not been '. | ||||
| 'abandoned. Only abandoned revisions can be reclaimed.')); | 'abandoned. Only abandoned revisions can be reclaimed.')); | ||||
| Show All 24 Lines | |||||