Correct way to replace resource files in Xcode so that the files in SVN are also updated correctly
I recently deleted certain image-resources from my project and replaced them with new images of the same name. On deleting I was prompted if I wanted to delete those files from the repository as well. I clicked 'Yes' thinking that whenever I would add new files (of the same name) they would automatically be uploaded to the repository again. On replacing those resources I see a symbol 'R' next to the resource which I've replaced.
Finally, when I committed my Proje开发者_JAVA百科ct the 'R' symbol did not go away !! Also when I checked the repository these resources have not been added !!
What is it that I did wrong? And what is the best process by which one should replace resources so that the SVN is updated correctly?
When I update files like images I don't do it in XCode, I just use Finder to replace them.
The source control can track them this way. And, at least for me, it's faster.
Usually it needs a SCM/Refresh Entire Project
to figure out that I've change the files.
The R means that a file was scheduled for deletion but got replaced with a different file before the delete was commited.
To fix this:
- copy all the files with status R to a backup folder.
- delete all the copied files in xcode. move them to trash.
- SCM/Commit entire project
- SCM/Update entire project
- Add all the files from the backup folder to xcode
- Add all the files to the svn repository
- Commit
- Done
Maybe there is another way. But I fix all my svn problems with the help of a sledgehammer.
I guess next time you will use the finder ^^
精彩评论