Mercurial Hg-Git:从本地目录克隆? [英] Mercurial Hg-Git: Clone from a local directory?

查看:353
本文介绍了Mercurial Hg-Git:从本地目录克隆?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的计算机上有一个本地Git存储库,我试图用 Hg-Git 进行克隆。对于我从 git:// 类型路径进行克隆时,它工作正常,但是如果我尝试克隆两个本地目录。

下面是一个例子...

  hg cloneC:\Users\James \ Documents \ My Games\FalloutNV
destination destination:FalloutNV
将Hg对象导入Git
abort:系统找不到指定的文件

路径确实存在,不知何故它知道它是一个Git仓库,但它的方向倒退。它应该将Git对象导入(新)Hg回购。



任何想法?我在Windows上,尝试使用TortoiseHg,但在命令行中足够舒服。 更新

今晚我发现如果我将 FalloutNV 重命名为 FalloutNV.git ...,克隆将从本地磁盘奇迹般地工作。只是一个可能有用的指针!

解决方案

这很奇怪,因为错误信息通常与Hg-Git( dulwich 部分内容)找不到您的ssh密钥



这就是为什么manojlds 建议使用明确地克隆文件协议(除非我使用 file:// / C:/ Users / James / Documents / My Games / FalloutNV 以3 / 开头而不是两个) p>

获取hg-git Mercurial插件在Windows机器上工作的指南确认了ssh问题:


如果您收到 abort:系统找不到指定文件的错误,则 dulwich PATH 中找不到ssh。

您需要确保安装Cygwin的OpenSSH,并且您可以运行 ssh
(也建议您购买德威图书馆的最新版本)







OP jocull 在评论中增加了:


有趣的事实:今晚我发现如果我将 FalloutNV 重命名为 FalloutNV.git ...克隆将从本地磁盘奇迹般地工作。


这与 Git协议页面,其中本地Git仓库的每个路径以<$ c结尾$ c> .git 。


I have a local Git repository on my computer that I am trying to clone with Hg-Git. It works fine for me when I'm cloning from a git:// type path, but if I try to clone from two local directories.

Here is an example...

hg clone "C:\Users\James\Documents\My Games\FalloutNV"
destination directory: FalloutNV
importing Hg objects into Git
abort: The system cannot find the file specified

The path does exist, and somehow it knows that it's a Git repo, but it has the direction backwards. It should be importing Git objects into a (new) Hg repo.

Any ideas? I am on Windows, trying to use TortoiseHg but comfortable enough in the command line.

Update

Tonight I discovered that if I rename FalloutNV to FalloutNV.git ... the clone will magically work from the local disk. Just a pointer that may help!

解决方案

This is strange since that error message is usually associated with Hg-Git (the dulwich part of it) not finding your ssh key.

That is why manojlds suggested cloning using explicitly the file protocol (except I would use "file:///C:/Users/James/Documents/My Games/FalloutNV" with 3 "/" at the beginning instead of two).

The "A guide to getting the hg-git Mercurial plugin to work on a Windows machine" confirms the ssh issue:

If you’re getting an error like "abort: The system cannot find the file specified", then dulwich cannot find ssh in your PATH.
You need to make sure to install Cygwin’s OpenSSH and that you can run "ssh" from the command line. (and it also recommend you get the latest version of the dulwich library)


The OP jocull adds in the comment:

Fun fact: Tonight I discovered that if I rename "FalloutNV" to "FalloutNV.git" ... the clone will magically work from the local disk.

And that is similar to the Git protocols page, where every path of a local Git repo ends with .git.

这篇关于Mercurial Hg-Git:从本地目录克隆?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆