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

Re: Symlinks on Win32...

From: Ryan Schmidt <subversion-2006Q1_at_ryandesign.com>
Date: 2006-01-31 11:17:01 CET

On Jan 31, 2006, at 04:38, mystml@adinet.com.uy wrote:

> I usually work in Linux, where I have a structure equivalent to this
>
> /build/build.py
> /project1/build.py -> ../build/build.py
> /project1/foo.cpp
> /project2/build.py -> ../build/build.py
> /project2/bar.cpp
>
> I have build, project1 and project2 in SVN. In linux everything
> works fine.
> However when I dual boot to Windows (sorry, I have to, our users use
> Windows) and I check out the projects, I don't get the symlinks or an
> usable equivalent. I know, I know, Windows doesn't support symlinks
> and
> shortcuts are a joke. However, in an interesting bug-or-feature
> dilemma,
> CVS did what I wanted it to do - it gave me my scripts, instead of
> a link.
>
> I understand the limitations of Windows and I know this isn't a
> problem
> with SVN per se; what I'm trying to figure out is how to work
> around this
> limitations in the least horrible way. What I need essentially is
> to keep
> using my symlinks as they are in Linux, but have an usable and
> automated
> alternative in Windows. For example, a server-side pre-checkout
> hook (does
> that even exist?) that tries to interpret the symlink locally (to the
> repository) and give me the pointed-to file in Windows. Or a client-
> side
> post-checkout hook (does that even exist?) that manually replaces
> the links
> with their contents (assuming I also check out /build in my Win32
> working
> copy)

Since there's no support for symlinks on Windows, Subversion can't
offer that. But even on Linux, symlinks may not be the best option.
Subversion has a feature called "externals" which is designed for
this kind of situation. Read about it here:

http://svnbook.red-bean.com/en/1.1/ch07s04.html

The limitation is that externals currently operate at the directory
level, not the file level, and they're also specified by absolute
URL. So you couldn't duplicate your current structure exactly, but
you could get close:

/build/build.py
/project1/build/ -> /build/
/project1/foo.cpp
/project2/build/ -> /build/
/project2/bar.cpp

To your other questions, there are no client-side hooks, and there
are no pre-checkout hooks.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Tue Jan 31 11:18:26 2006

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.