views:

88

answers:

6

In subversion/TortoiseSVN, I am wondering how to un-version a directory. We have a large number of projects, each with a BIN and OBJ folder which are under source control. I want to delete these two folders from subversion, but keep the folders locally.

I tried the "Delete (Keep local)" option, and that works on my machine. However when another developer performs an Update, their BIN and OBJ folders get deleted. I need it to simply become unversioned when the other developers perform an update, instead of having them removed from their machines.

Thanks ~James

A: 

If you are using TortoiseSVN, just export to the current working copy location and it will remove the .svn folders and files.

http://tortoisesvn.net/node/343

VoodooChild
Your link specifically says that this isn't possible `Versioned files and folders can never be ignored - that's a feature of Subversion. If you versioned a file by mistake, read the section called “Ignore files which are already versioned” for instructions on how to “unversion” it.` It at least links to instructions on how to unversion.
Jim Schubert
A: 

A quick and dirty solution is to chmod -R a-w those folders, so that svn can't remove them.

However, I would think that if it doesn't regenerate, it should be under version control, and if it does regenerate, it shouldn't matter?

Or would a recompile for everyone take prohibitively long.

Note that it will only remove them the first time, so as long as you protect the files through the first update, you should be fine.

EDIT: Or the classic 'copy a backup away; copy it back after update'.

zebediah49
+1  A: 

You want to use the ignore operation from the TortoiseSVN context menu.

http://tortoisesvn.net/docs/release/TortoiseSVN_en/tsvn-dug-ignore.html

Brian Gideon
A: 

I think the easiest way to do this would be to branch your code, remove the directories, then merge back into trunk.

All developers should add obj and bin folders to their global ignore before checking out the updated trunk.

I used the patterns from this answer and they worked for me: http://stackoverflow.com/questions/182492/how-do-i-configure-the-tortoisesvn-global-ignore-pattern-properly

Jim Schubert
A: 

Make sure you go to the parent directory and commit the deletions.

Jamie Altizer
A: 

My solution for this sort of problem is to modify the project (msbuild) file to automatically recreate the bin/obj directories (if they are missing) before the compile step. Then svn remove the bin/obj directories, and finally update the .svnignore file to ignore the bin/obj directories. This way you don't try to store intermediary products, and yet the directories will be available as soon as you build, either in Visual Studio or with MSBuild.

Craig Trader