4 Comments

I noticed that I was running TortoiseSVN in SVN_ASP_DOT_NET_HACK mode (where Subversion clients use '_svn' instead of '.svn' directories) unnecessarily as I don't have silly old Visual Studio 2003 installed anymore which caused this mess in the first place.

The _svn directories work just as well as .svn, but nevertheless (due to mild OCD?), I created a batch script that ripped through my project directory renaming all '_svn' directories to '.svn', so I could remove the SVN_ASP_DOT_NET_HACK mode. It uses the wonderfully flexible FOR command drive the whole process. We don't need no stinkin' Powershell round these parts...

Save this script as something like "SvnRenameDirs.cmd" in the root of your projects folder:

:: Make script directory current
pushd "%~dp0"

:: Unhide, rename and re-hide svn dirs for /r /d %%D in (*) do @if exist "%%D_svn" ( attrib -H "%%D_svn" ren "%%D_svn" ".svn" attrib +H "%%D.svn" ) popd

rundll32.exe shell32.dll,Control_RunDLL sysdm.cpl,0,3

At the end click the Environment Variables button in the System Properties dialog and remove the SVN_ASP_DOT_NET_HACK environment variable and then log out and back in again (or restart explorer.exe and TSVNCache.exe).

Comments

Comment by Jakob

Thank you for sharing the script. Since I switched to use both Windows and Linux I am having trouble getting SVN work under Linux cause of the ASP-hack. I will try out your script, cause recompiling the SVN-client under Linux to make it fit the "_svn" -standard is no real option...

Jakob
Comment by Setting up Subversion on Windows « Zakaria Bin Abdur Rouf

[...] See that hidden “.svn” folder? These folders are where Subversion puts its hidden metadata schmutz so it can keep track of what you’re doing in the local filesystem and resolve those changes with the server. The default naming convention of these folders unfortunately conflicts with some fundamental ASP.NET assumptions. If you’re an ASP.NET 1.x developer, you need to switch the hidden folders from “.svn” to “_svn” format, which is on the General options page. This hack is no longer necessary in ASP.NET 2.0 or newer.  [...]

Comment by Setting up Subversion on Windows « Sochinda's Blog

[...] See that hidden “.svn” folder? These folders are where Subversion puts its hidden metadata schmutz so it can keep track of what you’re doing in the local filesystem and resolve those changes with the server. The default naming convention of these folders unfortunately conflicts with some fundamental ASP.NET assumptions. If you’re an ASP.NET 1.x developer, you need to switch the hidden folders from “.svn” to “_svn” format, which is on the General options page. This hack is no longer necessary in ASP.NET 2.0 or newer. [...]

Comment by Neil Ramsbottom

Super helpful script. Thanks a lot for sharing!