How to manage svn repositories in xcode
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开发者_JS百科 folder. This is not the correct way of managing svn. What should I do?
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:
- Back up your project somewhere
- In a terminal go to your project directory and
rm -rf build
- do an
svn update
. At this point Subversion will hopefully restore the build directory. svn rm build
svn commit -m "Removed build from version control"
- (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 insvn status
commands.
You can also try....XCODE->Build->Cleaning All Targets option.That solved my problem !
精彩评论