If you want to build functionality to remove all of the subversion dot directories into your application, this is one of the many ways you could go about accomplishing it:
require 'find'
require 'fileutils'
Find.find('./') do |path|
if File.basename(path) == '.svn'
FileUtils.remove_dir(path, true)
Find.prune
end
end
If however, you are not a rubiest and are just looking for some Unix approach, this should get the job done:
`find . -type d -name .svn -delete`
FYI, the Unix command line version fails unless all of the .svn directories are already empty. The ruby version does not suffer from this limitation. You could always do something like:
find . -type d -name .svn > svnlist.txt && \
rm -rf `cat svnlist.txt` && rm -rf svnlist.txt
To get around it if you don't mind being a bit of a hack..