Mercurial:hg-checklinks - NFS/SAMBA/SSHFS 网络驱动器上的递归符号链接
当我 macfusion 到我的 ubuntu VM 中,然后 hg 从 bitbucket 克隆一些东西 - 然后尝试对其进行提交/导出/等操作时,我得到一个添加了名称前缀“hg-checklinks-”的文件夹。
经检查,它似乎包含一个永无止境的符号链接链回到其父文件夹。这让我彻底疯了,到目前为止,我已经对善变失去了信心。
请注意,当我仅在本地文件夹上使用它时,似乎工作正常。有谁知道我如何解决这个问题......或者甚至更多关于为什么会发生这种情况的信息?
干杯!
When I macfusion into my ubuntu VM, and hg clone something from bitbucket - and then try and do a commit / export / etc on it, I get a folder added with a name prefix of 'hg-checklinks-'.
On inspection it appears to house a never ending chain of symlinks back to its parent folder. This is driving me completely nuts, and so far, I've lost my faith in mercurial.
Mind you, seems to work fine when I just use it on a local folder. Does anyone have any idea how I can get around this.. or even more info as to why it's happening?
Cheers!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
DVCS 的去中心化部分是在本地运行它——唯一应该在本地系统以外的任何系统上完成的 Mercurial 操作是
push
、pull和<代码>克隆。如果您从 bitbucket 克隆到 Ubuntu VM,那么您应该从 Ubuntu VM 克隆到 Mac 并推送到 Ubuntu VM。
也就是说,您的网络 FS 似乎在被告知时没有正确删除该文件。这是相关代码(在这里找到:https: //www.mercurial-scm.org/repo/hg/file/a2dc8819bb0d/mercurial/util.py#l710):
因此,您的网络 FS 正在创建符号链接,但无论如何都会抛出异常,或者在以下情况下抛出异常:要求删除(取消链接)符号链接。
The decentralized part of DVCS is about running it locally -- the only Mercurial operations that should be done on anything other than the local system are
push
,pull
, andclone
. If you're cloning from bitbucket onto your Ubuntu VM then you should clone from your Ubuntu VM onto your mac and push to the Ubuntu VM.That said, it looks like your network FS isn't correctly deleting the file when it's told to. Here's the relevant code (found here: https://www.mercurial-scm.org/repo/hg/file/a2dc8819bb0d/mercurial/util.py#l710):
So either your network FS is creating the symlink but throwing an exception anyway or throwing an exception when asked to delete (unlink) the symlink.
这里的问题是 sshfs 非常特殊的“-o follow_symlinks”,它会愉快地创建符号链接,然后声称它无法创建它们,然后将它们显示为很棒的递归不可移动目录。 Macfusion 中的错误可能会自动打开此损坏的选项 (https:// /code.google.com/p/macfusion/issues/detail?id=284)。因此,如果有的话,您应该对 sshfs 和 Macfusion“失去信心”,而不是 Mercurial。
这将在 Mercurial 2.7 中得到解决。同时,您应该能够在不使用该选项的情况下手动运行 sshfs。
(为了更快地修复错误,请将错误报告给 Mercurial/sshfs/macfusion 项目,而不是随机的互联网问题论坛。)
The problem here is with sshfs's very special "-o follow_symlinks", which will happily create symlinks, then claim it couldn't create them, then show them as awesome recursive unremovable directories. This broken option may automatically be turned on by a bug in Macfusion (https://code.google.com/p/macfusion/issues/detail?id=284). So if anything, you should "lose faith" in sshfs and Macfusion, not Mercurial.
This will be worked around in Mercurial 2.7. In the meantime, you should be able to run sshfs manually without the option.
(For faster bug fixes, please report bugs to the Mercurial/sshfs/macfusion projects, not random internet question forums.)