{"record":{"id":"ba0d3dfff9e968c0","repo":"phacility/phabricator","slug":"only-git-and-mercurial-repositories-are-supported","errorCode":null,"errorMessage":"Only Git and Mercurial repositories are supported, unable to operate on this repository (\"%s\").","messagePattern":"Only Git and Mercurial repositories are supported, unable to operate on this repository \\(\"(.+?)\"\\)\\.","errorType":"exception","errorClass":"PhutilArgumentUsageException","httpStatus":null,"severity":"error","filePath":"src/applications/repository/management/PhabricatorRepositoryManagementMarkReachableWorkflow.php","lineNumber":52,"sourceCode":"      $this->markReachable($repo);\n    }\n\n    echo tsprintf(\n      \"%s\\n\",\n      pht(\n        'Examined %s commits already in the correct state.',\n        new PhutilNumber($this->untouchedCount)));\n\n    echo tsprintf(\n      \"%s\\n\",\n      pht('Done.'));\n\n    return 0;\n  }\n\n  private function markReachable(PhabricatorRepository $repository) {\n    if (!$repository->isGit() && !$repository->isHg()) {\n      throw new PhutilArgumentUsageException(\n        pht(\n          'Only Git and Mercurial repositories are supported, unable to '.\n          'operate on this repository (\"%s\").',\n          $repository->getDisplayName()));\n    }\n\n    $viewer = $this->getViewer();\n\n    $commits = id(new DiffusionCommitQuery())\n      ->setViewer($viewer)\n      ->withRepository($repository)\n      ->execute();\n\n    $flag = PhabricatorRepositoryCommit::IMPORTED_UNREACHABLE;\n\n    if ($repository->isGit()) {\n      $graph = new PhabricatorGitGraphStream($repository);\n    } else if ($repository->isHg()) {","sourceCodeStart":34,"sourceCodeEnd":70,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/repository/management/PhabricatorRepositoryManagementMarkReachableWorkflow.php#L34-L70","documentation":"Thrown by `bin/repository mark-reachable` inside `markReachable()` when a target repository is neither Git (`isGit()`) nor Mercurial (`isHg()`) — in practice, Subversion. The algorithm walks `DiffusionCommitQuery` results and rewrites `commitCoverage`/reachability storage whose semantics only exist for Git and Hg DAGs, so SVN is rejected before any commit processing.","triggerScenarios":"Running `./bin/repository mark-reachable R3` where R3 is an SVN repository; passing a wildcard list of all repositories that includes the SVN one — the exception aborts the run partway (repos processed before it are done).","commonSituations":"Mixed-VCS installations run reachability correction across every repo without filtering; SVN imports flagged unreachable commits and operators reach for this tool by analogy.","solutions":["Restrict the command to Git/Mercurial repositories only.","If scripting over all repos, filter out SVN first (check the repository VCS in Diffusion or via the API).","For SVN data problems, use reparse/reimport tooling instead of mark-reachable."],"exampleFix":"// before\n$ ./bin/repository mark-reachable R1 R3   # R3 is SVN\n[1175] Only Git and Mercurial repositories are supported ... (\"rR3\").\n\n// after\n$ ./bin/repository mark-reachable R1","handlingStrategy":"validation","validationCode":"# Pre-filter to git/hg only\nfor r in R1 R3; do vcs=$(./bin/repository list --output json | jq -r --arg r \"$r\" '.[] | select(.callsign==$r) | .vcs'); { [ \"$vcs\" = git ] || [ \"$vcs\" = hg ]; } && ./bin/repository mark-reachable \"$r\"; done","typeGuard":"function is_reachable_capable(PhabricatorRepository $repository): bool {\n  return $repository->isGit() || $repository->isHg();\n}","tryCatchPattern":null,"preventionTips":["Exclude SVN repositories from mark-reachable target lists.","Process repositories one per invocation in scripts so one bad target cannot abort a batch mid-run."],"tags":["phabricator","phorge","cli","svn","vcs-type","reachability","precondition"],"backgroundTag":"unsupported-repository-type","analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}