Version Control
From PRADO Wiki
We use SVN to do version control of PRADO code base. Each developer is given a privileged account for accessing the PRADO repository. The main repository of the PRADO project is located at: http://svn.pradosoft.com/repos/prado.
Branches
A key concept in development with version control is branch. A branch represents a line of development for a specific purpose. For example, a branch may be used to keep the revisions of the code for a major feature development.
Branches may be merged together at appropriate time to form an integrated work from different parties.
PRADO development mainly involves three types of branches:
- main branch: this branch contains all code and data and should be stable in most of the time. When appropriate, a release branch may be created based on the main branch.
- release branch: each major release has such a branch which is used to maintain the release. Bug fixes for a release should be checked into the corresponding release branch. A minor release may be made based on a release branch when appropriate. Release branches should also be stable in most of the time. Release branches are regularly merged into the main branch.
- feature branch: a feature branch is created to accommodate the development work for a major feature. Feature branches do not need to be stable. However, when a feature is completed to be merged into the main branch, the feature branch must be in a stable status.
Under certain circumstances, some interim branches (e.g. merge branches) may be created for specific purposes.
Repository Organization
Based on the above branch classification, PRADO repository is organized as follows:
- trunk: this is the main branch that contains all code and data.
- branches: this is the folder containing release branches and feature branches. For example, a 3.0 branch is created under this folder for releasing and maintaining the v3.0.x releases.
- tags: this is the folder containing named snapshots of different branches. For example, a 3.0.0 tag is created under this folder which refers to the 3.0.0 release. Note, a snapshot is NOT a branch. In SVN term, a snapshot is a specific revision.
Working with Branches
First, make sure which branch you should work on. Usually you should work on a branch other than the main branch. For example, when you are fixing a bug found in the 3.0.0 release or developing a minor feature or enhancement, you should work on the 3.0 branch (located under branches/3.0). If you are working on a major feature, usually there should be a feature branch for that. If not, you may apply for creating a feature branch.
Second, do not merge branches unless you are told to do so.
Checkin Criteria
The following criteria should be followed in order to check in new work,
- Have another developer to review the new work
- Pass relevant unit tests
- Pass relevant functionality tests
- A short message describing the changes must be accompanied with each checkin.
Try NOT to check in a large amount of work at a time. If you do so, make sure the code passes ALL unit tests and functionality tests on ALL major platforms that PRADO claims to work on.
An exception to the above criteria is when developing new features on a feature branch, where frequent checkins are needed. However, to merge the feature branch to the main branch, complete tests and build must be done.

