Re: Xcode and SCM
Re: Xcode and SCM
- Subject: Re: Xcode and SCM
- From: Frederick Cheung <email@hidden>
- Date: Wed, 13 Jun 2007 17:54:19 +0100
On 13 Jun 2007, at 17:15, Keith Duncan wrote:
I'm using Xcode to manage all my projects, the number of which has
grown sufficiently large that I need to consider some form of SCM.
I have decided to go with Subversion and have already installed it,
but I still have some questions as to how I should organise my
projects/SCM system.
My first question is how should I arrange my projects into
repositories? Should I create a repository for each of my projects
or have one global repository for all my projects? What are the
pros and cons of each approach. Am I able to implement a shared
code repository that allows me to keep my generic code is one place
and accessible by all my other projects for checkout/commit? Xcode
doesn't seem to allow it as each project can only be backed by one
repository.
I like having one big repository. Not much downsides as far as I'm
concerned and the upside is that it is easy to copy/move/merge code
between projects
Another problem I have is that I have a assortment of small
projects which I use to prototype classes outside the context of
the app they were originally developed for, my shared code
resources. Would it be best to back each individual project by SCM
and have my Xcode projects refer to these shared files byref
instead of copying them to their own source root? That would ensure
that they are always built against the most recent working copy of
the shared source, but would these files interfere with the app
project's own SCM system? I wouldn't want multiple copies of the
shared source files floating around, that's the issue I'm try to
fix now. This approach would also mean that were the functionality
of one of these shared classes change sufficiently to break another
app, the other app couldn't roll back to a copy that did work for
it and the code would have to change. This is unlikely to happen
but I am trying to look ahead.
The online documentation I have found wasn't too enlightening, and
has left me confused as to what SCM can and cannot do for me. Any
help/insight would be much appreciated.
You might want to use svn:externals which are basically a way of
saying 'the folder foo should be gotten from this part of the
repository'
Say you have a my_app project, and you have some shared code called
my_plugin
The layout of my_app looks like
my_plugin/
trunk/
my_plugin_code here
tags/
version_1
version_2
my_app might look like
my_app/
trunk
my_app code
my_plugin
Where my_plugin is actually an svn:externals to my_plugin/tags/version_1
You do your development of my_plugin in trunk: changes have no effect
on your apps.
When you've got something your happy with you tag it as version_3 and
update the svn:externals in my_app to point to the new tag. If it all
goes bad, you can always set it back to the previous version.
Subversion can help you merge changes from the trunk into one of the
tags. So for example my_app is using version_2, while working on
trunk you discover a serious bug in my_plugin. You want my_app to use
the fix for this bug, but you're not ready for my_app to use the
latest trunk version (because it's not ready, or introduces api
changes etc...). The merging stuff helps you merge a given changeset
from trunk into that tag.
A good place for you to start would be the subversion book (http://
svnbook.red-bean.com/) which has a lot of stuff about what subversion
can and cannot do, common use cases etc...
Fred
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden