Mercurial克隆失败:找不到\ .hg

时间:2011-12-01 20:33:12

标签: mercurial clone tortoisehg

我是Mercurial的新手,刚刚在Windows XP上安装了TortoiseHg,我正在尝试将我的(新)repo克隆到我们本地linux服务器上的映射网络驱动器上。我成功地克隆到了一个本地文件夹,但当我做了类似的事情时:

hg clone -U Repo Y:\repo_clone

我收到错误:

The system cannot find the file specified: Y:\repo_clone\.hg

如果我尝试在服务器上执行init,并且不管我使用的克隆地址(例如\\ linuxserver),都会出现相同的错误。这里发生了什么? \ .hg文件夹确实存在于原始仓库中,我确实拥有该驱动器的权限。我找不到任何类似的问题,所以也许这与我的本地网络有关?任何想法都表示赞赏!

这是hg init的追溯:

Y:\>hg init --debug --traceback Y:\Repo_clone
Traceback (most recent call last):
  File "mercurial\dispatch.pyo", line 87, in _runcatch
  File "mercurial\dispatch.pyo", line 684, in _dispatch
  File "mercurial\dispatch.pyo", line 466, in runcommand
  File "mercurial\dispatch.pyo", line 738, in _runcommand
  File "mercurial\dispatch.pyo", line 692, in checkargs
  File "mercurial\dispatch.pyo", line 681, in <lambda>
  File "mercurial\util.pyo", line 454, in check
  File "mercurial\commands.pyo", line 3659, in init
  File "mercurial\hg.pyo", line 104, in peer
  File "mercurial\hg.pyo", line 93, in repository
  File "mercurial\localrepo.pyo", line 2098, in instance
  File "mercurial\localrepo.pyo", line 50, in __init__
  File "mercurial\win32.pyo", line 450, in makedir
WindowsError: [Error 2] The system cannot find the file specified: 'Y:\\Repo_clone\\.hg'
abort: The system cannot find the file specified: Y:\Repo_clone\.hg

1 个答案:

答案 0 :(得分:0)

我没有使用DEST中的hg clone选项,但documentation说明了这一点:

  

仅支持本地路径和ssh:// URL作为目标。对于ssh:// destinations,将不会在远程端创建工作目录或.hg / hgrc。

由于Y:\实际上不是本地驱动器,因此可能是问题的根源。您是否尝试登录服务器并在本地运行hg inithg clone