Error 155005 in Xcode 3

When using Xcode with source code control you may encounter this following message when committing your project:

Error: 155005 (Working copy not locked; this is probably a bug, please report)

In my instance this was caused by placing the build folder under source code control. I use Subversion for source code control, which places a .svn folder inside each folder that is under its control. Xcode was deleting the contents of the build folder when compiling the project, thus deleting the .svn folder and confusing Subversion.

The solution was to remove the build folder from the SVN repository.

Charles Minnow has the writeup, along with an update for Subversion’s config file to make sure it doesn’t happen again:

### Section for configuring miscelleneous Subversion options.
### Set global-ignores to a set of whitespace-delimited globs
### which Subversion will ignore in its 'status' output, and
### while importing or adding files and directories.
global-ignores = build *.mode1 *.pbxuser *~.nib .DS_Store *~