SVN: a versioned directory of the same name already exists

svn
18,501

Solution 1

This happens for me all the time with version 1.6.17, despite that the existing directory has the expected URL. I work around it by moving the directory out of the way, doing the update or check out, and moving it back, clobbering the one just obtained. Stupid, but it works.

mv dir dir2
svn co blah .
rm -rf dir
mv dir2 dir

Solution 2

It sounds a lot like the old case-sensitivity problem. If you run svn log you'll see what case the repo thinks your directory should be. Compare with your local one. I suppose its not unheard of for the repo to have been restored from backup and everything has changed case.

The other alternative is that an IDE or tool hs changed the case of your directory/file. This happens to me occasionally with Visual Studio. Tortoise usually tells you the exact problem though and lets you fix it.

You could still try a cleanup which might repair a corrupted .svn directory.

If you want the svn binaries for Windows, I just grab them from a VisualSvn Server installation.

Share:
18,501
Mr. Boy
Author by

Mr. Boy

SOreadytohelp

Updated on July 22, 2022

Comments

  • Mr. Boy
    Mr. Boy over 1 year

    Our account with CVSDude got migrated this week. After the aftermath of a week without being able to access our repo, it was back up with a slightly different URL (a '-' changed to a '.' basically). We used TortoiseSVN's relocate command to switch working copies and it had been working for a day quite smoothly.

    But today, I started getting the error in the title on performing updates. I deleted the folder in question since it was small, and updated again. That folder was recreated in my working copy but another folder started giving the same error.

    I've Googled, and here are the two common answers:

    • you changed the case of a directory name
    • you checked in your .svn files by mistake

    We have not changed any folders at all - the first folder to start complaining has not been touched for weekks - and I double checked the .svn thing also. Other people on the team are not reporting the same problem, and they're also using Windows+TortoiseSVN.

    Ideas/Inspiration?

  • Mr. Boy
    Mr. Boy over 14 years
    And yes, I can run that log cmd, I have SVN command-line on cygwin. It just does a massive dump... what does this prove?
  • Ivo
    Ivo almost 12 years
    Another option is to use svn co --depth=immediates, so that not the entire tree has to be checked out.