symlink

How to treat a symbolic link as a directory in Mercurial?

独自空忆成欢 提交于 2019-11-30 04:36:47
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. How can I force Mercurial to treat the symbolic link to a directory as a regular directory? Rage Steel Under linux you can use mount --bind sourcepath targetpath 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). The alternative syntax, amenable for inclusion in /etc/fstab ,

gcc link shared library against symbolic link

假装没事ソ 提交于 2019-11-30 04:13:30
问题 I have two libraries, for example two toaster libraries libtoaster_a.so and libtoaster_b.so and all the associated major/minor/rev symlinks eg libtoaster_a.so.1.0.0 etc. Both libraries implement the same toaster interface, but simply do the processing differently. Hence when I build an application that uses the library it doesn't matter which is used (from the applications perspective they are the same). Because I would like to decide which library to use after the application has been

How to get/set logical directory path in python

霸气de小男生 提交于 2019-11-30 02:58:32
问题 In python is it possible to get or set a logical directory (as opposed to an absolute one). For example if I have: /real/path/to/dir and I have /linked/path/to/dir linked to the same directory. using os.getcwd and os.chdir will always use the absolute path >>> import os >>> os.chdir('/linked/path/to/dir') >>> print os.getcwd() /real/path/to/dir The only way I have found to get around this at all is to launch 'pwd' in another process and read the output. However, this only works until you call

Capistrano Symlinks Being Cached?

血红的双手。 提交于 2019-11-30 02:09:41
I've been setting up PHP deployments with Capistrano on CentOS 6 and have run into an interesting issue. The way capistrano works, it sets up folders like this: /var/www/myapp.com/ current (symlink to latest release in /releases) shared releases 20130826172737 20130826172114 When I look at the "current" symlink, it points to the most recent release. At first, when opening my web app, everything worked fine. After deploying a new release, the current folder correctly points to the new release, but the web application tries to load files from the old release (which has been deleted in a

Docker and symlinks

不羁的心 提交于 2019-11-30 01:30:55
I've got a repo set up like this: /config config.json /worker-a Dockerfile <symlink to config.json> /code /worker-b Dockerfile <symlink to config.json> /code However, building the images fails, because Docker can't handle the symlinks. I should mention my project is far more complicated than this, so restructuring directories isn't a great option. How do I deal with this situation? Docker doesn't support symlinking files outside the build context . Some different methods for using a shared file in a container. Share a base image Create a Dockerfile for the base worker-config image that

creating symbolic link: Protocol error

陌路散爱 提交于 2019-11-30 01:28:58
I have created linux (Centos) on my virtual box. When I ssh to it and I try to create symbolic link (on my shared folder with full access): ln -s path/folder/example myFolder I get error: ln: creating symbolic link `myFolder': Protocol error Is there any reason or solution to this? It's a problem with the host filesystem. Check the permissions on the host folder are adequate and the the host filesystem supports symlinks. Right click on your command prompt and "Run as Administrator" (or whatever program you're using to make those symlinks needs to be run as adminstrator). Hector GR Here is the

How can I detect whether a symlink is broken in Bash?

拟墨画扇 提交于 2019-11-29 23:33:06
I run find and iterate through the results with [ \( -L $F \) ] to collect certain symbolic links. I am wondering if there is an easy way to determine if the link is broken (points to a non-existent file) in this scenario. Here is my code: FILES=`find /target/ | grep -v '\.disabled$' | sort` for F in $FILES; do if [ -L $F ]; then DO THINGS fi done Roger # test if file exists (test actual file, not symbolic link) if [ ! -e "$F" ] ; then # code if the symlink is broken fi This should print out links that are broken: find /target/dir -type l ! -exec test -e {} \; -print You can also chain in

How do I grant SeCreateSymbolicLink on Windows Vista Home edition

☆樱花仙子☆ 提交于 2019-11-29 21:27:16
问题 I want to be able to use mklink to create symbolic links on my Windows Vista Home edition computer. However, I must grant SeCreateSymbolicLink before mklink will be able to function on Vista Home edition (by default the right is revoked). Home edition provides no UI or tool facility to grant/revoke discreet rights. A Wikipedia link on NTFS symbolic links says the ntrights.exe tool that comes in Windows Server 2003 Resource Kit Tools can be used to grant this right on Home edition. However,

How do I find all of the symlinks in a directory tree?

不羁岁月 提交于 2019-11-29 18:34:22
I'm trying to find all of the symlinks within a directory tree for my website. I know that I can use find to do this but I can't figure out how to recursively check the directories. I've tried this command: find /var/www/ -type l … and later I discovered that the contents in /var/www are symlinks, so I've changed the command to: find -L /var/www/ -type l it take a while to run, however I'm getting no matches. How do I get this to check subdirectories? ztank1013 This will recursively traverse the /path/to/folder directory and list only the symbolic links: ls -lR /path/to/folder | grep ^l If

Symlink is not working in my local machine

扶醉桌前 提交于 2019-11-29 17:54:17
I'm using Xampp setup in Windows 7 machine. I am trying to configure sub-folder module in Drupal 7. But it says "Cannot create symlink, error code(1314)" error which stops me in configuring the module properly. And subfolder module functionality is not working as expected. Chris Nauroth This is a Windows error message indicating that the current user does not have permission to create symbolic links. By default, this privilege is granted to administrators only. Your options for fixing this are either to run as administrator (which of course is risky for normal day-to-day use) or explicitly