Unbinding C# projects from SVN
Update: Or you could, as Chris suggested, just use the SVN export command. Ahem :( That’ll teach me to slow down and look around in future…
I love SVN, but I hate that I have to clean up projects by removing the .svn folders before sending them to clients.
So, I wrote a little utility to do it for me in C#, and it is fairly basic - it walks through the folder structure underneath a folder that you give it and it deletes the .svn folders that it finds, after ensuring that all of the contents have the read-only flag removed. So just in case anyone finds it useful, it is here.
There are lots of caveats to using it, so you may well find it easier to do this by hand, but hey ho.
This took 30 minutes and has not been thoroughly tested. Caveat Emptor.The code is neither elegant, or beautiful, but it is functional. Ish.Please don’t use this on your working folder.If it deletes something it shouldn’t - don’t come running to me, I don’t intend to ever look at this code again - see points 1 and 2.It is written in .Net 1.1, and therefore you need 1.1 or later installed. Why 1.1? It was what I had open when I started writing - sorry.Did I mention this wasn’tthoroughlytested?
On the plus side, it does work either as a winapp, or from the command line if you specify an argument (the folder to clean) but don’t forget to quote the path if it has spaces. I have no doubt that there are better solutions out there, but you know how it is - quicker to write something than spend the time looking all over the Internet for it. Anyway, back to what I should have been doing.