Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to manage svn repositories in xcode

Tags:

xcode

svn

I am using svn for my xcode project. I added two files to my current project, added them to the repository and commited changes for my classes folder. But when I try to commit the entire project, I get this error:

Error: 155005 (Working copy not locked; this is probably a bug, please report) Description: Commit failed (details follow):
Error: 155005 (Working copy not locked; this is probably a bug, please report) Description: Directory '/Users/gopalmadhu/Desktop/All My data/Schduler current code/build/Debug-iphonesimulator/scheduler.app.dSYM/.svn' containing working copy admin area is missing

Due to this, the classes that are already checked in do not become visible when I check my code out. The files are in the project, but not visible. As a workaround, I need to add them again from the project folder to the classes folder. This is not the correct way of managing svn. What should I do?

like image 604
ratnasomu Avatar asked May 06 '10 10:05

ratnasomu


1 Answers

Your problem is in committing build results to Subversion.

Subversion works by putting a hidden folder called .svn in every folder that is under version control. This does not work well with folders that might get deleted and recreated by a tool because the tool will probably not respect the existence of the .svn folder. That includes the whole build directory, the contents of which get wiped every time you clean your project targets.

You should remove your build directory from version control. It shouldn't be in there anyway since everything in it can be regenerated by doing an Xcode build. To get out of your existing dilemma try the following:

  1. Back up your project somewhere
  2. In a terminal go to your project directory and rm -rf build
  3. do an svn update. At this point Subversion will hopefully restore the build directory.
  4. svn rm build
  5. svn commit -m "Removed build from version control"
  6. (optional) svn propedit svn:ignore . This will bring up an editor for the svn:ignore property. Add build on a separate line. After that subversion won't show you the build directory in svn status commands.
like image 166
JeremyP Avatar answered Sep 28 '22 22:09

JeremyP