SVN Export or Recursively Remove .SVN Folders
Posted
by Ben Griswold
on Johnny Coder
See other posts from Johnny Coder
or by Ben Griswold
Published on Sat, 09 Jan 2010 15:58:20 +0000
Indexed on
2010/03/18
22:11 UTC
Read the original article
Hit count: 497
tools
|Version Control
I shared this script with a coworker yesterday. It doesn’t do much; it recursively deletes .svn folders from a source tree. It comes in handy if you want to share your codebase or you get in a terrible spot with SVN and you just want to start all over. Just blow away all svn artifacts and use your mulligan.
It’s true. You can nearly get the same result using the SVN export command which copies your source sans the .svn folders to an alternate location. The catch is an export only includes those files/folders which exist under version control. If you want a clean copy of your source – versioned or not – export just might not do.
The contents of the .cmd file include the following:
for /f "tokens=* delims=" %%i in (’dir /s /b /a:d *.svn’) do (
rd /s /q "%%i"
)
Just download and drop the unzipped “SVN Cleanup.cmd” file into the root of the project, execute and away you go.
If you search around enough, I know you can find similar scripts and approaches elsewhere, but I’m still uploading my script for completeness and future reference.
Download SVN Cleanup
© Johnny Coder or respective owner