Xcode: changing SVN repo details - xcode

This is about outdated repo details inside XCode. The case is:
I'm reusing a supporting library from an old project in a new one.
I used "Add files to X project..." functionality to copy them to the new place.
"Automagically" the files were copied with a reference to an old SVN repo, that don't exit anymore.
So... Now I have a project with 2 repos visible, incl. one inactive. I can't commit changes to copied files, as the old repo is still linked.
Two question here:
Is there a way to edit old repo data?
Is there a way to move the copied files to the new repo, where the rest of the project is?
Ultimately I need to commit both parts ;)
Thank you.

OK. So resolving this issues required several steps to be performed. Not sure if all were required, but the eventually I got it right.
Commit all changes you can (in my case all but the folder that was linked with the old repo). Archive your projects.
Go to the root folder of your project and use svn switch --relocate command to merge repos. Details: how to change svn settings
Remove the project from XCode (via Organizer) delete the entire project folder
Remove repos in the Organizer
Fetch whatever was committed in the SVN again. Do that and create a new project. If you see any missing files highlighted in red, like my folder that couldn't be committed, delete it.
Manually add the missing files / folder that to the project, from a local copy.
Now you can commit to the repo!
Tiresome, like most things in XCode... ;)

Related

Xcode won't let me commit entire project (will only let me commit individual files)

I am attempting to commit and push an entire Xcode project to a github repo that contains other files and folders. I created this project (but not the repo), made the files and then connected it to the github repo (so my Xcode project does not contain everything in the repo). When I now try and commit and push, Xcode only gives me the option to do this for individual files, not the entire project. When my friend then tries to pull, he gets the files but not the .xcodeproj file, which I believe is necessary to run the simulator. We were thinking he could create a new Xcode project with the files on github in it and then work from that, but we are worried that could create different branches and merge conflicts. When he tries to commit and push projects on his computer, he can right-click the root folder in the file hierarchy and it gives him an option to commit and push the entire project. However, when I do this, it just lets me commit individual files. The same thing occurs if I try to commit and push via the source control tab at the top of the screen. Why can I not commit and push the whole project?

Exchanging source control from Git to SVN in Xcode

My project previously was in the Git source control (cloudforge.com). Now I want to exchange it to SVN source control. (Why not, my team members are not familiar/feel-comfort in Git). But when I want to checkout it already shows that it is yet in the Git source control.
I can't delete my project from git. It shows this error
But I have configured this project into svn by other Mac mini and able to checkout and commit.
My Question:
Why I can't checkout this project from this Mac as I can do it from other Mac?
OR
How can I delete my project from the first screenshot? Because there I can't find any option to delete.
Are you wanting to import your complete git repository into a Subversion repository, including history and log information? Or are you simply wanting to take a snapshot of your current project and make a Subversion repo out of it?
If you want to import the full history, then this may or may not be possible. Git supports branching/merging schemes that Subversion can't handle. It's only possible for fairly simple, linear project histories. See this other question for more details and options.
If you only want to move your current code snapshot into a different repository type, then the process should be relatively straightforward. All of git's metadata is stored in a normally-hidden folder in the root of your working copy named .git. Most IDE's flag a project as being connected to a git repository based on whether this folder is present and whether it has the expected contents. I'm not 100% certain about xcode, but here's what I typically do with other IDEs:
Make a copy of the working copy directory
Delete the hidden .git directory from the copy (plus any metadata files created by your IDE)
Import the copy into the IDE as a new project
At this point, your working copy will have no metadata and the IDE shouldn't associate it with any particular repository or version control system. You should now be able to import it into a Subversion repository using the same process that you would for a new project.

Xcode build folder appearing in svn

I am currently working on a project which is included in a versions(svn)repository. Although I'm not sure, I think I might have changed some settings in Xcode, affecting the way the source control saves the build folder in the repository. I was told it is a bad practice to commit the build folder, and asked why have I done that, but I had no answer at the moment. A screen will elucidate this more clear:
Even if I tried to delete (or ignore) those files from the repository, they are still created after I build the project. How should I proceed in order to prevent those build folders appear in versions' project tree?
Adding versioned folder to ignore-pattern does not affect data in SVN
You must ignore and remove folder from SVN, but keep it locally
For CLI it will be svn pe ... in the parent of build folder and svn rm build --keep-local (I don't know XCode GUI's equivalents)

can't commit changes in xcode 4

i set up a project to be on version control. I imported the project without problems to the server repository. Now, when i commit changes, they seem to be committed as i don't get any errors and it says "Committing" but when i go to check the changes in the repository, i noticed that the changes are not there, so there was no commit even if xcode said it committed. Has anyone had this issue? I don't know where to look to fix it.
Thanks in advance
Not sure if this is your problem, but I would check if Xcode is using your repository or one it set up itself. Look at Repositories in the Organizer window and see if there's anything there you don't want. If there is, you'll have to remove it from that list and delete the hidden .git folder in the project's directory.
Problem fixed! The solution was to erase the project from my hard drive and do a checkout from the repository. That way subversion would know which project was under version control.

How to configure an xcode project to work nicely with SVN?

I'm just getting started with xcode. I created a sample new project, and would like to import it into my svn repository. I configured xcode to be aware of my repository, and xcode claims the it has successfully authenticated the connection.
I cannot, however, seem to figure out how to get my actual xcode project to manage its source in the repository. I select Project Settings -> SCM Repository -> "myrepository". But that doesn't seem to have accomplished anything. When I try to "commit entire project", xcode tells me: "/Users/me/Documents/test1" is not a working copy.
Any ideas? I'm probably missing something obvious, right?
Did you check out your subversion repository folder for your project to your local directory first?
If not, it's not really a working copy at all. A "working copy" is a local checkout of a repository folder, tracked using hidden .svn folders.
If you haven't checked out a repository folder, all you have is a folder. Subversion won't be able to handle that at all.
I suggest you read the Subversion e-book, and specifically the part about working copies.

Resources