Xcode 给我“阻塞”警告,因为我不再使用 SVN,切换到 Perforce
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/5466605/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Xcode giving me 'Obstructing' warning because I am no longer using SVN, switched to Perforce
提问by BrandNewUser
my first post so hopefully I am clear enough with my problem.
我的第一篇文章所以希望我对我的问题足够清楚。
I started a new project about a year ago in Xcode 3.x.y (iOS project), everything was going well, but I wanted to use some sort of source control. I had heard about SVN on a website so I gave it a shot and put the repositories on a USB external hard drive. Everything was going great, then I decided to switch to Perforce because other people on the project were used to it. After doing that I formatted the usb hard drive to use it for other purposes.
大约一年前,我在 Xcode 3.xy(iOS 项目)中启动了一个新项目,一切进展顺利,但我想使用某种源代码控制。我在一个网站上听说过 SVN,所以我试了一下,把存储库放在一个 USB 外置硬盘上。一切都很顺利,然后我决定改用 Perforce,因为项目中的其他人已经习惯了。这样做之后,我格式化了 USB 硬盘驱动器以将其用于其他目的。
Fast forward to last week: I installed Xcode 4.x, and I am getting all kinds of warnings when I build. The 2 I am getting are:
快进到上周:我安装了 Xcode 4.x,在构建时收到各种警告。我得到的 2 是:
game_name.app.dSYM Obstructing file://localhost/projects/game_name/build/Release-iphonesimulator/game_name.app.dSYM/: warning: Obstructing: /projects/game_name/build/Release-iphonesimulator/game_name.app.dSYM is blocking item under version control
game_name.app.dSYM 阻塞文件://localhost/projects/game_name/build/Release-iphonesimulator/game_name.app.dSYM/:警告:阻塞:/projects/game_name/build/Release-iphonesimulator/game_name.app.dSYM版本控制下的阻塞项
and
和
fx_swish_01.wav Missing File /projects/game_name/fx_swish_01.wav file://localhost/projects/game_name/fx_swish_01.wav: warning: Missing file: /projects/game_name/fx_swish_01.wav is missing from working copy
fx_swish_01.wav 缺少文件/projects/game_name/fx_swish_01.wav file://localhost/projects/game_name/fx_swish_01.wav:警告:缺少文件:工作副本中缺少/projects/game_name/fx_swish_01.wav
Those are the 2 errors, but I have 113 total (about 10 of the obstructing, and 100 of the missing). I'm assuming this is because the project somehow still thinks I am using SVN for my SCM, when in fact I am using ONLY perforce from outside of Xcode.
这些是 2 个错误,但我总共有 113 个错误(大约 10 个障碍和 100 个缺失)。我假设这是因为该项目以某种方式仍然认为我将 SVN 用于我的 SCM,而实际上我只使用来自 Xcode 外部的 perforce。
Does anyone have a clue on what I need to do? I don't care if files get clobbered, ignored, deleted, whatever... I have everything in perforce that I think I need. Thanks in advance.
有没有人知道我需要做什么?我不在乎文件是否被破坏、忽略、删除,等等……我确实拥有我认为我需要的一切。提前致谢。
EDIT: I got some of the 'missing from working copy' warnings by doing: svn delete --force. Is this going to bite me later down the line? I couldn't commit, but it did remove the warning. Here is a copy of what I did:
编辑:通过执行以下操作,我收到了一些“工作副本丢失”警告:svn delete --force。这会在以后咬我吗?我无法提交,但它确实删除了警告。这是我所做的副本:
$ svn delete fx_swish_01.wav
svn: Use --force to override this restriction
svn: 'fx_swish_01.wav' has local modifications
$ svn delete fx_swish_01.wav --force
D fx_swish_01.wav
$ svn commit -m "deleted fx_swish_01.wav"
svn: Commit failed (details follow):
svn: Directory '/projects/game_name/build/Release-iphonesimulator/game_name.app.dSYM/.svn' containing working copy admin area is missing
$ svn delete fx_swish_02.wav
D fx_swish_02.wav
$ svn delete fx_swish_03.wav
D fx_swish_03.wav
$ svn delete fx_swish_04.wav
D fx_swish_04.wav
$ svn delete hey_what_a_crowd.mp3
D hey_what_a_crowd.mp3
$ cd build/Release-iphonesimulator/
$ ls
game_name.app game_name.app.dSYM game_name.app_old.dSYM
$ svn delete game_name.app.dSYM
svn: Directory 'game_name.app.dSYM/.svn' containing working copy admin area is missing
$ svn delete game_name.app.dSYM --force
D game_name.app.dSYM
svn: Directory 'game_name.app.dSYM/.svn' containing working copy admin area is missing
As you can see, I got the .wav files to remove and it seems to not give me those warnings anymore. The game_name.app.dSYM thin is still not working though... the admin area is missing? I'm sure if that file existed at one point, it sure don't anymore.
如您所见,我删除了 .wav 文件,它似乎不再给我这些警告。game_name.app.dSYM 仍然无法正常工作……管理区域丢失了?我确定该文件是否曾经存在过,它肯定不再存在。
回答by Philippe
Since you switched away from svn, you can delete all the .svn folders that are probably left over from your previous version control efforts.
由于您已退出 svn,因此您可以删除所有可能从您之前的版本控制工作中遗留下来的 .svn 文件夹。
Checking out a fresh copy from Perforce should also work, provided you have not checked-in the .svn folders into p4, in which case you should delete them all from p4.
如果您尚未将 .svn 文件夹签入 p4,则从 Perforce 签出新副本也应该有效,在这种情况下,您应该将它们从 p4 中全部删除。
回答by Scott
The answers provided in this post should help you solve the warnings you are seeing that pertain to missing files: Missing file warnings showing up after upgrade to XCode 4
这篇文章中提供的答案应该可以帮助您解决您看到的与丢失文件有关的警告: 升级到 XCode 4 后显示的丢失文件警告