[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Symlinks on Windows

From: richard hornsby <richardjhornsby_at_gmail.com>
Date: Mon, 10 Mar 2008 16:27:41 -0400

To answer your assertion - to the best of my knowledge, feel free to correct
me - symlinks (*nix) are not the same thing as shortcuts in windows. A
shortcut is an actual file, usually ending in '.lnk' (ie. eclipse.lnk is a
binary _file_ containing some kind of information about how to find
eclipse.exe) The distinction between a symlink and a shortcut being a file
is important because it takes special effort to follow a shortcut -- I can't
think of any applications that actually honor them outside of the shell (
explorer.exe) and the file chooser type dialogs - including any
microsoft-supplied applications. There may be a few out there, not saying
there aren't.

On the other hand, symlinks are actually filesystem level pointers. Most
stuff I've written (or used) on *nix platforms doesn't care and treats the
symlink as if it were the file/directory - with no special effort - because
the filesystem handles it for me. I can examine the "file" if I want to see
if it is a symlink (apache does this) but it is completely optional.

If you think I'm wrong about shortcuts, try for example going into your
"Program Files\Internet Explorer" directory. Rename one of the dlls (such
as ieproxy.dll to ieproxy2.dll). Then create a shortcut to ieproxy2.dll,
but call it ieproxy.dll (the original name) Internet Explorer won't launch
until you make the dll the actual library and not a shortcut to it. Windows
itself does not treat shortcuts in anything resembling transparency. There
is something called "junctions" which is supposed to be more transparent to
the application level, but AFAIK it isn't well documented or supported.

http://www.microsoft.com/technet/sysinternals/FileAndDisk/Junction.mspx(also
has a link to a KB article.)

IMHO, the svn FAQ really isn't outdated, as it says "Win32 has no symlinks,
so a win32 client won't do any such translation: the object appears as a
normal file." I don't know the internals of subversion, but this is a
correct statement because the shortcut /is/ a normal file to pretty much
everything except the windows Explorer shell.

If you have found a way to make shortcuts be honored by applications such as
IIS, I would be seriously interested in hearing how you did it.

-rj

On Mon, Mar 10, 2008 at 2:05 PM, Karl Fogel <kfogel_at_red-bean.com> wrote:

> Eric Armstrong <Eric.Armstrong_at_Sun.COM> writes:
> > (Please cc me on any replies)
> >
> > This FAQ says that SVN handles symlinks, but
> > "windows doesn't have them":
> > http://subversion.tigris.org/faq.html#symlinks
> >
> > But Windows has had shortcuts for quite a while
> > now. Is the FAQ (hopefully) outdated?
>
> I think there was some specific reason why we couldn't just implement
> symlinks as shortcuts on Windows, but I don't remember what it was. If
> we find out, we should update the FAQ to talk about it.
>
> -Karl
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
> For additional commands, e-mail: users-help_at_subversion.tigris.org
>
>
Received on 2008-03-10 21:28:06 CET

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.