python - TortoiseHg (Mercurial) 找不到 hggit 扩展

标签 python mercurial tortoisehg hg-git

我正在尝试让 hg-git 扩展与 TortoiseHg(Win10 上的 v5.8)一起使用。我在设置中启用了“hggit”扩展。但是当我尝试推送到 github 时出现错误:

*** failed to import extension hggit: No module named hggit
搜索我的驱动器时,我只有 TortoiseHg 目录中的 hg 可执行文件,但找不到任何 hggit 或 hg-git 二进制文件。是否还需要做其他事情才能使扩展正常工作?

最佳答案

显然目前 THG 可以选择在设置中包含 hggit,但实际上并没有打包 hggit 本身。
According to Matt Harbison , TortoiseHG 的贡献者/维护者之一:

I took [hggit] out because it was always lagging behind changes in core hg, and its dependencies broke stuff.


他接着补充说:

install by simply running py -2 -m pip install hg-git --user if you have python2 installed on your system.


另一个人 (Aurélien Campéas) states the following使用 Python 3:

with python 3 and a plain "pip install mercurial hg-git" and it just works



此外,Keith Turkowski 的另一篇文章 describes a full installation THG 和 hggit 在 Windows 上使用 Python3:
  • Install python-3.9.2-amd64.exe (if you want to use Python 3 and have Python.exe in the path)

  • Install putty-0.74-installer.msi (for SSH support)

  • Install tortoisehg-5.7.0-x64.msi

  • Install python-2.7.18.amd64.msi (For current user, Python.exe not in path)

  • Win+R -> cmd (command prompt): py -2 -m pip install hg-git --user

  • Enable hggit in TortoiseHg Settings (Extensions)


我假设您可以使用更新版本的 THG、Python 等安装程序。

关于python - TortoiseHg (Mercurial) 找不到 hggit 扩展,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67859068/

相关文章:

version-control - 想在 TortoiseHG/Mercurial 中为我的 .hgignore 文件创建一些默认值

mercurial - 如何使用 Mercurial 解决 'unknown repository format: requires features ' largefiles'(升级 Mercurial)'错误?

Python矩阵: Value not in list error

python - 如何在 matplotlib 动画上添加图例?

python - 建议的字符串比较时间复杂度

python - 用于生成 anagrams 列表的递归 Python 函数

python-2.7 - 使用 Python 为 Mercurial (hg) 扩展编写性能测试的方法

mercurial - 与多个开发人员一起拉动和处理 Mercurial 存储库

mercurial - 命名以前未命名的分支

mercurial - hg 显示已修改但未更改的文件,为什么会这样?