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

RE: how to check in a symlink?

From: Stephen Warren <swarren_at_paramanet.com>
Date: 2004-04-05 21:03:07 CEST

> From: John Peacock [mailto:jpeacock@rowman.com]
>
> Stephen Warren wrote:
> > No sub-library itself is ever going to require symlinks to
> > compile on Windows, since Windows doesn't support links.
>
> Pay attention here: we are talking about cross-platform issues! ;)
>
> One primary reason that symlinks are used is to have a shared
> file in multiple
> locations in the source tree. Any application originally
> developed on a
> platform which supports that mode wants to use a symlink, so
> that the files are
> always in sync (since they are just a reference to the real file).

Ah. You're talking about porting an existing, say Unix, application to Windows, where that application's current source directory structure uses symlinks.

Well, I'd say that it's not the revision control system's job to make Windows support symlinks when it doesn't, just so you can easily port the application.

To my mind, porting that application involves re-implementing its build system to work correctly on native windows. It should work if you simply untar/unzip the source repository onto windows and then build.

Adding subversion on top of that simply means getting the source from subversion not a tar/zip file.

Anything else means that the project suddenly relies on whatever subversion has done to hack around non-existent symlinks on Windows, which won't be present when somebody wants to mirror the source in zip/tar/CVS/...

...

You could argue that when making a tar/zip aimed at Windows users, one would duplicate the source into two file paths so it would work on Windows, then the build wouldn't have to be changed to not require the symlinks. I'd personally regard this as a hack...

All that said, perhaps SVN could theoretically grow features/properties to emulate symlinks on Windows via duplicating data in the working copy, then aborting checkins when the copies are inconsistent.

However, I'd actually argue strongly against that - any duplication of the data means two places can be edited which will be guaranteed to screw someone over sometime - by editing half one copy and half the other - something that's not possible with real links. I'd regard working copy emulation of symlinks via copies a gross hack.

...

Making things work cross-platform is great, when possible. However, with this particular issue, I don't believe it is possible, since the very concept of links on Windows is non-existent, and so dissimilar to anything that does exist that it's not possible to retrofit without introducing a completely new filesystem (Well, perhaps NTFS 6/7/... (made up) will do it, since somebody said NTFS junction points do this for directories only in NTFS 5)

--
Stephen Warren, Software Engineer, Parama Networks, San Jose, CA
http://www.wwwdotorg.org/work_contact/
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Mon Apr 5 21:04:39 2004

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.