Xcode4 and SCM (Subversion) - Group/Folder not under version control
I have an Xcode4 project which is under Subversion SCM. The initial directory structure looked something like this:开发者_如何学C
/MyProject
/MyProject/MyProject.xcodeproj
/MyProject/MyProject
/MyProject/MyProject/MyProject-Prefix.pch
/MyProject/MyProject/Classes
/MyProject/MyProject/Files
/MyProject/MyProject/Resources
/MyProject/MyProject/main.m
/MyProject/MyProject/README.rtf
I dragged a folder containing a couple of pdf files in to the project's Files group. During the drag operation, i selected the following two preferences:
- Copy items into destination group's folder (if needed)
- Create groups for any added folders
As a result the "PDFs" group was created, and "PDFs" folder along with all the .pdf files were copied into the Xcode4 project.
The final directory structure looked something like this:
/MyProject
/MyProject/MyProject.xcodeproj
/MyProject/MyProject
/MyProject/MyProject/MyProject-Prefix.pch
/MyProject/MyProject/Classes
/MyProject/MyProject/Files
/MyProject/MyProject/Files/PDFs
/MyProject/MyProject/Files/PDFs/(*.pdf)
/MyProject/MyProject/Resources
/MyProject/MyProject/main.m
/MyProject/MyProject/README.rtf
Now, the problem is that the Xcode4's SCM is showing "A" against all the pdf files, but when i choose anyone of them and try to commit
the file, it gives me an error which says something like this:
The working copy "MyProject" failed to commit files.
svn: Commit failed (details follow):
svn: '/Path/MyProject/Files/PDFs' is not
under version control and is not part of the commit,
yet its child '/Path/MyProject/Files/PDFs/filename.pdf'
is part of the commit.
How can i resolve this issue?
Note: The Source Control option "Add" is appearing as disabled for all pdf files.
When importing your files into Xcode (right click "Add Files to "YOUR_PROJECT"...") make sure you select the following option for folders:
- "Create folder references for any added folders"
It is important to create folder references and not groups. I don't really know why, but this worked for me.
Ensure that you did not accidentally copy any .svn directories, which on unix/linux systems (including Mac OS X), are "hidden". If you did, then you will have confused your subversion client.
Also, consider doing a fresh checkout somewhere else, and diff'ing the directory tree. The results can be very educational.
精彩评论