{"record":{"id":"da0aa4b431a6794f","repo":"phacility/phabricator","slug":"repository-s-has-unsupported-vcs-s","errorCode":null,"errorMessage":"Repository (\"%s\") has unsupported VCS (\"%s\").","messagePattern":"Repository \\(\"(.+?)\"\\) has unsupported VCS \\(\"(.+?)\"\\)\\.","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"src/applications/drydock/blueprint/DrydockWorkingCopyBlueprintImplementation.php","lineNumber":445,"sourceCode":"      ->execute();\n    $repositories = mpull($repositories, null, 'getPHID');\n\n    foreach ($phids as $phid) {\n      if (empty($repositories[$phid])) {\n        throw new Exception(\n          pht(\n            'Repository PHID \"%s\" does not exist.',\n            $phid));\n      }\n    }\n\n    foreach ($repositories as $repository) {\n      $repository_vcs = $repository->getVersionControlSystem();\n      switch ($repository_vcs) {\n        case PhabricatorRepositoryType::REPOSITORY_TYPE_GIT:\n          break;\n        default:\n          throw new Exception(\n            pht(\n              'Repository (\"%s\") has unsupported VCS (\"%s\").',\n              $repository->getPHID(),\n              $repository_vcs));\n      }\n    }\n\n    return $repositories;\n  }\n\n  private function loadHostLease(DrydockResource $resource) {\n    $viewer = $this->getViewer();\n\n    $lease_phid = $resource->getAttribute('host.leasePHID');\n\n    $lease = id(new DrydockLeaseQuery())\n      ->setViewer($viewer)\n      ->withPHIDs(array($lease_phid))","sourceCodeStart":427,"sourceCodeEnd":463,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/drydock/blueprint/DrydockWorkingCopyBlueprintImplementation.php#L427-L463","documentation":"Thrown by loadRepositories() in the working-copy blueprint when a repository referenced by 'repositories.map' exists but its version control system is anything other than Git (the switch only accepts PhabricatorRepositoryType::REPOSITORY_TYPE_GIT). Drydock working copies are implemented exclusively with git clone/fetch commands, so Subversion and Mercurial repositories cannot be used. The failing repository's PHID and its VCS type are included in the message.","triggerScenarios":"A lease or resource attribute maps a directory to an SVN or Mercurial repository (getVersionControlSystem() returns REPOSITORY_TYPE_SVN or REPOSITORY_TYPE_MERCURIAL). Activation calls loadRepositories(), the VCS switch falls through to default, and the exception aborts activateResource()/activateLease().","commonSituations":"A project migrates a repository from SVN to Git but automation still references the old SVN repository; a mixed Diffusion install where the lease author picked the wrong repository; lease attributes generated by a script that does not filter repositories by VCS type.","solutions":["Point the repositories.map entry at the Git mirror/counterpart of the repository and re-create the lease.","If the repository must be SVN/Mercurial, do not use the working-copy blueprint for it; run builds against it with a different mechanism or blueprint type.","Filter candidate repositories by VCS in the code that builds the map so only Git PHIDs ever reach Drydock."],"exampleFix":"// before\n$map['src']['phid'] = $svn_repository->getPHID();\n\n// after\nif ($repository->getVersionControlSystem()\n    !== PhabricatorRepositoryType::REPOSITORY_TYPE_GIT) {\n  continue;\n}\n$map['src']['phid'] = $repository->getPHID();","handlingStrategy":"type-guard","validationCode":null,"typeGuard":"function isGitRepository(PhabricatorRepository $repository) {\n  return $repository->getVersionControlSystem()\n    === PhabricatorRepositoryType::REPOSITORY_TYPE_GIT;\n}\n\n// when building repositories.map:\nforeach ($candidates as $repo) {\n  if (!isGitRepository($repo)) {\n    continue; // skip SVN/Mercurial instead of failing during activation\n  }\n  $map[$dir]['phid'] = $repo->getPHID();\n}","tryCatchPattern":null,"preventionTips":["Filter repository lists by VCS type at map-build time; only Git PHIDs belong in a working-copy map.","When migrating a repository to Git, update the map at the same time — the old SVN PHID will keep working until deletion, then fail with 540 or immediately with this error."],"tags":["drydock","phabricator","vcs","git","svn","mercurial","blueprint"],"backgroundTag":"unsupported-vcs-type","analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}