phacility/phabricator · warning · PhutilArgumentUsageException
No commits have been discovered in the "%s" repository!
Error message
No commits have been discovered in the "%s" repository!
What it means
After loading the repository, reparse runs a DiffusionCommitQuery (optionally filtered by `--min-date` epoch range and `--importing`) and requires a non-empty commit set. A repository with zero discovered commits — or where every commit is excluded by the filters — raises this PhutilArgumentUsageException.
Source
Thrown at src/applications/repository/management/PhabricatorRepositoryManagementReparseWorkflow.php:175
pht('Unknown repository "%s"!', $all_from_repo));
}
$query = id(new DiffusionCommitQuery())
->setViewer(PhabricatorUser::getOmnipotentUser())
->withRepository($repository);
if ($min_timestamp) {
$query->withEpochRange($min_timestamp, null);
}
if ($importing) {
$query->withImporting(true);
}
$commits = $query->execute();
if (!$commits) {
throw new PhutilArgumentUsageException(
pht(
'No commits have been discovered in the "%s" repository!',
$repository->getDisplayName()));
}
} else {
$commits = $this->loadNamedCommits($reparse_what);
}
if (!$background) {
PhabricatorWorker::setRunAllTasksInProcess(true);
}
$progress = new PhutilConsoleProgressBar();
$progress->setTotal(count($commits));
$tasks = array();
foreach ($commits as $commit) {
$repository = $commit->getRepository();View on GitHub (pinned to 5720a38cfe)
Solutions
- Confirm the repository actually has commits in Diffusion (or repository_commit rows); if empty, run `./bin/repository discover R` and `./bin/repository pull R` first.
- Loosen or remove `--min-date` so the epoch range includes existing commits.
- Drop `--importing` when the repository is fully imported, since nothing will match that filter.
Example fix
# before ./bin/repository reparse --all R --importing # R fully imported already # Usage exception: No commits have been discovered in the "R" repository! # after: either discover new commits first, or target specific steps without --importing ./bin/repository discover R && ./bin/repository reparse --all R --importing ./bin/repository reparse --all R --message
Defensive patterns
Strategy: validation
Validate before calling
# Check the repository has commits (and importing ones if using --importing) first
count=$(mysql -N -B phabricator_repository -e \
"SELECT COUNT(*) FROM repository_commit WHERE repositoryID = <id>")
[ "$count" -gt 0 ] || { echo "no commits discovered yet; run discover" >&2; exit 1; }
./bin/repository discover R
./bin/repository reparse --all R --importing Prevention
- Run `discover` before `reparse --all` on newly created repositories.
- Remember `--min-date` and `--importing` are filters: if they exclude every commit, the command fails even on a populated repository.
When it happens
Trigger: `--all R` on a brand-new repository whose discovery has not run or found anything yet; `--min-date` set after the newest commit so the epoch filter excludes everything; `--importing` on a fully imported repository where nothing matches.
Common situations: Reparse immediately after creating a repository before the daemons discover commits; overly recent `--min-date` values; `--importing` used as a no-op check on finished imports.
Related errors
- Unknown commit "%s"!
- Specify a commit or repository to reparse.
- Specify a commit or repository to reparse, not both: All fro
- Choosing steps with "--importing" conflicts with flags which
- Specify which steps to reparse with "--message", "--change",
AI-assisted analysis of phacility/phabricator@5720a38cfe (2026-08-21).
Data as JSON: /api/errors/8cc786470c5e369c.
Report an issue: GitHub.