如何将符号链接视为Mercurial中的目录? [英] How to treat a symbolic link as a directory in Mercurial?

查看:68
本文介绍了如何将符号链接视为Mercurial中的目录?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

从0.9.4开始,在添加符号链接时,Mercurial会跟踪链接本身,而不是其指向的文件或目录.但是,在某些情况下,需要跟踪由符号链接指向的文件.

As of 0.9.4, when adding a symbolic link Mercurial keeps track of the link itself, and not the file or directories it points to. However, there are cases when it is desirable to keep track of the files pointed to by the symbolic link.

如何强制Mercurial将指向目录的符号链接视为常规目录?

How can I force Mercurial to treat the symbolic link to a directory as a regular directory?

推荐答案

在Linux下,您可以使用

Under linux you can use

mount --bind sourcepath targetpath

而不是符号链接和Mercurial会将目标视为常规目录(在带有Mercurial 1.3.1的openSUSE 11.2和RHEL6上进行了测试).

instead of symbolic links and mercurial will treat target as usual directory (tested on openSUSE 11.2 with Mercurial 1.3.1, and on RHEL6).

可以包含在/etc/fstab中的替代语法是

The alternative syntax, amenable for inclusion in /etc/fstab, is

mount -o bind sourcepath targetpath

然后是fstab条目

sourcepath targetpath none defaults,bind 0 0

这篇关于如何将符号链接视为Mercurial中的目录?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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