Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I've got a website project under version control that relies on files from an unversioned directory on the same server via Symbolic Links.

I'm currently storing the symbolic links in the repository. The idea is that if someone checks out a working copy on to the same server they can edit and test the working copy of the project before committing it back to the repository.

When they checkout their working copy it successfully sets up the symlinks so that the entire site works when testing.

The users that work on the project are Windows users, so I've set a samba shares on the server and then mapped them to network drives in Windows. People can edit their working copies directly on the server via network shares and then test them in the web browser before committing their changes back to the repository via TortoiseSVN.

The Problem

The problem I have is that Samba resolves the symlinks as expected but when a user tries to commit their changes back to the repository, TortoiseSVN thinks the linked files are part of the project and tries to commit the target files to the repository and not the symlinks themselves.

I tried turning off symlink support in samba which means that the linked files cannot be resolved as I don't really want people to have access to the linked files nor do I want to import the linked files in the repository. The problem with this is that I get Can't stat '\webserver\projects\working\project\symlinked_file.php'. Access is denied

Apart from the symlink problem everything else works 100% perfectly. Users can either checkout website projects to their machine and work on them (but can't test) or checkout them out to their space on the dev web server and work on them and fully test. So I don't want to change the workflow process, I just need a solution to the symbolic link issue.

Many thanks.

Originally posted on StackOverflow: http://stackoverflow.com/questions/2400917/svn-samba-and-symbolic-links-how-to-get-them-all-to-play-together

share|improve this question

1 Answer 1

up vote 1 down vote accepted

I have got a somewhat similar setup, but I chose to not include the symlinks in svn.

Instead, I have made a script that simply creates the symlinks after the checkout.

Ger.

share|improve this answer
    
Are you using Samba?, because that seems to be the cause of my problems. As the Windows SVN client tries to commit the target symlinked files back to the repository. –  Camsoft Mar 8 '10 at 12:28
    
No, sorry. I use svn+ssh for my repositories. Perhaps a workaround could be a script that unlinks the symlinks and then commits? –  Ger Apeldoorn Mar 8 '10 at 13:48
    
Yeah interesting idea. I've now removed the symlinks from the repository and written a shell script to set up the symlnks in a new working copy. –  Camsoft Mar 8 '10 at 14:05

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.