Upgrade your Brain

SVN ‘Add Directory Failed’-Gotcha

Failed to add directory ‘DirectoryName’: a versioned directory of the same name already exists.

Wasted a lot of time for this. Problem was that I locally deleted a folder, created it new and checked it in, but wrote the directory with another case (for example delete folder “Directoryname” and created folder “DirectoryName” with uppercase N). The case sensitive SVN had no problem adding the new folder and managing Directoryname AND DirectoryName, but when Jenkins / Hudson on our Windows build server would try to checkout both directories, it would fail with this StackTrace:

ERROR: Failed to check out http://localhost/svn/somerepo/someproject org.tmatesoft.svn.core.SVNException: svn: Failed to add directory ‘DirectoryName’: a versioned directory of the same name already exists at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error( at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error( at at at at at at at org.tmatesoft.svn.core.wc.SVNUpdateClient.update( at org.tmatesoft.svn.core.wc.SVNUpdateClient.doCheckout( at hudson.scm.subversion.CheckoutUpdater$UpdateTaskImpl.perform( at hudson.scm.subversion.WorkspaceUpdater$UpdateTask.delegateTo( at hudson.scm.SubversionSCM$CheckOutTask.perform( at hudson.scm.SubversionSCM$CheckOutTask.invoke( at hudson.scm.SubversionSCM$CheckOutTask.invoke( at hudson.FilePath.act( at hudson.FilePath.act( at hudson.scm.SubversionSCM.checkout( at hudson.scm.SubversionSCM.checkout( at hudson.model.AbstractProject.checkout( at hudson.model.AbstractBuild$AbstractRunner.checkout( at hudson.model.AbstractBuild$ at at at hudson.model.ResourceController.execute( at

Just writing this up, because I found no links that correctly identified this problem.

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top