Reputation: 62789
Since we are developing on a deployed system, we are trying to make better use of branching--Up until recently just about everything was just checked into trunk, deployed to test/staging and then production. It means we have to be really careful during the "Testing" period, and we'd still occasionally get unwanted changes sent to the server with little testing.
My thought is that the best way would be "Minor" patches go straight to trunk, major features become feature branches that are reintigrated into trunk when complete, and a "Production" branch that always matches the server state that we can merge into just before deploying.
The main benifit offered here is that you can pick and choose what changes to roll out to production--if you like you could grab a single checkin or branch and send it to production without involving all the other branches.
On the other hand, it seems to be best to have branches Integrate with trunk often--pull up changes so they don't accumulate and make a nasty merge.
So those two patterns could lead to the case where you wish to merge a branch with Production to bring over an imporant feature but that branch has already "pulled in" changes from trunk you don't want to ship.
Can SVN handle this? Are there really good practices that work for groups developing code that is deployed every couple weeks?
Upvotes: 3
Views: 11541
Reputation: 15525
I think that all of what you describe is possible with (a current version like 1.7 or 1.8 of) Subversion. Here are the steps to take:
Your branches will be developed over time like this:
Branching and Merging of the SVN Red Book explains everything that you need technically, but is not so clear how to do it in different business contexts (my personal opinion). I don't have found a resource that explains all options and drivers behind them in enough detail ...
Upvotes: 2