Why do I have two (2) working copies in XCode 5 Source Conrol?

I have an iPad app with several versions; I'm currently working on v2.1.1, which I checked out from the remote repos. This is what I see when I click on Source Control. What does this mean and how do I fix it?

Answers


I have removed old repo using following steps.

  • ProjectName.xcodeproj -> Show Package Contents
  • project.xcworkspace -> Show Package Contents
  • xcshareddata
  • Open .xcscmblueprint file using any text editor
  • Remove all unrequited repo from following location DVTSourceControlWorkspaceBlueprintWorkingCopyRepositoryLocationsKey DVTSourceControlWorkspaceBlueprintWorkingCopyStatesKey DVTSourceControlWorkspaceBlueprintWorkingCopyPathsKey DVTSourceControlWorkspaceBlueprintRemoteRepositoriesKey
  • Save file and open Xcode again

@Piyush has given a correct answer. However, I recently discovered one condition which needs to be satisfied in order for this approach to work.

Before removing references to your old repo in the ".xcscmblueprint" file you should ensure that you have no files in your project which were imported from some other project without copying. If this is the case Xcode will regenerate ".xcscmblueprint" file and will reference the second repo again because some of your files reside in folders which belong to the second repo.

All you need to do is to ensure that you copy such files into your project and not simply reference them. Once this is ensured perform all steps described by @Piyush and the reference to the second repo will be removed.


You can delete those unwanted working copies under

ProjectName.xcodeproj > project.xcworkspace > xcshareddata

They are listed as .xccheckout files.


In my case I had an explicit workspace (in folder <workspace_name>.xcworkspace). When I looked inside the workspace folder, I found two files in the xcshareddata folder: <worspace_name>.xccheckout and <worspace_name>.xcscmblueprint. In my case the file with extension .xccheckout seemed to be all right, but I had to clean up the file with extension .xcscmblueprint by removing references to the unwanted working copy name. See Before/After: https://gist.github.com/mczenko/b7d5a1e52e167f4299e1


Need Your Help

C# How to Create a Custom (dynamic) class with Dynamic Linq using XElement in runtime

c# linq select dynamic xelement

Hi I'm trying to make a list of a generic/dynamic class using XElement and DynamicLinq, to then show in a dataGridView1.DataSource

Dynamic report in MS access will not update with source query

sql database vba ms-access

So I have a database of mechanical components. I have a search form in the database that allows the user to apply filters to a query (through the use of 5 text/combo boxes and an "apply filters" bu...