Mercurial 执行hg克隆时中止,无消息

Mercurial 执行hg克隆时中止,无消息,mercurial,tortoisehg,abort,Mercurial,Tortoisehg,Abort,我们使用mercural服务器作为服务器上的中央存储库,windows开发人员使用TortoiseHg作为客户端。其中一个开发人员甚至无法克隆存储库——没有消息的带有“abort:”的hg响应 SSH授权已成功通过——在其他计算机上使用相同的密钥是可以的,我可以克隆存储库并对其进行更改 如果我在开发人员的计算机上运行hg--traceback clone,我会得到: Traceback (most recent call last): File "mercurial\dispatch.pyo",

我们使用mercural服务器作为服务器上的中央存储库,windows开发人员使用TortoiseHg作为客户端。其中一个开发人员甚至无法克隆存储库——没有消息的带有“abort:”的hg响应

SSH授权已成功通过——在其他计算机上使用相同的密钥是可以的,我可以克隆存储库并对其进行更改

如果我在开发人员的计算机上运行hg--traceback clone,我会得到:

Traceback (most recent call last):
File "mercurial\dispatch.pyo", line 88, in _runcatch
File "mercurial\dispatch.pyo", line 743, in _dispatch
File "mercurial\dispatch.pyo", line 514, in runcommand
File "mercurial\dispatch.pyo", line 833, in _runcommand
File "mercurial\dispatch.pyo", line 804, in checkargs
File "mercurial\dispatch.pyo", line 740, in <lambda>
File "mercurial\util.pyo", line 475, in check
File "mercurial\commands.pyo", line 1234, in clone
File "mercurial\hg.pyo", line 267, in clone
File "mercurial\hg.pyo", line 121, in peer
File "mercurial\hg.pyo", line 101, in _peerorrepo
File "mercurial\sshpeer.pyo", line 59, in __init__
File "mercurial\sshpeer.pyo", line 73, in validate_repo
File "mercurial\util.pyo", line 137, in popen3
File "subprocess.pyo", line 679, in __init__
File "subprocess.pyo", line 896, in _execute_child
WindowsError: [Error 2]
abort: 
回溯(最近一次呼叫最后一次):
文件“mercurial\dispatch.pyo”,第88行,在runcatch中
文件“mercurial\dispatch.pyo”,第743行,在\u dispatch中
文件“mercurial\dispatch.pyo”,第514行,在runcommand中
文件“mercurial\dispatch.pyo”,第833行,在\u runcommand中
checkargs中第804行的文件“mercurial\dispatch.pyo”
文件“mercurial\dispatch.pyo”,第740行,在
检查文件“mercurial\util.pyo”,第475行
克隆中第1234行的文件“mercurial\commands.pyo”
文件“mercurial\hg.pyo”,第267行,克隆
文件“mercurial\hg.pyo”,第121行,在peer中
文件“mercurial\hg.pyo”,第101行,在
文件“mercurial\sshpeer.pyo”,第59行,在_init中__
文件“mercurial\sshpeer.pyo”,第73行,在validate\u repo中
popen3中的第137行文件“mercurial\util.pyo”
文件“subprocess.pyo”,第679行,在_init中__
文件“subprocess.pyo”,第896行,在_execute_child中
WindowsError:[错误2]
中止:

目标文件夹是可写的。我甚至不知道什么是问题的根源,因为在其他windows计算机上使用相同版本的TortoiseHg(TortoiseHg 2.7.1(含Mercurial 2.5.2))并使用相同的存储库可以正常工作。

在这种情况下,您应该转到源代码-
hg克隆https://www.mercurial-scm.org/repo/hg
。查看sshpeer.py第73行及其周围的上下文,似乎在尝试执行ssh调用时发生了错误

最可能的原因是:

  • 开发人员在某个地方的hgrc中有一个混乱的
    ui.ssh
    条目。可能他们指定了如下内容:

    [ui]
    ssh = "ssh -C"
    
    而不是:

    [ui]
    ssh = ssh -C
    
  • 开发人员可能指定了
    ui.ssh
    部分,但没有提供适当的ssh二进制文件。默认情况下,Ortoisehg将使用PuTTY(它安装二进制文件),但如果您要使用其他东西,Mercurial将服从

  • 如果检查上述内容没有帮助,请克隆mercurial源代码,将其修改为显示ssh命令(sshpeer~第73行),并以纯模式安装,然后尝试克隆。这将准确地告诉你被称为什么

    hg clone https://www.mercurial-scm.org/repo/hg
    cd hg
    <path\to\python>\python setup.py --pure install
    cd <other directory>
    <path\to\python>\Scripts\hg.bat clone <repo>
    
    hg克隆https://www.mercurial-scm.org/repo/hg
    镉汞
    \python setup.py--纯安装
    光盘
    \脚本\hg.bat克隆
    

    另外,请在适当的时间提交错误报告。

    不确定这有多大帮助,但该错误实际上是Python尝试创建子进程时引发的异常-Windows上的错误2是“找不到文件”。这暗示您是对的-ssh二进制文件不存在。感谢您的回答,至少我理解了问题的根源。我将此标记为答案,但我将在访问这些开发人员计算机后立即查看。如果这是乌龟的错,我会在他们的虫子追踪器上打开一个虫子