Delete SVN Folders

Yesterday I changed my source control from VisualSVN to AnkhSVN and till now it was awesome. But I had some problems with projects that were being controlled by VisualSVN to start controlling them with AnkhSVN.

This is because the Subversion source control client maintains your local state in hidden folders named .svn inside your project, which can be a problem if you want to copy or share the project directory. The solution is to create a REG file with the code below. This adds “Delete SVN Folders” to the context menu for folders. When you select it, it removes all folders named .svn inside the folder and it’s children (it does nothing if the project’s not under Subversion source control).

To create this reg file, create a new text document and enter the following code. Finally rename the text document from .txt to .reg and run the reg file.

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Folder\shell\DeleteSVN]
@=”Delete SVN Folders”

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Folder\shell\DeleteSVN\command]
@=”cmd.exe /c \”TITLE Removing SVN Folders in %1 && COLOR 9A && FOR /r \”%1\” %%f IN (.svn) DO RD /s /q \”%%f\” \””

Hope this solves your problem! 

 

more info:

tips and tricks:

Advertisements

3 thoughts on “Delete SVN Folders

  1. Sander Rijken says:

    I can’t see why switching from VisualSvn to AnkhSVN requires deleting .svn directories, can you explain this?

    The reg entry seems useful, although you would usually use ‘svn export WC TARGET’ for that, but this can really help with a broken working copy or something like that.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s