20

我最近注意到,我当前项目中的一些提交正在“组织者 - 存储库”窗口中的其他项目下显示。此外,“Organizer - Repositories”窗口还在左侧面板列表中显示了我未处理的其他项目,包括当前项目的副本。因此,我使用左下角的 (-) 键从左侧面板中删除了不必要的项目列表。

但是现在看来,Xcode 中的版本编辑器(在助手编辑器按钮旁边)不起作用。当我尝试加载“Time Machine”视图(带有 CCW 箭头的时钟指针)时,状态栏显示“Loading Revision”并且从不加载我之前的提交。我之前的提交出现在当前项目下的“Organizer - Repositories”窗口中。

此外,尝试进行新提交会导致 Xcode 对话框显示“请稍候,正在扫描工作区以查找工作副本”,而其下方则停留在短语“正在扫描工作副本...”上,下一个微调器给它。

我刚开始使用源代码控制时,Xcode 也遇到了其他几个问题。我正在运行外接显示器并使用 Lion(如果相关)。我的另一个新问题是,如果我离开计算机并返回,iOS 模拟器经常会死机(因此我必须重新登录)。这迫使我强制退出 Xcode 并重新启动它。


更新 1:以下链接似乎可以解决问题,只是“位置”字段不可编辑(即,它是灰色的)并且设置为“不适用”。(参见Xcode 4 停留在“扫描工作副本”

更新 2:最近一次重新启动 Xcode 后,我现在可以再次提交。我还意识到每个文件的“时间机器”视图都不同;即,它只会可视化该特定文件的修订历史。我仍然不明白为什么我对当前项目所做的一些提交也出现在其他项目下,或者为什么 Xcode 认为这些项目一开始是开放的(通过单击 Dock 中的 Xcode 图标来证明) .

4

6 回答 6

26

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.

Also you will need to exit the version editor.

于 2012-09-10T04:01:08.557 回答
8

我刚刚在 Git 存储库中的一个项目中遇到了同样的问题。在尝试了几个不同的“修复”后,我从 Xcode 项目中删除了文件“contents.xcworkspacedata”,即

yourproject.xcodeproj/project.xcworkspace/contents.xcworkspacedata

可能值得先获取文件的副本,以防它使问题变得更糟。

于 2012-08-10T13:36:54.027 回答
4

There is a specific file to remove in order to fix this issue:

rm [your-project].xcodeproj/project.xcworkspace/xcshareddata/[your-project].xccheckout
于 2014-10-22T13:22:52.307 回答
4

Just doing a force quit on Xcode fixed it for me :)

于 2015-02-25T17:46:15.293 回答
2

I tried deleting all these files but nothing worked except for blowing away my workspace and recloning.

于 2016-09-28T08:05:47.850 回答
0

I just got this problem, and deleting xcworkspace did not help.
Looks like Xcode refuses to use a newer svn version.

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...

于 2015-04-10T18:08:40.300 回答