【问题标题】:migrate Hg to Git via “hg-fast-export.sh” in Windows 10在 Windows 10 中通过“hg-fast-export.sh”将 Hg 迁移到 Git
【发布时间】:2023-03-23 23:05:01
【问题描述】:

我已经解决了其他常见问题,但似乎可以解决我希望是最后的障碍。我已将 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 似乎并不是一个错误,我已经尝试了许多路径的变体。

【问题讨论】:

    标签: python-2.7 mercurial repository git-for-windows


    【解决方案1】:

    不确定这是否是正确的答案,但这是我修复它的方法。

    我发现我的机器上安装了多个版本的 Python。我要做的就是将它们全部卸载,然后安装 python 2.7.13。确保在安装过程中选择设置环境变量的选项。

    完成后它开始抱怨找不到位于 C:\Python27\Lib\site-packages\ 下的 mercurial 模块。这可以从https://www.mercurial-scm.org/release/windows/ 安装,确保选择与您的 mercurial 版本相对应的 ....win-amd64-py2.7.msi 文件。

    由于 sparse-revlog 依赖性,我不得不卸载 mercurial 4.6 和模块并安装 4.7.2,如此处所示。 https://www.mercurial-scm.org/wiki/MissingRequirement

    【讨论】:

      猜你喜欢
      • 2023-03-14
      • 2011-02-19
      • 1970-01-01
      • 1970-01-01
      • 2011-07-06
      • 2013-03-14
      • 1970-01-01
      • 1970-01-01
      • 2011-01-22
      相关资源
      最近更新 更多