Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Annoying svn issue where svn claims folder is under version control but no .svn exists

I have a folder that both XCode and SmartSVN both claim is "already under version control." However, when I run svn status in that folder, it says it is not a working copy. Furthermore, I cannot add or subtract the folder from the working copy in SVN, for if I add it (with or without recursion) it claims it is already under version control, and yet there is no context option for me to remove it from said version control.

Furthermore, when I check to see if there is a .svn folder in that directory, there is not.

I have tried svn cleanup in the working directory root as well as the directory in question. When performed at the root it completes with no messages. When performed in the directory, it informs me that it is not a working copy.

It is causing an annoying Obstructing - warning in XCode that is bugging me.

If anyone knows what I am talking about or has experienced the same thing please help me out!

like image 263
tacos_tacos_tacos Avatar asked Mar 01 '12 08:03

tacos_tacos_tacos


1 Answers

It happens when the parent folder gets out of sync with some of its children. A possible workaround is renaming the parent folder offline (using the file system, not via svn), get a fresh copy from the repository and then bring back your modifications from the renamed folder (excluding the.svn ones).

When finished delete the renamed folder. Otherwise you might end up with broken folders:

If you renaming a project, Xcode does not remove the .svn directory in the .xcodeproj. As a result, svn gets confused, thinking the renamed project directory is under version control [source]

like image 193
KMoraz Avatar answered Sep 27 '22 21:09

KMoraz