gpt4 book ai didi

git - 将 Mercurial 存储库推送到 Git 存储库时出现 "abort: No module named selectors!"

转载 作者:太空狗 更新时间:2023-10-29 14:21:36 24 4
gpt4 key购买 nike

我正在尝试将 Hg 存储库转换为 Git 存储库。两者都是私有(private)存储库。

我已执行以下步骤 ( reference ):

  • 第 1 步:设置存储库

  • 第 2 步:安装 Mercurial hggit 插件

  • 第 3 步:将代码推送到 Git 存储库

  • 第 4 步:将本地存储库切换为使用 Git

我已经安装了先决条件,即。 hg-git插件并更新了需要转换的仓库的.hgrc文件。

推送存储库时出现错误( hg push [Git repo path] )是“中止:没有名为选择器的模块!”

我使用了 --traceback 选项,请在下面找到日志:

E:\BK_Hg\testHg>hg push --traceback https://CJbipin@bitbucket.org/CJbipin/testgit2.git
pushing to https://CJbipin@bitbucket.org/CJbipin/testgit2.git
Traceback (most recent call last):
File "mercurial\scmutil.pyo", line 161, in callcatch
File "mercurial\dispatch.pyo", line 344, in _runcatchfunc
File "mercurial\dispatch.pyo", line 984, in _dispatch
File "mercurial\dispatch.pyo", line 730, in runcommand
File "mercurial\dispatch.pyo", line 992, in _runcommand
File "mercurial\dispatch.pyo", line 981, in <lambda>
File "mercurial\util.pyo", line 1528, in check
File "mercurial\commands.pyo", line 4369, in push
File "E:/hg-git\hggit\util.py", line 60, in inner
File "E:/hg-git\hggit\__init__.py", line 414, in exchangepush
File "E:/hg-git\hggit\git_handler.py", line 405, in push
File "E:/hg-git\hggit\git_handler.py", line 1063, in upload_pack
File "E:/hg-git\hggit\git_handler.py", line 1749, in get_transport_and_path
File "dulwich\client.pyo", line 1330, in __init__
File "dulwich\client.pyo", line 1304, in default_urllib3_manager
File "hgdemandimport\demandimportpy2.pyo", line 167, in _demandimport
File "hgdemandimport\demandimportpy2.pyo", line 41, in _hgextimport
File "urllib3\__init__.pyo", line 8, in <module>
File "hgdemandimport\demandimportpy2.pyo", line 243, in _demandimport
File "hgdemandimport\demandimportpy2.pyo", line 41, in _hgextimport
File "urllib3\connectionpool.pyo", line 29, in <module>
File "hgdemandimport\demandimportpy2.pyo", line 243, in _demandimport
File "hgdemandimport\demandimportpy2.pyo", line 41, in _hgextimport
File "urllib3\connection.pyo", line 39, in <module>
File "hgdemandimport\demandimportpy2.pyo", line 243, in _demandimport
File "hgdemandimport\demandimportpy2.pyo", line 41, in _hgextimport
File "urllib3\util\__init__.pyo", line 3, in <module>
File "hgdemandimport\demandimportpy2.pyo", line 243, in _demandimport
File "hgdemandimport\demandimportpy2.pyo", line 41, in _hgextimport
File "urllib3\util\connection.pyo", line 3, in <module>
File "hgdemandimport\demandimportpy2.pyo", line 243, in _demandimport
File "hgdemandimport\demandimportpy2.pyo", line 41, in _hgextimport
File "urllib3\util\wait.pyo", line 1, in <module>
File "hgdemandimport\demandimportpy2.pyo", line 243, in _demandimport
File "hgdemandimport\demandimportpy2.pyo", line 41, in _hgextimport
ImportError: No module named selectors
abort: No module named selectors!

问候比平·库马尔

最佳答案

因为即使在发布的 THG 5.0.2 中捆绑的 hg-git 仍然有同样的问题:

THG 5 解决方案的详细步骤

懒人快速方式

  • comment in BB's issue 下载 THG 4.9.1 的补丁完整 lib
  • 用上述库中的补丁版本替换 THG 库存档中的 dulwich + urllib3
  • 如果在尝试克隆 git-repo 后引发“urllib3.exceptions.MaxRetryError”错误,则删除 certifi 或使用补丁中的 certifi

更长更纯的路

  • 解压 library.zip
  • 用 1.24.1 替换 urllib3(下载、编译、替换旧的 *.pyo)
  • 用来自 https://github.com/dulwich/dulwich/ 的相同内容替换 dulwich , 最新0.19.11, (下载,编译,替换旧的*.pyo)
  • 我们没有替换 hg-git,因为捆绑的 hggit 包含最新的 Mercurial 5 兼容性修复(而 dmitriyse 的版本还没有)
  • 删除证书
  • 重新打包库

关于git - 将 Mercurial 存储库推送到 Git 存储库时出现 "abort: No module named selectors!",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56405634/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com