As described in
Parallel Development, we use
branches in SVN to snapshot the code base that reflects the released version of the project. This allows new development to carry on in the
TRUNK; while still allowing maintenance to the released version to occur in the branch.
As we find new bugs, we will decide if they need to be fixed in the branch. Those items that are deemed critical will be fixed in a special milestone. For example, current release is BETA-2, for hot fixes, we would create "Beta-2-1" as a new milestone/branch.
Branch Development Process In short, you make your eclipse workspace be identical to BETA2.1 Branch. Do your fixes, check them into the branch. Then you decide if you want to promote the fix to the TRUNK or not (using the version control MERGE feature – include 'dry run' if needed). In general, most of the fixes also belong in the trunk.
Table of Contents  | Benefits of SVN Merge Yes, you could copy the good file off to the side (or in your paste buffer), and then paste it into the branch file and commit. However, using the SVN merge feature is better because that sets the svn:mergeinfo metadata so that you can track the true history of a file. Copy/pasting does not do this. |
Moving forward, developers may be required to change code in different branches other than the main /TRUNK/. If you need to do this, follow the process below to switch your project to the appropriate branch.
 | Project, Folder, File? If you need to do extensive development in a branch that relies on deep compiles of code, do the whole project. Just a few stand-alone changes in a well-isolated area? Do the Folder. A simple tweak of a single file that is isolated? Just do the file... |
Setting Up Your Workspace
tbs
Making Changes
tbs
Merging From Branch To Trunk
tbs
Merging From Trunk to Branch
This is most generally used for a file or two, though you could do it for an entire folder. Basically move to the Branch, then go to the file(s) you changed, and merge in the TRUNK changes.
NOTE: you don't have to merge just from the TRUNK, these instructions work if you want to merge from one branch to another. It is simply that we often need to know how to grab a change in the TRUNK and put it into the branch that we want to make a build from.
If you only need to merge one or two files, you can actually specify individual file locations in the from/to fields (rather than the top-level directory which would merge the entire tree). Merging single files can be safer because there could be other changes in the trunk that should not be merged.
tbs