{
  "id": "pip/mercurial-clone-fail",
  "signature": "ERROR: Command errored out with exit status 255: hg clone 'https://hg.example.com/package' /tmp/pip-req-build-xxxxx",
  "signature_zh": "错误：命令以退出状态 255 失败：hg clone 'https://hg.example.com/package' /tmp/pip-req-build-xxxxx",
  "regex": "ERROR: Command errored out with exit status 255: hg clone.*?/tmp/pip-req-build-",
  "domain": "pip",
  "category": "install_error",
  "subcategory": null,
  "root_cause": "pip fails to clone a Mercurial (hg) repository because the build dependency is specified as a VCS URL with hg+ scheme but the Mercurial client is not installed or the repository URL is incorrect.",
  "root_cause_type": "generic",
  "root_cause_zh": "pip 无法克隆 Mercurial (hg) 仓库，因为构建依赖被指定为 hg+ 方案的 VCS URL，但未安装 Mercurial 客户端或仓库 URL 不正确。",
  "versions": [
    {
      "version": "pip 23.2",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "pip 24.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "pip 24.1",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Mercurial 6.5",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Mercurial 6.6",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Running pip install with --no-clean does not fix the missing hg client; it only preserves the partial clone directory for debugging.",
      "fail_rate": 0.95,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Using pip install --force-reinstall does not install the Mercurial client; it only re-downloads packages without addressing the missing VCS tool.",
      "fail_rate": 0.98,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Setting PIP_REQUIRE_VIRTUALENV=true does not bypass the hg clone issue; virtual environment activation is unrelated.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Install Mercurial client via system package manager: sudo apt-get install mercurial (Debian/Ubuntu) or brew install mercurial (macOS). Then retry pip install.",
      "success_rate": 0.95,
      "how": "Install Mercurial client via system package manager: sudo apt-get install mercurial (Debian/Ubuntu) or brew install mercurial (macOS). Then retry pip install.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Use a published wheel or tarball instead of the VCS URL: pip install package --no-index --find-links https://pypi.org/simple/",
      "success_rate": 0.8,
      "how": "Use a published wheel or tarball instead of the VCS URL: pip install package --no-index --find-links https://pypi.org/simple/",
      "condition": "",
      "sources": []
    },
    {
      "action": "Switch to a Git mirror if available: pip install git+https://github.com/user/package.git",
      "success_rate": 0.85,
      "how": "Switch to a Git mirror if available: pip install git+https://github.com/user/package.git",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "Install Mercurial client via system package manager: sudo apt-get install mercurial (Debian/Ubuntu) or brew install mercurial (macOS). Then retry pip install.",
    "Use a published wheel or tarball instead of the VCS URL: pip install package --no-index --find-links https://pypi.org/simple/",
    "Switch to a Git mirror if available: pip install git+https://github.com/user/package.git"
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://pip.pypa.io/en/stable/topics/vcs-support/",
  "official_doc_section": null,
  "error_code": "ERROR",
  "verification_tier": "ai_generated",
  "confidence": 0.85,
  "fix_success_rate": 0.88,
  "resolvable": "true",
  "first_seen": "2024-03-12",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}