I am immensely troubled and distu开发者_StackOverflowrbed by the fact that subversion is creating random .svn folders in my local repo. I am used to Perforce which does not do this. Is there any way to prevent subversion from doing this? Will it affect svn if I delete the folders or use some sort of script to delete them?
The .svn directories are what store the repository history and metadata. Every revision control system must store auxiliary information (at the very least, past versions of the files!). Don't delete them unless you want to bring the repository down to a simple working set, with no more ability to commit changes or update with new revisions.
I find it amusing that you are 'immensely troubled and disturbed' by the creation of these hidden folders which implement all the nice features you want from a version control system.
CVS has such a directory. Mercurial has a directory at the top of the repository. Perforce is different because it is backed by a database; it stores all metadata outside the repository it concerns. This means that, in Perforce, if you just copy a repository's contents, you can't manipulate it any more on the other side without hooking back into the database. This is your db.rev
, db.changes
, and db.have
files, by the way. You might have been immensely troubled and disturbed by them before.
I have any easy solution to your troubles with the .svn directories: ignore them.
I am immensely troubled and disturbed by the fact that subversion is creating random .svn folders in my local repo.
Don't be troubled, they're there for a reason. Every directory in your project gets it's own .svn
folder that stores all subversion meta data
Is there any way to prevent subversion from doing this?
Not if you want to continue using subversion the way it is meant to be used
Will it affect svn if I delete the folders or use some sort of script to delete them?
Yes, all of your versioning will be shot and you will have to rebuild your SVN.
精彩评论