I have received a copy of source code that was checked out from an svn repository to which I have no access: there are thus .svn folders and the like all over the place that I would like to remove. I can't use the tips included in the svn docs, since they all seem to involve having access to the repository to which these files and folders refer. Is there a quicker way to get rid of them, other than iterating through all the directories and deleting them by hand?
views:
36answers:
2
+6
A:
This probably doesn't belong on SO, but... Iterating through the directories and deleting them is your only option, but this can usually be done quite easily. In Windows, use the search assistant (F3) to find the .svn directories, select them all, hit delete. On Linux or Mac OS, find . -name .svn | xargs rm -rf
.
calmh
2010-02-07 21:58:28
Seems like a reasonable solution. OP, if the docs told you that you couldn't delete .svn metadata folders in a checkout, you're reading it wrong.
Adam Backstrom
2010-02-07 22:00:27
@Adam: I can remove them by hand, but I was looking for a way to do that en masse, as the number of directories is considerable.
davek
2010-02-07 22:03:57
@calmh: +1 sounds like a good solution: thanks!
davek
2010-02-07 22:04:54
+1
A:
You can "SVN export" the whole directory. If you're using TortoiseSVN, you can "SVN export" the directory to itself, which then automatically removes all .svn directories. Else, you need to "SVN export" it into another directory, where then the .svn stuff will be removed.
AndiDog
2010-02-07 21:59:22
Maybe I'm missing something, but when I try to export the directory to itself, I am prompted to provide my credentials to access the original repository, which is not available to me.
davek
2010-02-07 22:01:12
This should not happen, weird... Are you using TortoiseSVN? Well if it doesn't work, you can just search for all ".svn" directories (hidden!) and delete them.
AndiDog
2010-02-07 22:09:15