Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/mercurial/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/216.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Mercurial克隆失败:找不到\.hg_Mercurial_Clone_Tortoisehg - Fatal编程技术网

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

Mercurial克隆失败:找不到\.hg,mercurial,clone,tortoisehg,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 如果我尝试在服务器上使用hg init,并且不考虑我使用的克隆地址(例如\\li

我是Mercurial的新手,刚刚在Windows XP上安装了TortoiseHg,我正在尝试将我的(新的)repo克隆到本地linux服务器上的映射网络驱动器。我成功地克隆到本地文件夹,但当我执行以下操作时:

hg clone -U Repo Y:\repo_clone
我得到一个错误:

The system cannot find the file specified: Y:\repo_clone\.hg
如果我尝试在服务器上使用hg init,并且不考虑我使用的克隆地址(例如\\linuxserver),则会出现相同的错误。这是怎么回事?\.hg文件夹确实存在于原始repo中,并且我确实拥有该驱动器的权限。我找不到任何类似的问题,所以可能是因为我的本地网络?任何想法都很感激

以下是对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
Y:\>hgint--debug--traceback Y:\Repo\u clone
回溯(最近一次呼叫最后一次):
文件“mercurial\dispatch.pyo”,第87行,在runcatch中
文件“mercurial\dispatch.pyo”,第684行,在\u dispatch中
文件“mercurial\dispatch.pyo”,第466行,在runcommand中
文件“mercurial\dispatch.pyo”,第738行,在运行命令中
checkargs中的文件“mercurial\dispatch.pyo”,第692行
文件“mercurial\dispatch.pyo”,第681行,在
检查文件“mercurial\util.pyo”,第454行
文件“mercurial\commands.pyo”,第3659行,在init中
文件“mercurial\hg.pyo”,第104行,在peer中
存储库中第93行的文件“mercurial\hg.pyo”
实例中的文件“mercurial\localrepo.pyo”,第2098行
文件“mercurial\localrepo.pyo”,第50行,在_init中__
makedir中的文件“mercurial\win32.pyo”,第450行
WindowsError:[错误2]系统找不到指定的文件:“Y:\\Repo\u clone\\\.hg”
中止:系统找不到指定的文件:Y:\Repo\u clone\.hg

我没有使用
hg clone
中的
DEST
选项,但是

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


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

这就是我最初的想法:问题在于Y:\实际上不是本地驱动器。但也有其他人成功克隆到网络驱动器的例子,例如,或有点相关,因此我还不确定这是问题所在…谢谢大家,事实证明我们有一个服务器设置,不允许文件名以“.”开头(因此不允许使用“.hg”)。此设置已修改,现在克隆没有问题。与Mercurial无关!很高兴你能找到答案!我在目前的环境中尝试了这个方法,效果很好。您是否具有Y:\的写入权限,包括创建新文件夹的权限?