Question

We are using mercural-server for the central repository on a server and windows developers use TortoiseHg as a client. One of developers can't even clone the repository -- hg responses with "abort:" with no message.

SSH authorization is passed successfully -- using the same key on other computer is OK and i can clone the repository and make changes in it.

If i run hg --traceback clone <...> on that developer's computer i get:

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: 

The destination folder is writable. I don't even know what can be a source of a problem, because the same version of TortoiseHg (TortoiseHg 2.7.1 (with Mercurial 2.5.2)) on other windows computer and with the same repository works fine.

Était-ce utile?

La solution

In this situation, you should go to the source - hg clone https://www.mercurial-scm.org/repo/hg. Looking at sshpeer.py line 73 and the context around it, it appears the error is occurring when trying to execute the ssh call.

The most likely causes are:

  1. The developer has a messed-up ui.ssh entry in an hgrc somewhere. Possibly they've specified like:

    [ui]
    ssh = "ssh -C"
    

    instead of:

    [ui]
    ssh = ssh -C
    
  2. The developer may have specified a ui.ssh section without having appropriate ssh binaries available. By default, TortoiseHg will use PuTTY (it installs the binaries) but Mercurial will obey if you say to use something else.

If checking the above doesn't help, clone the mercurial source, modify it to display the ssh command (sshpeer ~line 73) and install it in pure mode, then try to clone. This will tell you exactly what is being called.

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>

Also, please raise a bug report at the appropriate bug tracker.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top