I'd like to add a symbolic link to subversion and when I do a checkout all it does is add the same symbolic link right to my checkout but I'm afraid to add it if that's not what happens.
A symlink is a symbolic Linux/ UNIX link that points to another file or folder on your computer, or a connected file system. This is similar to a Windows shortcut. Symlinks can take two forms: Soft links are similar to shortcuts, and can point to another file or directory in any file system.
When you remove a symlink, the file it points to is not affected. Use the ls -l command to check whether a given file is a symbolic link, and to find the file or directory that symbolic link point to. The first character “l”, indicates that the file is a symlink.
1 Answer. In short: symlinks does not have permissions.
Differences between soft and hard links:Symbolic links can be made between different file systems, hard ones cannot. Hard links share the inode number, symbolic links do not. With symbolic links, if the original file or directory is deleted, the information is lost, with hard links it is not.
I want to emphasize the above. Too many people wrongly believe that Windows doesn't support symbolic links.
This misinformation comes about because Windows 2000 and Windows XP did not support symbolic links. They supported Directory Junction Points, but not POSIX style symbolic links. Even more weird, neither Windows 2000 or Windows XP came with the required linkd
command to create these Directory Junction Points.
This is no longer true. Windows Vista, Windows 7, and Windows 8 not only support symbolic links, but also come with the required mklink
command. These symbolic links are compatible with POSIX compatible operating system symbolic links (Mac OS X, Linux, Unix)
Now to the heart of the problem:
Although Windows now supports symbolic links, and those symbolic links are compatible with Unix/Linux/Mac symbolic links, Subversion itself does not support symbolic links on Windows. I have no idea why this is the case.
I don't recommend putting in symbolic links into the repository, even if you only work in POSIX style OS systems and not Windows. Instead, you should have your build and/or deploy steps create any required symbolic links. This gives you more flexibility since you can test your OS during a build or deployment and handle any issues.
Plus, creating symbolic links during the build/deploy stage creates less maintenance headaches than having it in your repository. Imagine if I rename, move, or delete a file that has a symbolic link pointing to it in my repository. I have to also remember to look for any symbolic links and modify them too -- something that's not likely to happen. After all, it's impossible to look at a file and know all of the symbolic links that maybe pointing to that file.
So as a recap:
1. Yes, I know that the FS in NTFS stands for file system.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With