Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can svn co give a "directory already exists error"?

Tags:

svn

svn co svn+ssh://myhost/path/projectname/trunk projectname

[...]

svn: Failed to add directory 'projectname/test/.svn': an unversioned 
  directory of the same name already exists

How is that possible??

I'm checking out into an empty dir.

Same error checking out to Windows and OS X.

like image 956
Ethan Avatar asked Jun 22 '09 19:06

Ethan


3 Answers

If you're absolutely certain that the directory you're checking out into is empty, you may want to see if the repository contains directories with the same name using different capitalization. This sometimes happens when the host OS for the repository is Linux. Sometimes this causes problems when the working directory FS isn't case-sensitive.

like image 175
Jacob Avatar answered Nov 15 '22 21:11

Jacob


I had a similar problem, though not with a '.svn' directory, but a normal one.

I was getting this error when checking out into an empty dir:

svn: Failed to add directory 'files': an unversioned directory of the same name already exists

The directory had dynamic content and was set to svn:ignore, and the repository was possibly also corrupted.

I did a rm -rf files and then repeated the checkout. The checkout succeeded after that.

(though the 'files' dir became empty on the second checkout, whereas the first time it checked out some stuff into it as well. fortunately it was only dynamically generated content, so not a serious problem).

like image 31
Attendant Avatar answered Nov 15 '22 20:11

Attendant


Are you sure it is empty and that .svn doesn't exist? Have you tried not giving it projectname and instead moving into that dir and checking it out?

like image 35
baudtack Avatar answered Nov 15 '22 22:11

baudtack