phacility/phabricator · warning · PhutilArgumentUsageException

Specify a commit or repository to reparse.

Error message

Specify a commit or repository to reparse.

What it means

`bin/repository reparse` needs a subject: either `--all <repository>` (every commit in a repository) or one or more commit identifiers as wildcard arguments (`$reparse_what`). If neither is supplied the workflow has nothing to reparse and exits immediately with this PhutilArgumentUsageException.

Source

Thrown at src/applications/repository/management/PhabricatorRepositoryManagementReparseWorkflow.php:95

        ));

  }

  public function execute(PhutilArgumentParser $args) {
    $console = PhutilConsole::getConsole();

    $all_from_repo = $args->getArg('all');
    $reparse_message = $args->getArg('message');
    $reparse_change = $args->getArg('change');
    $reparse_publish = $args->getArg('publish');
    $reparse_what = $args->getArg('revision');
    $force = $args->getArg('force');
    $background = $args->getArg('background');
    $min_date = $args->getArg('min-date');
    $importing = $args->getArg('importing');

    if (!$all_from_repo && !$reparse_what) {
      throw new PhutilArgumentUsageException(
        pht('Specify a commit or repository to reparse.'));
    }

    if ($all_from_repo && $reparse_what) {
      $commits = implode(', ', $reparse_what);
      throw new PhutilArgumentUsageException(
        pht(
          "Specify a commit or repository to reparse, not both:\n".
          "All from repo: %s\n".
          "Commit(s) to reparse: %s",
          $all_from_repo,
          $commits));
    }

    $any_step = ($reparse_message || $reparse_change || $reparse_publish);

    if ($any_step && $importing) {
      throw new PhutilArgumentUsageException(

View on GitHub (pinned to 5720a38cfe)

Solutions

  1. Name the subject: `./bin/repository reparse --all R` for a whole repository, or `./bin/repository reparse <commit-identifier> ...` (accepts monograms/identifiers resolvable by loadNamedCommits).
  2. Review `./bin/repository reparse --help` to pair subject flags with step flags.

Example fix

# before
./bin/repository reparse --message
# Usage exception: Specify a commit or repository to reparse.

# after
./bin/repository reparse Rabc1234 --message
# or the whole repository
./bin/repository reparse --all R --message
Defensive patterns

Strategy: validation

Validate before calling

# Require a subject (commits or --all) before invoking reparse
[ $#commits -gt 0 ] || [ -n "$ALL" ] || { echo "reparse needs commits or --all" >&2; exit 2; }
./bin/repository reparse ${ALL:+--all "$ALL"} "$@" --message

Prevention

When it happens

Trigger: Bare `./bin/repository reparse` invocation, or one that only carries step flags like `--message` / `--change` / `--publish` without naming a commit or repository.

Common situations: Operators discovering the command and trying step flags alone; scripts that assemble the commit list dynamically and pass none.

Related errors


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