User login
Removing .svn Directories On Mac OS X
bosshogg — Fri, 11/27/2009 - 19:16
If you use svn on your Mac and you've ever wanted to move/copy one directory to another project in SVN, you've probably found that the folders keep their association with whatever SVN destination/repository you first added them to. This can be incredibly frustrating if you want to take something OUT of revision control without losing the files, or if you want to move a copy of files from one part of your tree to a totally different project/subfolder . If you delete it on the repo and do an update, your files will be deleted, and if you try to copy them out first before deleting them from the repo, the hidden .svn file will move along with your copied files and folders! What's worse is that if you muck with it too much you can very easily confuse your local SVN files and what once was a perfectly happy, functioning version control system is now an angry, out of control monster with a mind of its own!
At issue is the problem that there are hidden .svn directories that you need to be cleaned up. The easiest way that I've found around this issue is to drop into the shell, navigate to the directory that you want to remove from source control, and issue this command:
find . -type d -name .svn -depth -exec rm -rf {} ;
This will remove, recursively those hidden .svn folders and files. Problem solved! You'll still need to address on the server any structural changes you want to make, but you don't have to worry about losing any local files at that point.
Happy Subversioning!
- bosshogg's blog
- Login or register to post comments
Navigation
Recent blog posts
- How the iPad Killed Our iPhone App Sales
- Sending email from within iPhone apps
- iPhone Tie Down Calculator Created for Pacific Cargo Control
- My Opinings On The iPad
- Plug For A Good Small Company
- Gambling Planet Features Three Jacks Games
- Twist Tac Toads Available in the AppStore!
- Getting the Version String
- Your iPhone App Icon
- C++ On The iPhone

SVN Export
codemonkey57 — Thu, 02/11/2010 - 06:25Another approach might be to do an SVN export on your local folder
Thanks!
SquidMonkey — Fri, 11/27/2009 - 19:27Totally cool. No idea why this is such an obtuse thing.