[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: ALIBERTI Emanuele <aliberti_at_tecnest.it>
Date: 2006-01-31 14:51:02 CET

Ryan Schmidt wrote:
> 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.
This is incorrect. It depends on the file system type. NTFS supports
hard and soft links (real soft links, not serialized Explorer objects
stored in *.lnk files).

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/fs/hard_links_and_junctions.asp

Recent revisions of the Win32/64 APIs even include system calls that
create them.

Hard links:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/fs/createhardlink.asp

Symbolic links:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/fs/createsymboliclink.asp

But even today you can create them. See

http://www.sysinternals.com/utilities/junction.html

ea

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Tue Jan 31 14:55:07 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.