phacility/phabricator · error · Exception
You can not abandon this revision because it has already…
Error message
You can not abandon this revision because it has already been closed. Only open revisions can be abandoned.
What it means
State-machine guard inside DifferentialRevisionAbandonTransaction::validateAction(): the abandon transaction refuses to apply when the target revision is already in a closed status (published or abandoned). Abandon is only a valid transition from an open revision, so by the time this editor validation runs the revision's status is terminal and the abandon workflow cannot proceed.
Solutions
- Verify the revision's current status on the revision page before abandoning; if it was already abandoned or published no action is needed
- If the revision was closed by landing a commit and you want further work, create a new revision instead of reopening the closed one
- If you believe the revision was closed in error, an administrator can investigate the revision transaction history to see which transaction closed it
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at src/applications/differential/xaction/DifferentialRevisionAbandonTransaction.php:60 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of phacility/phabricator@5720a38cfe (2026-08-21).
Data as JSON: /api/errors/e59bb85c882871a6.
Report an issue: GitHub.
Appendix: source
Thrown at src/applications/differential/xaction/DifferentialRevisionAbandonTransaction.php:60
return array();
}
public function getCommandSummary() {
return pht('Abandon a revision.');
}
public function generateOldValue($object) {
return $object->isAbandoned();
}
public function applyInternalEffects($object, $value) {
$status_abandoned = DifferentialRevisionStatus::ABANDONED;
$object->setModernRevisionStatus($status_abandoned);
}
protected function validateAction($object, PhabricatorUser $viewer) {
if ($object->isClosed()) {
throw new Exception(
pht(
'You can not abandon this revision because it has already been '.
'closed. Only open revisions can be abandoned.'));
}
$config_key = 'differential.always-allow-abandon';
if (!PhabricatorEnv::getEnvConfig($config_key)) {
if (!$this->isViewerRevisionAuthor($object, $viewer)) {
throw new Exception(
pht(
'You can not abandon this revision because you are not the '.
'author. You can only abandon revisions you own. You can change '.
'this behavior by adjusting the "%s" setting in Config.',
$config_key));
}
}
}
View on GitHub (pinned to 5720a38cfe)