{"record":{"id":"750c4592ec96f622","repo":"phacility/phabricator","slug":"this-repository-s-is-not-a-mercurial-reposito","errorCode":null,"errorMessage":"This repository (\"%s\") is not a Mercurial repository. Use \"%s\" to interact with this repository.","messagePattern":"This repository \\(\"(.+?)\"\\) is not a Mercurial repository\\. Use \"(.+?)\" to interact with this repository\\.","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"src/applications/diffusion/ssh/DiffusionMercurialServeSSHWorkflow.php","lineNumber":109,"sourceCode":"      $cmds = idx($message['arguments'], 'cmds');\n      if (DiffusionMercurialWireProtocol::isReadOnlyBatchCommand($cmds)) {\n        $is_readonly = true;\n      }\n    } else if (DiffusionMercurialWireProtocol::isReadOnlyCommand($command)) {\n      $is_readonly = true;\n    }\n\n    if (!$is_readonly) {\n      $this->requireWriteAccess();\n      $this->didSeeWrite = true;\n    }\n\n    return $message['raw'];\n  }\n\n  protected function raiseWrongVCSException(\n    PhabricatorRepository $repository) {\n    throw new Exception(\n      pht(\n        'This repository (\"%s\") is not a Mercurial repository. Use \"%s\" to '.\n        'interact with this repository.',\n        $repository->getDisplayName(),\n        $repository->getVersionControlSystem()));\n  }\n\n}\n","sourceCodeStart":91,"sourceCodeEnd":118,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/diffusion/ssh/DiffusionMercurialServeSSHWorkflow.php#L91-L118","documentation":"Mirror of the Git guard: DiffusionMercurialServeSSHWorkflow raises this when the repository resolved from the SSH path exists but is not a Mercurial repository; the message names the repository's actual VCS so the correct client can be used.","triggerScenarios":"Running hg clone ssh://<user>@<host>/diffusion/<CALLSIGN>/ against a Git or Subversion repository.","commonSituations":"Wrong clone URL copied from a Git repository; repository VCS type misconfigured at creation time.","solutions":["Use the client matching the repository (git or svn) with the URI shown on the repository page","Fix the repository's VCS setting if it was created wrong (only sensible before import)"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Confirm VCS matches before launching the Mercurial SSH workflow\nif ($repository->getVersionControlSystem() !==\n    PhabricatorRepositoryType::REPOSITORY_TYPE_MERCURIAL) {\n  // tell the client to use the VCS-appropriate tool\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Copy clone URIs from the repository's Diffusion page","Verify the VCS type setting when creating repositories","Remember hg SSH paths look identical to git ones — the repo decides the client"],"tags":["mercurial","ssh","vcs-mismatch"],"backgroundTag":"wrong-vcs-protocol","analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}