开发者

How to remove properly a file on xcode 4 with svn version control

When I remove a file or a folder with the finder from my projet on svn version control I always got a warning:

file://localhost/Users/XXX/Documents/开发者_如何学GoProjets/XXX/file.jpg: warning: Missing file: /Users/XXX/Documents/Projets/XXX/file.jpg is missing from working copy

How to delete the file properly ? This file is not showed on the project navigator.

Thanks.


The other answer is needlessly complicated and involves removing all of the source control bindings from your working folder - when there is a simple fix available.

This behavior usually occurs when you move a file in Finder or delete a file in Finder and then later hit "delete" on the missing reference in Xcode.

This happens because Xcode automatically "adds" the file to SVN - so now that the file is no longer there, SVN is confused because it thinks it should be there - and when you deleted the file in Finder your SVN info didn't get updated (you didn't delete the file in SVN).

The warning isn't an Xcode warning per-se - but more of a general source control / SVN warning.

To fix the warning (and the state of your local SVN working folder) either use your SVN client to "revert" the prior "add" operation:

svn revert PATH

or, less preferably, you can force "Delete" the missing file:

svn delete --force PATH

To prevent the error from occurring in the first place, always "Delete" through Xcode, or, through your SVN client (but, if you delete it through your SVN client you'll still have to delete the missing reference in Xcode - so you might as well just delete it in Xcode to being with).


had the same issue, and I just solved it by:

  1. delete the repository in Xcode's Organizer
  2. quit Xcode
  3. delete all .svn hidden folders (also within the *.xcodeproj file)

Hope this works for you as well.


I experienced the same issue after deleting file from folder, then reference from XCode project.

I solved it by committing to SVN, then updating the Working Copy again from the SVN.


For me it was as simple as updating the Xcode(5) workspace.


This is occurred when you delete file on Xcode, but didnt tell svn server about it.

Go to command line tool, and delete file directly.

svn delete missingFile.m 

and commit it

svn commit -m "Deleting file"

note that if you delete .svn folder, the warning is disappear but you will lost communication with svn server.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜