SVN unversioned directory with same name already exists

Hafiz picture Hafiz · Mar 10, 2013 · Viewed 19.6k times · Source

I also see questions with similar headings but this one has exception that error is while updating on server so can't delete the previous unversioned directory.

I am using SVN for uploading code files, you we created uploaded images directory at server manually and don't commit upload images through svn as it is user content that can be different at server and local machines depends upon data in database.

Accidently someone have committed that uploads/images directory so I am having following issue:

svn: Failed to add directory 'assets/uploads/images': an unversioned directory of the same name already exists

I know why this happened , it is because there were unversioned files at same location, so my question is that how can I fix it?

I don't want to remove remote directory as it contains images related to server database records. So how can I revert that committed directory? I tried svn->revert modification->revert previous commits in that directory but that gives following error:

org.apache.subversion.javahl.ClientException: E195020: Cannot merge into mixed-revision working copy [341:448]; try updating first

So any idea, how can I fix it? In case of any problem in understanding question just drop comment for me and I will make that clear.

thanks

Answer

Qpirate picture Qpirate · Mar 10, 2013

What I tend to do is just rename the offending directory and then re-get from svn. After that I just merge the folders back together.