Fixing SVN 'entries', and Xcode red file under SCM won't go away.

Somehow, someway, I ended with a file, which I'll call fileX, not being in the SVN repository (because I deleted it) and not having a working copy of it (again, because I wanted it gone), but there was still a record for it in <DIR>/.svn/entries. This was all Xcode's fault since I got into this situation only by using Xcode SCM operations.

I don't recall what combo of XCode SCM operations got me to this point. I started off just wanting to delete a file.

The symptom in Xcode was that fileX was under the SCM twisty in the left pane. It's name was in red. It looked like this:

I tried every operation from the CTRL-click context menu to get rid of it. Closing the project and reopening it didn't make it go away either. These tactics usually work.

I could also not Commit Entire Project because of SVN errors involving fileX.  The error dialogs were like this.

The text of the errors is:

First dialog box shown.
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/jbm/Code/MyProjectThingyHere/English.lproj/MainMenu.nib'is missing
Error: 1550010 (Can't find a working copy path) Description: Directory '/Users/jbm/Code/MyProjectThingyHere/English.lproj/MainMenu.nib'is missing

Second dialog box shown.

Error: 155016 (Working copy is corrupt) Description:
Commit failed (details follow):
Error: 155016 (Working copy is corrupt) Description:
Entry for '/Users/jbm/Code/MyProjectThingyHere/English.lproj/MainMenu.nib' has no URL

This guys blog gave me a big hint.

In any case, the solution was simple enough.

  1. Start Terminal.
  2. cd <DIR>/.svn.
  3. vim entries
  4. The records are separated by CTRL+L characters (^L).
  5. Delete the record for fileX while being careful of the ^L characters.

It really is that simple, once I figured out what was going on.

No comments:

Post a Comment