phacility/phabricator · error · Exception

You can not commandeer this revision because it has already…

Error message

You can not commandeer this revision because it has already been closed. You can only commandeer open or abandoned revisions.

What it means

State guard inside DifferentialRevisionCommandeerTransaction::validateAction(): commandeer is refused because the revision is closed and not abandoned (isClosed && !isAbandoned), i.e. it was published/landed. The comments explain the policy: landed revisions should not be reopened and reused (users should create a new revision), but abandoned revisions are explicitly exempted (PHI985) because the change likely never landed, so commandeer remains available for them.

Solutions

  1. If the revision was abandoned, commandeer is allowed; verify the status shown on the revision page
  2. For landed (published) revisions, create a new revision for further work instead of commandeering the closed one
  3. If the revision closed erroneously, address the closure (e.g. repository discovery issue) before attempting to commandeer
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at src/applications/differential/xaction/DifferentialRevisionCommandeerTransaction.php:75 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/2fede878fafc5cf3. Report an issue: GitHub.

Appendix: source

Thrown at src/applications/differential/xaction/DifferentialRevisionCommandeerTransaction.php:75

    return $actor->getPHID();
  }

  public function applyInternalEffects($object, $value) {
    $object->setAuthorPHID($value);
  }

  protected function validateAction($object, PhabricatorUser $viewer) {
    // If a revision has already landed, we generally want to discourage
    // reopening and reusing it since this tends to create a big mess (users
    // should create a new revision instead). Thus, we stop you from
    // commandeering closed revisions.

    // See PHI985. If the revision was abandoned, there's no peril in allowing
    // the commandeer since the change (likely) never actually landed. So
    // it's okay to commandeer abandoned revisions.

    if ($object->isClosed() && !$object->isAbandoned()) {
      throw new Exception(
        pht(
          'You can not commandeer this revision because it has already '.
          'been closed. You can only commandeer open or abandoned '.
          'revisions.'));
    }

    if ($this->isViewerRevisionAuthor($object, $viewer)) {
      throw new Exception(
        pht(
          'You can not commandeer this revision because you are already '.
          'the author.'));
    }
  }

  public function getTitle() {
    return pht(
      '%s commandeered this revision.',
      $this->renderAuthor());

View on GitHub (pinned to 5720a38cfe)