Mercurial Hg-Git:从本地目录克隆?
我的计算机上有一个本地 Git 存储库,我正在尝试使用 Hg-Git 克隆该存储库。当我从 git:// 类型路径克隆时,它对我来说效果很好,但如果我尝试从本地目录克隆,则效果不佳。
这是一个例子......
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
路径确实存在,并且不知何故它知道它是一个 Git 存储库,但它的方向是向后的。它应该将 Git 对象导入到(新的)Hg 存储库中。
有什么想法吗?我在 Windows 上尝试使用 TortoiseHg,但在命令行中足够舒服。
今晚更新
我发现,如果我将 FalloutNV
重命名为 FalloutNV.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 not if I try to clone from 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!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这很奇怪,因为该错误消息通常与 Hg-Git 相关(其中 dulwich 部分) 找不到您的 ssh 密钥。
这就是为什么 manojlds 建议使用显式文件协议进行克隆(除非我会使用“
file:///C:/Users/James/Documents/My Games/FalloutNV
”,开头有 3 个“/
”,而不是两个)。“使 hg-git Mercurial 插件在 Windows 计算机上运行的指南”确认了 ssh 问题:
OP jocull 在评论中添加:
这类似于 Git 协议页面,其中本地 Git 存储库的每个路径以
.git
结尾。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:
The OP jocull adds in the comment:
And that is similar to the Git protocols page, where every path of a local Git repo ends with
.git
.