phacility/phabricator · info · PhutilArgumentUsageException
Path "%s" is not unknown.
Error message
Path "%s" is not unknown.
What it means
Usage error from 'bin/repository cache': the supplied --path was not found in the repository path ID map (DiffusionPathIDQuery returned no entry for it). The message wording 'is not unknown' is inverted legacy Phabricator phrasing; the actual condition is that the path IS unknown, meaning it does not exist in the normalized path table used by the graph cache, usually because it was never seen during repository import or path indexing.
Source
Thrown at src/applications/repository/management/PhabricatorRepositoryManagementCacheWorkflow.php:49
throw new PhutilArgumentUsageException(
pht(
'Specify a commit to look up with `%s`.',
'--commit'));
}
$commit = $this->loadNamedCommit($commit_name);
$path_name = $args->getArg('path');
if ($path_name === null) {
throw new PhutilArgumentUsageException(
pht(
'Specify a path to look up with `%s`.',
'--path'));
}
$path_map = id(new DiffusionPathIDQuery(array($path_name)))
->loadPathIDs();
if (empty($path_map[$path_name])) {
throw new PhutilArgumentUsageException(
pht('Path "%s" is not unknown.', $path_name));
}
$path_id = $path_map[$path_name];
$graph_cache = new PhabricatorRepositoryGraphCache();
$t_start = microtime(true);
$cache_result = $graph_cache->loadLastModifiedCommitID(
$commit->getID(),
$path_id);
$t_end = microtime(true);
$console = PhutilConsole::getConsole();
$console->writeOut(
"%s\n",
pht('Query took %s ms.', new PhutilNumber(1000 * ($t_end - $t_start))));
View on GitHub (pinned to 5720a38cfe)
Solutions
- Use the exact canonical form of the path as recorded in the repository, typically with a leading slash such as '/src/eng.cpp'
- Check the path exists at that commit with 'git ls-tree <commit> <path>'
- If the repo is newly imported, let import and path indexing finish, then retry
Example fix
# before bin/repository cache --commit abc123 --path src # after bin/repository cache --commit abc123 --path /src
Defensive patterns
Strategy: validation
Validate before calling
// Confirm the path exists in the repo before querying the cache:
list($out) = execx('git ls-tree %s -- %s', $commit, $path);
if (!trim($out)) {
// path unknown to this commit; do not invoke the cache lookup
} Prevention
- Use canonical paths with a leading slash matching Diffusion normalization
- Verify path spelling and case against the repository tree before cache lookups
- Wait for path indexing to finish on newly imported repositories
When it happens
Trigger: Passing a path that does not exist in the repository (typo, wrong case, missing leading slash); passing a path style that does not match normalization such as 'src' vs '/src'; querying before the repository paths have been imported and indexed.
Common situations: Cache debugging on a freshly imported repo whose path indexing is incomplete; path typos or platform-specific separators; Windows-derived path strings.
Related errors
- Specify a commit to look up with `%s`.
- Specify a path to look up with `%s`.
- Specify a device with --device.
- Specify a private key with --private-key.
- Specify a public key to trust with --id.
AI-assisted analysis of phacility/phabricator@5720a38cfe (2026-08-21).
Data as JSON: /api/errors/662c7a645e97f926.
Report an issue: GitHub.