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

Subversion support for symlinks

From: Brian Davis <bitminer_at_tds.net>
Date: 2004-06-18 05:49:50 CEST

Hello,
I am currently using WinCVS (on Win2K) and have run into two of the draw backs of CVS (one of which could be attributed to the lack of simlinks on Win platform). These two drawbacks are the inability to take two direcories (modules) in seperate direcotries in the repository and check them out into a single directory on the client (sandbox). This as I am sure you are aware this is due to the lack of CVS linking the files in the module with to the module name when they are checked out. This makes it impossible to comit files back into the respective repository modules as CVS would have no way of resolving which file went with which module . The other drawback is the Win32's inability to remap direcories (simlinks) and ofcourse CVS does'nt even touch this issue.

Personaly I would be very interested in seeing simlink capability in the verson control utility.

Why:

1) Regretfully to make up for defencencys in IDE's
2) Provide for live updates
3) To allow for check pointing shared code to be remapped into locations to prevent checkpoints from occuring in direcories up towards the root of the tree. This issue may need some explaining:

Suppose there are two direcories on the build host/client where the source is checked out.

c:/source/project1/include (shared source code)
c:/source/project1/src (shared source code)

c:/source/project1/SCPClient

c:/soruce/project1/PRUClient

c:/source/project1/SomeModuleHavingNothingToDoWithClients

Now refrential paths (of the variety ../include ../src) can be used in some IDE's (but not in others) to obtain access to the source. However lets say we want to checkpoint SCPClinet. Well the include and src modules up the tree must be checkpointed as well. There is realy only one viable option (there are two but the other is not worth discussing). This is to checkpoint the project at the project1 module. This causes all the modules down the tree PRUClient and SomeModuleHavingNothingToDoWithClients to be check pointed (taged) when nothing has changed.

Now cvs would allow checkouts of the two modules include and src to the SCPClient and PRUClient as shown below.

c:/source/project1/SCPClient
c:/source/project1/SCPClient/include (shared source code)
c:/source/project1/SCPClient/src (shared source code)

c:/soruce/project1/PRUClient
c:/soruce/project1/PRUClient/include (shared source code)
c:/soruce/project1/PRUClient/src (shared source code)

c:/source/project1/SomeModuleHavingNothingToDoWithClients

And that's great... well except that now to have changes appear in SCPClient when the source is modified in c:/soruce/project1/PRUClient/include or c:/soruce/project1/PRUClient/src the soruce must be checked in in the PRUClient directory and updated in the SCPClinet direcotries. It might work if you are not boucing between the two projects (which I have too when creating the client and server software).

The how:

This Win32 issue cannot be fixed simply with a client side command line tool (I understand why it is being avoided). There must be a client side utility (much like WinCVS) which listens for modifications of files in various directores and mirrors thoes changes to other directories.

For instace say a file was modified in

c:/source/project1/SCPClient/include/someModifiedFile.h

The utility would listen for that change and update automaticaly (at least in my dream world).

c:/soruce/project1/PRUClient/include/someModifiedFile.h

Then the file could be checked in in either of the two direcories and the utility would (magically) update the repository.

There is software out there such as Grove which listens for changes made by one person commiting a file and transmits thoes changes Real Time to another person over the Ether in a Grove project (I am not saying that this is desireable for a source tracking I am only giving an example). There is also software (ActiveSync or any run fo the mill USB flash card reader) which allows an entire volume to appear in the explorer tree thus allowing programs to directly read and write the disk. Now we are talking system level driver (file system emulator) at this point and a clinet side utility inorder to make this happen (or we could all switch to Linux). Any takers? Another benifit this would allow for is notifications to team members of which files are being modified through Client(developer1)->Server(repository)->Client(developer2) notification. This utility would be seperate from the command line tool however the command line tool should be capable of creating simlinks on platforms which support the capability. This would cascade into server repositoy arcitecture as it would have to maintain the data on which directores are simlinked(Linux)/pesudosymlinked(Win2k) when the project is checked in and out.

If for no other use at least this email could be used to put an insomniac into a narcaleptic state.

Brian J. Davis

From FAQ
Does Subversion support symlinks?
Subversion does not currently support symlinks, and there are no concrete plans to support them. The obstacle has been that symbolic links are not portable across all the platforms Subversion runs on. Therefore, any design for symlink support has to account for how the symlinks will behave in a working copy checked out into an environment that doesn't support symlinks. If you have a proposal, please share it with the developers at dev@subversion.tigris.org.
Received on Fri Jun 18 05:45:45 2004

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

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