开发者

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:

  1. copy all the files with status R to a backup folder.
  2. delete all the copied files in xcode. move them to trash.
  3. SCM/Commit entire project
  4. SCM/Update entire project
  5. Add all the files from the backup folder to xcode
  6. Add all the files to the svn repository
  7. Commit
  8. 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 ^^

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜