Ken M. Haggerty
Ken M. Haggerty

Reputation: 26218

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

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

Upvotes: 20

Views: 12944

Answers (7)

Gaurav
Gaurav

Reputation: 1

Restarting Mac resolved the issue

Upvotes: 0

Pellet
Pellet

Reputation: 2437

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

Upvotes: 2

Philippp
Philippp

Reputation: 857

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

Upvotes: 0

ObjSal
ObjSal

Reputation: 1824

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

Upvotes: 5

eduludi
eduludi

Reputation: 1693

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

rm [your-project].xcodeproj/project.xcworkspace/xcshareddata/[your-project].xccheckout

Upvotes: 4

J Ruiz Isenberg
J Ruiz Isenberg

Reputation: 284

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.

Upvotes: 26

Sam
Sam

Reputation: 462

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.

Upvotes: 8

Related Questions