{"record":{"id":"218f1455cee47264","repo":"phacility/phabricator","slug":"no-such-s-s-in-repository","errorCode":null,"errorMessage":"No such %s '%s' in repository!","messagePattern":"No such (.+?) '(.+?)' in repository!","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"src/applications/repository/daemon/PhabricatorMercurialGraphStream.php","lineNumber":112,"sourceCode":"      $line = trim($line);\n      if (!strlen($line)) {\n        break;\n      }\n      list($rev, $node, $date, $parents) = explode(\"\\1\", $line);\n\n      $rev  = (int)$rev;\n      $date = (int)head(explode('.', $date));\n\n      $this->dates[$node]        = $date;\n      $this->local[$rev]         = $node;\n      $this->localParents[$node] = $this->parseParents($parents, $rev);\n\n      if ($this->isParsed($until_type, $until_name)) {\n        return;\n      }\n    }\n\n    throw new Exception(\n      pht(\n        \"No such %s '%s' in repository!\",\n        $until_type,\n        $until_name));\n  }\n\n\n  /**\n   * Parse a {parents} template, returning the local commit numbers.\n   */\n  private function parseParents($parents, $target_rev) {\n\n    // The hg '{parents}' token is empty if there is one \"natural\" parent\n    // (predecessor local commit ID). Otherwise, it may have one or two\n    // parents. The string looks like this:\n    //\n    //  151:1f6c61a60586 154:1d5f799ebe1e\n","sourceCodeStart":94,"sourceCodeEnd":130,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/repository/daemon/PhabricatorMercurialGraphStream.php#L94-L130","documentation":"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.","triggerScenarios":"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!'.","commonSituations":"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.","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)."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// Verify the until target exists before building the stream:\nlist($err) = id(new ExecFuture('hg -R %s log -r %s', $path, $until_name))\n  ->resolve();\nif ($err !== 0) { /* re-clone or fix target before parsing */ }","typeGuard":"function mercurialRevisionExists($repository_path, $rev) {\n  list($err) = id(new ExecFuture('hg -R %s log -r %s', $repository_path, $rev))\n    ->resolve();\n  return $err === 0;\n}","tryCatchPattern":"try {\n  $stream = id(new PhabricatorMercurialGraphStream(...))\n    ->parseLog(...);\n} catch (Exception $ex) {\n  phlog($ex);\n  // repair clone (hg pull / re-clone), then requeue the discovery task\n  $this->yieldToDaemon();\n}","preventionTips":["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."],"tags":["php","phabricator","mercurial","repository-daemon","missing-revision"],"backgroundTag":"unreachable-commit","analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}