Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode and SVN: can't rename my class -> Error: 155007 (Path is not a working copy directory)

Tags:

xcode

svn

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. I also found a similar problem. But there is no solution available so far.

like image 204
testing Avatar asked Sep 23 '10 10:09

testing


2 Answers

I just had the same problem and Google directed me to this question, so apologies for the late 'answer'.

Anyhow, I'm working on eclipse 3.5, mac osx snow leopard, and you seem to be working on mac os x as well (xcode)? The point is, that mac osx' hfs+-filesystem is most of the time setup case-insensitively, so since you're only trying to change the case of your filenames this could be your problem.

The workaround for me was to perform the rename from FOO.h to Foo.h as:

  • FOO.h -> FooBar.h
  • FooBar.h -> Foo.h

(N.B. currently, all file renames in which only the case changes are giving the same problem on my system)

like image 167
azonli Avatar answered Sep 20 '22 10:09

azonli


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.

like image 45
testing Avatar answered Sep 19 '22 10:09

testing