phacility/phabricator · error · Exception
No such %s '%s' in repository!
Error message
No such %s '%s' in repository!
What it means
Exception from PhabricatorMercurialGraphStream: the stream parsed hg log template output to the end without satisfying the stop condition, so the requested 'until_type'/'until_name' (for example a revision, branch head, or node) was never found. Mercurial history in the mirror does not contain the requested point the way the stream expected.
Source
Thrown at src/applications/repository/daemon/PhabricatorMercurialGraphStream.php:112
$line = trim($line);
if (!strlen($line)) {
break;
}
list($rev, $node, $date, $parents) = explode("\1", $line);
$rev = (int)$rev;
$date = (int)head(explode('.', $date));
$this->dates[$node] = $date;
$this->local[$rev] = $node;
$this->localParents[$node] = $this->parseParents($parents, $rev);
if ($this->isParsed($until_type, $until_name)) {
return;
}
}
throw new Exception(
pht(
"No such %s '%s' in repository!",
$until_type,
$until_name));
}
/**
* Parse a {parents} template, returning the local commit numbers.
*/
private function parseParents($parents, $target_rev) {
// The hg '{parents}' token is empty if there is one "natural" parent
// (predecessor local commit ID). Otherwise, it may have one or two
// parents. The string looks like this:
//
// 151:1f6c61a60586 154:1d5f799ebe1e
View on GitHub (pinned to 5720a38cfe)
Solutions
- Verify the target exists in the mirror: hg log -r '<until_name>' ; fix the caller if it does not.
- Repair the clone: re-pull (hg pull -u) or re-clone the repository so the requested rev/branch head is present.
- If revisions were stripped upstream, correct the stored expectations that reference them instead of retrying.
- Check daemon logs for interrupted pulls and ensure the working mirror matches the upstream heads (hg heads).
Defensive patterns
Strategy: try-catch
Validate before calling
// Verify the until target exists before building the stream:
list($err) = id(new ExecFuture('hg -R %s log -r %s', $path, $until_name))
->resolve();
if ($err !== 0) { /* re-clone or fix target before parsing */ } Type guard
function mercurialRevisionExists($repository_path, $rev) {
list($err) = id(new ExecFuture('hg -R %s log -r %s', $repository_path, $rev))
->resolve();
return $err === 0;
} Try / catch
try {
$stream = id(new PhabricatorMercurialGraphStream(...))
->parseLog(...);
} catch (Exception $ex) {
phlog($ex);
// repair clone (hg pull / re-clone), then requeue the discovery task
$this->yieldToDaemon();
} Prevention
- Re-pull Mercurial mirrors after strips or evolve rewrites upstream.
- Validate rev/node targets with hg log before graph parsing.
- Avoid partial clones for repositories the daemons track.
When it happens
Trigger: Constructing the Mercurial graph stream with an until target (e.g. a specific rev or node) that hg log never reaches: the rev was stripped, the branch head moved or was closed, the node hash belongs to another/older clone, or the clone is incomplete. After the parse loop exhausts output without isParsed() succeeding, it throws 'No such <type> <name> in repository!'.
Common situations: hg strip or history-rewriting extensions (evolve, MQ) removed revisions after Phabricator recorded them; partial/interrupted clones; branches closed or heads hidden; version drift where rev numbers shifted between clone and query time.
Related errors
- Commit "%s" is not a reachable ancestor of "%s".
- Commit "%s" is not a reachable ancestor of any ref.
- Unknown commit "%s"!
- Service "%s" is unrecognized, restricted, or you do not have
- When creating a new Almanac interface via the Conduit API, y
AI-assisted analysis of phacility/phabricator@5720a38cfe (2026-08-21).
Data as JSON: /api/errors/218f1455cee47264.
Report an issue: GitHub.