If I want to take a folder that was under subversion and remove any link to subversion at all, do I just delete the .svn folders and that's it? Anything else I have to consider?
Yes. Just delete .svn folder and your folder will no longer be under the control of subversion.
The .svn folder is the pristine copy of your repository when you did the checkout. So, it acts as the link between your server and your working copy. Once you delete it, you lose this "link".
Edit:
If you have any subfolder in your project, you will have a .svn folder in each of them. So, if you want to remove the link to subversion, you need to delete these .svn subfolders.
Nope, deleting the .svn
directories will remove any "connection" to the repository.
Yes.
Though an easier way is probably to just export that folder.
No, you just have to search for all .svn folders and delete them. Alternatively, doing a svn export
allows you to get the folder without the svn folders.
Normally yes, removing .svn folders is enough, but define "remove any link to subversion at all". Because there are such features as keyword substitution inside the versioned files.
You can manually delete all .svn folders.
Alternatively, you can use svn export
to export a clean directory tree. Keep in mind though that it will not export files that are not under version control.
The advantage of using svn export
is that you can get a pristine copy and keep your original repository in a single command.
I like to use deletesvn.reg. It adds a "Delete SVN Folders" to your context-menu in Explorer. Selecting it recursively deletes .svn folders, thus disconnecting your folders from SVN. The problem I've had with SVN Export, as others mentioned, is that it only exports files that are in the repo, ignoring all those hidden files you might need.
On unix systems over the shell:
find . -type d -name .svn -exec rm -rf {} \;
On Windows:
- Execute a search on the folder for ".svn", select all and delete them
Found the following windows command-line here:
FOR /F "tokens=*" %G IN ('DIR /B /AD /S *.svn*') DO RMDIR /S /Q "%G"
It works for me. (If you want to use this in a batch file, put "%%G" instead of "%G")
When using TortoiseSVN, right-mouse drag a folder that is under version control to a destination, and select "SVN Export all items here" from the context menu.
This will create a folder with your working folder, without the .svn files.