views:

308

answers:

4

Currently, my team has a set of files that should not be under version control, but they are. I would like to remove them from our subversion repository, and allow everyone to keep their local versions. What is the best way to accomplish this?

Deleting the files removes them from the repository, as well as everyone's local file system. Using the --keep-local flag almost works. It allows me to keep the copy on my machine, deletes it from the repository, but still removes the files from everyone else's file system.

Thanks!

A: 

Instead of deleting it, move it to some backup filename (in SVN of course). Then set the svn:ignore property on the old name.

The files will be deleted anyway, but nobody will lose their changes.

Maciej Łebkowski
And then they end up with myfile.txt and myfile.txt.bak, you never know when myfile.txt can really be deleted.
Sander Rijken
What happens if you do this in 2 steps, first a move and then a delete?
Johan
The move will change myfile.txt to myfile.txt.bak, and the subsequent delete will remove myfile.txt.bak. It doesn't matter how many steps you take, if it ends in remove, the file will be gone.
Sander Rijken
+2  A: 

When you remove it from the repo, it's will end up removing it from the other working copies.

When you do come to putting a new system in place, one technique that usually works quite well is to have the code look for a local file (say config-local.php) which is specifically ignored (and so never gets put into the repository), and a common file that is read in if the more specific one is not found. That would either have a generic configuration, or throw an error to have them create a local version.

Alister Bulman
+1  A: 

You can only delete the file, and accept that it gets deleted everywhere. Users can always recover the file from subversion using a subversion export command.

Sander Rijken
+3  A: 

After you delete the file, your users will have to recover the file from the repository using svn export.

$ svn export -r x path ./

Where x is a revision where the file existed before it was deleted, path is the full path to the file, and ./ is where the file will be placed.

See svn help export for more information.

sirlancelot
This is really easy and reminds one that nothing is ever really deleted from svn ;)
Gleb