Tuesday 02 June 2009

Community Based Service in South Africa

I have added a link to my Community Based Service blog at the University of Pretoria. Pop over for a look and please leave some comments

Thursday 21 May 2009

Photography

On a recent trip to Cullinan, South Africa, I took the following pictures. I feel that my skills are slowly improving. Please leave comments
Posted by Picasa

Merging to Trunk in SVN

One of the main problems that I have at work is to keep my development branch in SVN current with the TRUNK which we use for releases. I have just recently discovered that this can be easily solved. Before I give the explanation, I think it would be prudent to explain the methodoogy at our company first, just so that there is a clearer overview of what is actually done with SVN and how our development cycle works.

When we migrated from CVS to SVN each developer was given a branch of the newly created TRUNK to work in, this generally split from the TRUNK at Revisions 1-7 where the revisions reflected name changes etc. As new code is developed and reaches a stable state, the changes are merged back into the Developer Branches. Our SVN Manager then merges the changesets from the Branches into the TRUNK for the release.

This however causes problems as we are never sure about the current state of the TRUNK. I have instituted a polica whereby after a Release has been created from the TRUNK, I merge all changes to the TRUNK back into my branch, this means that I receive my own changes to the TRUNK and everybody elses!

If this has not been done fro sometime, it is inevitable that one will receive many SVN conflicts, but the rule of thumb here should be followed and that all changes in TRUNK will have precedence over changes in the Development Branch.

To get all changes from the TRUNK into the Development Branch, do the following:
  • Enter your working directory e.g. /mod
  • Execute SVN merge from the TRUNK into your working directory e.g. SVN merge http://svn.server.intevo/teambox/mod
  • This will merge all changes to from the TRUNK into your working directory
  • Resolve conflicts, remember changes in the TRUNK should always take precedence unless it is code you are actively working on
  • Commit the changes to your working directory to your Development Branch and comment it in the following manner Backport to TRUNK [xxxx]where xxxx represents the highest revision to the TRUNK. This will allow you to merge a range of revisions to your Development Branch in the future instead of all revisions from where your Branch split from the TRUNK
This method may be time consuming, especially when executing it over the web, but it ensures that all changes to the TRUNK are correctly merged into your working directory