python-2.7 - 在 Windows 10 中通过“hg-fast-export.sh”将 Hg 迁移到 Git
问题描述
我已经解决了其他常见问题,但似乎可以解决我希望是最后的障碍。我已将 Python 和 hg-fast-export 位置添加到我的路径“C:\Python27”和“C:\fast-Export”
我发出命令$ hg-fast-export.sh -r /c/tmp/hg-repo
并得到这个:
/c/fast-export/hg-fast-export.sh: line 198: C:\Python27: Is a directory
git-fast-import statistics:
---------------------------------------------------------------------
Alloc'd objects: 5000
Total objects: 0 ( 0 duplicates )
blobs : 0 ( 0 duplicates 0 deltas of 0 attempts)
trees : 0 ( 0 duplicates 0 deltas of 0 attempts)
commits: 0 ( 0 duplicates 0 deltas of 0 attempts)
tags : 0 ( 0 duplicates 0 deltas of 0 attempts)
Total branches: 0 ( 0 loads )
marks: 1024 ( 0 unique )
atoms: 0
Memory total: 2360 KiB
pools: 2048 KiB
objects: 312 KiB
---------------------------------------------------------------------
pack_report: getpagesize() = 65536
pack_report: core.packedGitWindowSize = 1073741824
pack_report: core.packedGitLimit = 35184372088832
pack_report: pack_used_ctr = 0
pack_report: pack_mmap_calls = 0
pack_report: pack_open_windows = 0 / 0
pack_report: pack_mapped = 0 / 0
---------------------------------------------------------------------
我在脚本的第 198 行没有找到任何线索。 C:\Python27: Is a directory
似乎并不是一个错误,我已经尝试了许多路径的变体。
解决方案
Not sure if this is the correct answer but here is how I fixed it.
I found that I had multiple versions of Python installed on my machine. I had to do was uninstall them all and then install python 2.7.13. Make sure to select the option to set-up environment variables during installation.
Once done it started complaining that it couldn't find the mercurial modules which sit under C:\Python27\Lib\site-packages\. This can be installed from https://www.mercurial-scm.org/release/windows/ make sure you select the ....win-amd64-py2.7.msi file corresponding to your mercurial version.
I had to uninstall mercurial 4.6 and the modules and install 4.7.2 due to sparse-revlog dependency as shown here. https://www.mercurial-scm.org/wiki/MissingRequirement
推荐阅读
- python - 变量和 PCA 的去相关
- javascript - Webpack 5.3.1 TypeError:Object.getOwnPropertyDescriptors 不是函数
- .net-core - 如何排除程序集被打包到 PublishSingleFile 应用程序中
- c# - 如何更改 IdentityServer OIDC 发现端点基本 URL?
- python - 从图片 PILLOW 中删除选定区域
- python - 创建域名和ips到字节的文件
- python - 根据值转换python列表中的值
- reactjs - useEffect() 触发组件在一个函数中重新呈现,但不在另一个函数中。两个函数都改变状态。我错过了什么?
- python - 为什么我的不和谐机器人代码没有运行任何东西?
- visual-studio-code - Visual Studio Code 中的多个 SSH 连接