phacility/phabricator · error · Exception
This repository ("%s") is not a Mercurial repository. Use "%
Error message
This repository ("%s") is not a Mercurial repository. Use "%s" to interact with this repository. What it means
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.
Source
Thrown at src/applications/diffusion/ssh/DiffusionMercurialServeSSHWorkflow.php:109
$cmds = idx($message['arguments'], 'cmds');
if (DiffusionMercurialWireProtocol::isReadOnlyBatchCommand($cmds)) {
$is_readonly = true;
}
} else if (DiffusionMercurialWireProtocol::isReadOnlyCommand($command)) {
$is_readonly = true;
}
if (!$is_readonly) {
$this->requireWriteAccess();
$this->didSeeWrite = true;
}
return $message['raw'];
}
protected function raiseWrongVCSException(
PhabricatorRepository $repository) {
throw new Exception(
pht(
'This repository ("%s") is not a Mercurial repository. Use "%s" to '.
'interact with this repository.',
$repository->getDisplayName(),
$repository->getVersionControlSystem()));
}
}
View on GitHub (pinned to 5720a38cfe)
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)
Defensive patterns
Strategy: validation
Validate before calling
// Confirm VCS matches before launching the Mercurial SSH workflow
if ($repository->getVersionControlSystem() !==
PhabricatorRepositoryType::REPOSITORY_TYPE_MERCURIAL) {
// tell the client to use the VCS-appropriate tool
} Prevention
- 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
When it happens
Trigger: Running hg clone ssh://<user>@<host>/diffusion/<CALLSIGN>/ against a Git or Subversion repository.
Common situations: Wrong clone URL copied from a Git repository; repository VCS type misconfigured at creation time.
Related errors
- Unknown Mercurial command "%s"!
- This repository ("%s") is not a Git repository. Use "%s" to
- Expected `%s`!
- This public key is already associated with another user or d
- Analyzing or decrypting SSH keys requires the "ssh-keygen" b
AI-assisted analysis of phacility/phabricator@5720a38cfe (2026-08-21).
Data as JSON: /api/errors/750c4592ec96f622.
Report an issue: GitHub.