hg clone 中止报告在存储库中找不到 .hg/store/lock
我使用以下方法在远程计算机上创建了存储库:
hg init
hg add
hg commit
已创建存储库。
我将存储库克隆到本地计算机上,没有报告任何错误;文件似乎在那里
现在我正在尝试使用以下方法创建克隆的克隆(作为工作副本):
hg clone "path to original clone"
它返回:
目标目录:“存储库名称”
中止:没有这样的文件或目录:“原始克隆的路径” “/.hg/store/lock
我做错了什么?
谢谢
I created a repository on a remote machine using:
hg init
hg add
hg commit
The repository was created.
I cloned the repository on a local machine with no errors reported; The files seem to be there
Now I'm trying to make a clone of the clone (as a working copy) using:
hg clone "path to original clone"
It returns:
destination directory: "name of repository"
abort: No such file or directory: "path to original clone"/.hg/store/lock
What am I doing wrong?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
主存储库所在的分区使用什么文件系统?
实际上,Mercurial在进行某些操作时,需要锁定存储库。为此,当文件系统支持时,它会在 .hg 存储库中创建一个指向不存在文件的符号链接,告诉所有其他进程此时无法修改存储库。当文件系统不支持符号链接时,将创建一个普通文件。
但是,某些 FUSE 文件系统存在一些问题,通常是激活了 follow_symlinks 选项的 SSHFS。 FUSE 报告说他知道符号链接,但由于 SSHFS 遵循符号链接并且文件不存在,因此链接的“状态”被标记为未知,因此 Mercurial 认为存储库未正确锁定并中止操作。
我看到您正在使用 Cygwin,所以也许这与为 Windows 文件系统上的 UNIX 设计的工具存在同样的问题。这很奇怪,我的同事通过 Cygwin 使用 Mercurial 就很好。
不知道你是否也是这样,我在这个问题上浪费了将近半天的时间。也许这个答案可以帮助将来的一些人。
What filesystem is used on the partition where the main repository is ?
Actually, when Mercurial is doing some operations, it needs to lock the repository. For doing this it creates a symbolic link to an nonexistent file, when the filesystem supports it, in the .hg repository, telling every other processes that the repository can't be modified at this time. When symbolic links aren't supported by the filesystem, a normal file is created.
However, there's some problems with some FUSE filesystems, typically SSHFS with the follow_symlinks option activated. FUSE reports that he knows about symbolic links, but since SSHFS follows the symbolic link and the file doesn't exist, the "state" of the link is marked as unknown thus Mercurial thinks the repository isn't correctly locked and abort the operation.
I see you're using Cygwin, so maybe it's the same kind of problem with tools designed for UNIX on a windows filesystem. It's a strange, coworkers of mine are using Mercurial via Cygwin just fine.
I don't know if it's the case for you, but I lost nearly half a day on this problem. Maybe this answers can help some people in the future.
请粘贴失败的实际命令和输出,包括您正在克隆的克隆的实际路径。当您进行克隆时,也使用
--debug
和--traceback
。作为解决方法,您始终可以尝试
hg init newclone
,然后尝试hg pull -R newclone pathtooriginalclone
,这实际上是等效的,只是它尽可能不使用本地硬链接。Please paste in the actual command that's failing and the output including the actual path to the clone that you're cloning. When you do the clone use
--debug
and--traceback
too.As a workaround you can can always try
hg init newclone
followed byhg pull -R newclone pathtooriginalclone
, which is effectively equivalent except it doesn't use local hardlinks when possible.