使用源代码管理时,Xcode 卡在“正在加载修订版”和“正在扫描工作副本...”
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/11871096/
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 stuck on "Loading Revision" and "Scanning for working copies..." when using Source Control
提问by Ken M. Haggerty
I recently noticed that some of my commits from my current project were being displayed under other projects in the "Organizer - Repositories" window. Additionally, the "Organizer - Repositories" window also displayed other projects in the left panel list that I was not working on, including duplicates of the current project. I therefore removed the unnecessary project listings from the left panel using the (-) key at the bottom left.
我最近注意到我当前项目的一些提交显示在“组织者 - 存储库”窗口中的其他项目下。此外,“组织者 - 存储库”窗口还在左侧面板列表中显示了我没有处理的其他项目,包括当前项目的副本。因此,我使用左下角的 (-) 键从左侧面板中删除了不必要的项目列表。
Now however it appears that the Version editor from within Xcode (next to the Assistant editor button) isn't working. When I try to load up the "Time Machine" view (clock hands with CCW arrow), the status bar says "Loading Revision" and never loads my previous commits. My previous commits appear in the "Organizer - Repositories" window under the current project.
然而,现在 Xcode 中的版本编辑器(在“助手编辑器”按钮旁边)似乎不起作用。当我尝试加载“Time Machine”视图(带有 CCW 箭头的时钟指针)时,状态栏显示“正在加载修订版”并且从不加载我以前的提交。我之前的提交出现在当前项目下的“组织者 - 存储库”窗口中。
In addition, trying to make new commits results in an Xcode dialogue box that says "Please wait while workspace is being scanned for working copies," while underneath it is stuck on the phrase "Scanning for working copies..." with the spinner next to it.
此外,尝试进行新的提交会导致 Xcode 对话框显示“正在扫描工作区以获取工作副本,请稍候”,而在其下方则卡在短语“正在扫描工作副本...”上,接下来是微调器到它。
I've been having several other problems with Xcode as well, having just started using source control. I am running an external monitor and using Lion (if that is relevant). One of my other new problems is that the iOS simulator will often freeze up if I leave my computer and return (so that I have to log back in). This forces me to force-quit Xcode and restart it.
我刚开始使用源代码管理时,也遇到了 Xcode 的其他几个问题。我正在运行外部监视器并使用 Lion(如果相关)。我的其他新问题之一是,如果我离开计算机并返回(因此我必须重新登录),iOS 模拟器经常会冻结。这迫使我强制退出 Xcode 并重新启动它。
UPDATE 1: The following link appears like it wouldsolve the problem, except that the field "Location" is not editable (i.e., it is greyed out) and is set to "Not Applicable." (cf. Xcode 4 stuck on "Scanning for working copies")
更新 1:以下链接似乎可以解决问题,只是“位置”字段不可编辑(即变灰)并设置为“不适用”。(参见Xcode 4 停留在“扫描工作副本”上)
UPDATE 2: After restarting Xcode this most recent time, I can now make commits again. I also realized that the "Time Machine" view differs for every single file; i.e., it will only visualize the revision history for that specific file. I still do not understand why some of the commits that I made to my current project are also showing up under other projects, or why Xcode thinks those projects are open to begin with (as evidenced by click-holding the Xcode icon in the dock).
更新 2:最近一次重新启动 Xcode 后,我现在可以再次提交。我还意识到每个文件的“Time Machine”视图都不同;即,它只会可视化该特定文件的修订历史记录。我仍然不明白为什么我对当前项目所做的一些提交也出现在其他项目下,或者为什么 Xcode 认为这些项目开始时是开放的(通过单击并按住 Dock 中的 Xcode 图标来证明) .
回答by J Ruiz Isenberg
I resolved the issue by deleting everything inside of:
我通过删除以下所有内容解决了这个问题:
yourproject.xcodeproj/project.xcworkspace/
No harm done to the project at all and the Xcode crashing with every change done to the project stopped as well.
完全没有对项目造成任何伤害,并且 Xcode 也随着对项目所做的每次更改而崩溃。
Also you will need to exit the version editor.
您还需要退出版本编辑器。
回答by Sam
I just experienced the same problem with a project that's in a Git repository. After trying several different 'fixes' I deleted the file 'contents.xcworkspacedata' from inside the Xcode project, i.e.
我刚刚在 Git 存储库中的项目中遇到了同样的问题。在尝试了几种不同的“修复”之后,我从 Xcode 项目中删除了文件“contents.xcworkspacedata”,即
yourproject.xcodeproj/project.xcworkspace/contents.xcworkspacedata
yourproject.xcodeproj/project.xcworkspace/contents.xcworkspacedata
Might be worth taking a copy of the file first incase it makes the problem worse.
可能值得先复制一份文件,以防它使问题变得更糟。
回答by eduludi
There is a specific file to remove in order to fix this issue:
为了解决这个问题,需要删除一个特定的文件:
rm [your-project].xcodeproj/project.xcworkspace/xcshareddata/[your-project].xccheckout
回答by ObjSal
Just doing a force quit on Xcode fixed it for me :)
只需在 Xcode 上强制退出即可为我修复它:)
回答by Pellet
I tried deleting all these files but nothing worked except for blowing away my workspace and recloning.
我尝试删除所有这些文件,但除了吹走我的工作区并重新克隆之外,没有任何效果。
回答by Philippp
I just got this problem, and deleting xcworkspace did not help.
Looks like Xcode refuses to use a newer svn version.
我刚遇到这个问题,删除 xcworkspace 没有帮助。
看起来 Xcode 拒绝使用较新的 svn 版本。
In detail:
My project was originally checked out with svnX which uses the current version of svn (1.8.13) I installed in brew. I later used Xcode (6.2) to open the project, assuming it would just find the working copy - which it did, but with above problem.
So, to test, I checked out the project to a different location using Xcode - and voila, the version editor seemed to work. Then I used svnX to look at that working copy, and it said that the wc would need updating to the current svn version. So, obviously Xcode uses its own (outdated) svn version, and then gets stuck when a working copy was checked out using a newer version.
(As a way out, in Netbeans I would just configure it to use the svn binary on my system - but I did not find such an option in Xcode...)
Will now install Xcode 6.3 and hope that improves things...
详细说明:我的项目最初是用 svnX 检出的,它使用我在 brew 中安装的当前版本的 svn (1.8.13)。我后来使用 Xcode (6.2) 打开项目,假设它只会找到工作副本 - 它确实找到了,但存在上述问题。
因此,为了进行测试,我使用 Xcode 将项目检出到其他位置 - 瞧,版本编辑器似乎可以正常工作。然后我使用 svnX 查看该工作副本,它说 wc 需要更新到当前的 svn 版本。因此,很明显 Xcode 使用自己的(过时的)svn 版本,然后在使用较新版本签出工作副本时卡住了。(作为一个出路,在 Netbeans 中,我只是将它配置为在我的系统上使用 svn 二进制文件 - 但我没有在 Xcode 中找到这样的选项......)现在将安装 Xcode 6.3 并希望能改进......