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

Re: svn support for symbolic link?

From: David Weintraub <qazwart_at_gmail.com>
Date: Tue, 25 May 2010 15:04:34 -0400

On Mon, May 24, 2010 at 3:25 PM, Peng Yu <pengyu.ut_at_gmail.com> wrote:
> For some reason, I need to create symbolic link in my source
> directory. When the directory structure is changed, I have some tools
> to fix broken links.
>
> I'm wondering if svn support symbolic links.

I know that the Unix version of Subversion supports symbolic links,
but I don't know if the Windows version does on Vista and Windows 7. I
can tell you it doesn't on earlier versions of Windows.

Yes, I know that NTFS supports something like symbolic links and that
since Vista, actual symbolic links are supported in NTFS via the
mklink command. However, since by default non-administrative users
ren't allowed to create symbolic links and junctions, most Windows
programs like Subversion don't support them either. Besides, there's
no guarantee you're using NTFS and not FAT32 on your Windows
partition.

It is normally not a good idea to use symbolic links in a version
control even in cases where it is fully supported. You're usually
better off having a utility create the symbolic links for you at build
or installation time. As you stated, when you have symbolic links,
they tend to break when things like directory structures change.

In fact, the truth is that Subversion doesn't really handle symbolic
links at all. They're just stored in the repository as a regular file
with a "svn:special" property attached to them. It is up to the
Subversion client to figure out that they're really symbolic links and
to create the symbolic link. The Subversion Unix command line client
does this. I don't know about the Windows Subversion client on Windows
Vista and Windows 7, and since I don't have a copy of those operating
systems, I can't even try it.

If you have a Windows 7 machine, you can create a local repository,
checkout to a local working directory. Create a symbolic link, add it
to the repository and commit the change. Check out the project
somewhere else and see what happens.

-- 
David Weintraub
qazwart_at_gmail.com
Received on 2010-05-25 21:05:11 CEST

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.