Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In subversion, how can I un-hijack a file?

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!

like image 831
Rydell Avatar asked Jun 02 '09 15:06

Rydell


3 Answers

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.

like image 112
matpie Avatar answered Sep 28 '22 12:09

matpie


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.

like image 33
Alister Bulman Avatar answered Sep 28 '22 11:09

Alister Bulman


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.

like image 34
Sander Rijken Avatar answered Sep 28 '22 11:09

Sander Rijken