2011-12-01 91 views
1

我是Mercurial的新手,刚在Windows XP上安装了TortoiseHg,我试图将我的(新)回购克隆到我们本地linux服务器上的映射网络驱动器上。我成功地克隆到本地文件夹,但是当我做这样的事情:水银克隆失败:找不到 .hg

hg clone -U Repo Y:\repo_clone 

我得到的错误:

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

同样的错误,如果我尝试汞初始化的服务器上,而不管我使用的克隆地址(例如\\ linuxserver)。这里发生了什么? \ .hg文件夹确实存在于原始仓库中,并且我对该驱动器有权限。我找不到任何类似的问题,所以也许这与我的本地网络有关?任何想法都很感激!

下面是对汞的init回溯:我没有用在hg cloneDEST选项

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 
+0

我试过这与我目前的环境,它的工作原理。您是否有写入Y:\的权限,包括创建新文件夹的权限? –

回答

0

,但documentation这样说:

Only local paths and ssh:// URLs are supported as destinations. For ssh:// destinations, no working directory or .hg/hgrc will be created on the remote side.

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

+0

这就是我最初的想法:问题是Y:\实际上并不是本地驱动器。但也有其他例子成功克隆到网络驱动器,例如[这个关于克隆的问题](http://stackoverflow.com/questions/4504573/whats-the-best-strategy-for-automatically-cloning-a-repo-to-a-network-drive)或者有点相关,[这个问题关于移动回购](http://stackoverflow.com/questions/6203424/can-i-move-my-mercurial-working-directory-to-another-location),所以我不相信这是问题。 .. –

+0

谢谢大家,事实证明,我们有一个服务器设置,不允许以'。'开头的文件名。 (所以“.hg”是不允许的)。此设置已被修改,现在克隆没有问题。与Mercurial无关! –

+0

很高兴你能弄明白! – recf