phacility/phabricator · warning · Exception

Declining to apply changes.

Error message

Declining to apply changes.

What it means

Thrown by `bin/repository move-paths` after it draws the table of proposed `localPath` rewrites: `phutil_console_confirm('Apply these changes?')` returned false — the operator answered 'n' at the prompt (or input was non-affirmative). It is an intentional abort before the `UPDATE %T SET localPath = ...` writes, so no repository rows were modified.

Source

Thrown at src/applications/repository/management/PhabricatorRepositoryManagementMovePathsWorkflow.php:128

        array(
          'action',
          'monogram',
          'src',
          'dst',
        ));
      $table->addRow($display);
    }

    $table->draw();

    if (!$any_changes) {
      $console->writeOut(pht('No matching repositories.')."\n");
      return 0;
    }

    $prompt = pht('Apply these changes?');
    if (!$is_force && !phutil_console_confirm($prompt)) {
      throw new Exception(pht('Declining to apply changes.'));
    }

    foreach ($rows as $row) {
      if (empty($row['move'])) {
        continue;
      }

      $repo = $row['repository'];

      queryfx(
        $repo->establishConnection('w'),
        'UPDATE %T SET localPath = %s WHERE id = %d',
        $repo->getTableName(),
        $row['dst'],
        $repo->getID());
    }

    $console->writeOut(pht('Applied changes.')."\n");

View on GitHub (pinned to 5720a38cfe)

Solutions

  1. Fix whatever looked wrong in the preview table (--from/--to prefixes) and re-run, answering 'y'.
  2. For unattended runs, pass `--force` to skip the prompt — only after verifying the prefixes.
  3. If nothing needed changing, this abort is the correct outcome — verify with the 'No matching repositories.' path.

Example fix

// before
$ ./bin/repository move-paths --from /var/repos --to /srv/repos
Apply these changes? [y/N] n
[1179] Declining to apply changes.

// after
$ ./bin/repository move-paths --from /var/repos --to /srv/repos --force   # unattended, prefixes verified
Defensive patterns

Strategy: validation

Validate before calling

# Unattended/verified run: skip the interactive prompt deliberately
./bin/repository move-paths --from "$FROM" --to "$TO" --force

Prevention

When it happens

Trigger: Answering 'n' (or anything not starting with y) at the 'Apply these changes?' prompt; running interactively and dismissing the prompt; EOF/non-TTY input that fails to confirm affirmatively.

Common situations: Operators review the preview table, spot a wrong prefix, and decline; automated runs where stdin is not a TTY and confirm defaults to no.

Related errors


AI-assisted analysis of phacility/phabricator@5720a38cfe (2026-08-21). Data as JSON: /api/errors/1603cf83f8e0ad24. Report an issue: GitHub.