Reputation: 54251
I have never used version control in my life. A friend of mine wants me to access his project on my machine using Xcode. All he has given me is a URL. So, the question is: how do I get said source code?
Thank you ;)
EDIT 1
Please keep in mind I just need to download the source code. I don't have to do any updating or version control myself. I would think that this should be simple enough, like log in here, download there, etc. no?
Upvotes: 1
Views: 2109
Reputation: 351
First, if you are unfamiliar with svn, its best to brush up on that before starting this. There are many many source within google reach so I won't dwell on that here. Now, on to Xcode...
Before you can reference a repository you need to se it up. Here is how:
In Xcode select Preferences from the Xcode menu and choose the SCM tab from that window. That area will list the repositories you have set up, presumably none at this point. Add a repository by clicking the plus sign on the bottom left under the repository list. Give it a name (your choice) and set the SCM System to be subversion. Clicking OK will bring up an empty template for the server settings. You can fill this out by entering the entire URL with username, or ignoring the URM field and filling in the other details.
Note : assuming you do this field by field, I strongly recommend putting in the scheme (i.e. https) last to prevent Xcode from attempting to log in before the info is complete. It will basically try and authenticate on the fly, and on several occasions this has caused account lock-outs when it tried to authenticate multiple times with incomplete passwords.
If all went well, there will be a little green light under password with the word Authenticated beside it.
At this point the repository is set up. You should be able to browse it and work with it by selecting Repositories from the SCM menu in Xcode. From there you can checkout the projects you like.
Once you have a project directory that you have checked out from subversion you can set it up to show the status and do check ins etc from Xcode. This is very simple - it is just not very obvious.
Upvotes: 2
Reputation: 1384
You should really take a quick look at the Subversion book, particularly the "Subversion In Action" section of the Fundamentals chapter. It's short and concise. I'm not familiar with any XCode integration, perhaps another answer can provide more advice...
Edit: If you already have the svn client installed, you can use the "svn checkout {url}" to get the source. Also, since the Subversion network protocol is HTTP-based, you can usually use your web browser to get at the individual files, by visiting the repository URL (assuming your friend is exposing the repository via HTTP, and not svn+ssh). Of course, this won't get you all of the files in one blast- you will need the Subversion client to do that. Fear not, though, the client is pretty lightweight.
Upvotes: 0