views:

396

answers:

1

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.

A: 

I decided to remove the symbolic links from the repository. I then created a bash script that will also the user to create the symlinks in their working copy. I had to make sure I turned off Samaba's follow symlinks option to stop TortoiseSVN from attempting to add the linked files to the repository.

Also it should be noted that when the user performs a commit using TortoiseSVN, that it will show the links in the changes log but they will not be checked and therefore will not be added to the repository. You just need to ignore them.

Camsoft