Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode stuck on "Loading Revision" and "Scanning for working copies..." when using Source Control

Tags:

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.

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.

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.


UPDATE 1: The following link appears like it would solve 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")

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

like image 319
Ken M. Haggerty Avatar asked Aug 08 '12 18:08

Ken M. Haggerty


2 Answers

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.

like image 55
J Ruiz Isenberg Avatar answered Sep 18 '22 08:09

J Ruiz Isenberg


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.

yourproject.xcodeproj/project.xcworkspace/contents.xcworkspacedata

Might be worth taking a copy of the file first incase it makes the problem worse.

like image 37
Sam Avatar answered Sep 22 '22 08:09

Sam