tags:

views:

122

answers:

2

I get the following error, if I try to rename my class:

Error During Rename

Error: 155007 (Path is not a working copy directory) Description: Path 'xxx/Classes/MyClass.h' is not a directory

The renaming looks like this: MyClass.h -> MYClass.h

Perhaps that is the problem?

I've made an initial import to my SVN directory. This is working so far (deleting, committing, etc.) The only thing it can't is renaming a class.

I tried:

4.Now delete your local copy (or move it to another location just in case).

5.Finally CHECKOUT the project from subversion (this will create the subversion .svn folders, …).

6.Reselect the subversion repository for this project.

7.Commit the entire project.

There is also no build directory in the SVN directory. The one thing which stands out is that I can't see any .svn folder. I'm using Xcode 3.2.3. The file I'm trying to rename/refactor is in the classes folder. I tried to delete a file from the classes folder and it worked!

I read this and this. I also found a similar problem. But there is no solution available so far.

A: 

I'm not sure about your troubleshooting steps (where are steps 1 to 3?) but, assuming that:

  1. xxx/MyClass.h is already under version control
  2. Whey you say "rename class" you mean "rename file"
  3. You're issuing a svn rename command

... then your working copy is probably corrupt. I've suffered from that problem before and there's not actual fix. I suggest you:

  1. Check out a fresh working copy
  2. Copy pending changes (if any) using a regular merge tool (like WinMerge or TortoiseMerge), being extremelly careful so you don't copy any .svn directory
  3. Commit
Álvaro G. Vicario
Step 1 and 2 are already done (create Xcode project and configure SVN). Step 3 is the import, which I also have done, but I don't want make any new import yet (I think the import was successful and the problem is elsewhere). Yes, I mean renaming files (but it is actually renaming a class). I'm not issuing a `svn rename` command. I think that is done by Xcode, but I'll try that. I've already made five fresh working copies and it is every time the same result (perhaps there is a problem with the import but committing and deleting works?). I'm worrying all the time, where my .svn folders are.
testing
Import? I hope you're creating a fresh *working copy* and not a new *repository*. Whatever, make sure Xcode supports file renames in SVN.
Álvaro G. Vicario
No import! Fresh working copy the tenth ... How do I find out what Xcode supports and what not? I experienced that Xcode is ****
testing
To find out whether it supports renames, just make a rename with Xcode in a pristine working copy and then run `svn status` from the command line.
Álvaro G. Vicario
A: 

I think the problem is here MyClass.h -> MYClass.h It seems that this isn't supported by the SVN or Xcode ...

Option 1: No refactoring

Option 2: Delete the file and create a new one

I chose option No. 2. I'll try to post an instruction:

  1. Go to SCM > Repositories. Select only one file. Click the Delete button. Do this as often as you need.
  2. Go to your files in Xcode. Make your renaming/refactoring of the names in the files. Then copy content of your files temporary in TextEdit.
  3. Select the files you want to delete in Xcode. Right-Click > Delete.
  4. Create your new Class/Files and copy the content of TextEdit into these files.
  5. Go to SCM > SCM Results. Select all files (inclusive myProject.xcodeproj). Confirm add and delete of the files.
  6. Than make a commit of all changed files.
  7. Press the Reload button in the Repositories window to see if the files are there.

The process looks like as described above. I had many problems getting things right. I hope now it is correct. I think the instructions above are not 100% correct, but I have done so many things that this is the only thing I can remember. Hope this will help someone else.

PS: I think add/delete/rename should not be done in Xcode. Only problems.

testing