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(SVNErrorManager.java:64) at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:51) at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:640) at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:280) at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:268) at org.tmatesoft.svn.core.internal.io.dav.DAVConnection.doReport(DAVConnection.java:286) at org.tmatesoft.svn.core.internal.io.dav.DAVRepository.runReport(DAVRepository.java:1280) at org.tmatesoft.svn.core.internal.io.dav.DAVRepository.update(DAVRepository.java:828) at org.tmatesoft.svn.core.wc.SVNUpdateClient.update(SVNUpdateClient.java:564) at org.tmatesoft.svn.core.wc.SVNUpdateClient.doCheckout(SVNUpdateClient.java:922) at hudson.scm.subversion.CheckoutUpdater$UpdateTaskImpl.perform(CheckoutUpdater.java:99) at hudson.scm.subversion.WorkspaceUpdater$UpdateTask.delegateTo(WorkspaceUpdater.java:152) at hudson.scm.SubversionSCM$CheckOutTask.perform(SubversionSCM.java:807) at hudson.scm.SubversionSCM$CheckOutTask.invoke(SubversionSCM.java:790) at hudson.scm.SubversionSCM$CheckOutTask.invoke(SubversionSCM.java:771) at hudson.FilePath.act(FilePath.java:758) at hudson.FilePath.act(FilePath.java:740) at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:763) at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:706) at hudson.model.AbstractProject.checkout(AbstractProject.java:1483) at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:507) at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:424) at hudson.model.Run.run(Run.java:1366) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:145)

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

, Posted Monday, February 4th, 2013 under Privat.

Leave a Reply