Introduction
Using Subversion can be a bit of a challenge. This document attempts to describe the interaction between release branches and the trunk.
The best way to work with a release branch and trunk is to make all changes for the release in the release branch and then merge them back into the trunk. NOT the other way around. There are two reasons for this.:
- The creation of the release branch provides a known point in time. This provides a reference point which allows us to know whether a change has happened either before or after the branch was made.
- The trunk can contain changes that should not be in the release. If you were to make changes in the trunk and then merge them into the release, then you could also merge in changes that weren't intended for the release.
Web Access to Subversion
Basic Procedure
- Checkout the release branch into it's own directory:
svn co svn+ssh://gamay.ucsd.edu/cellar/common/svn/cytoscape/branches/release_branch cytoscape_release
Make changes in the cytoscape_release directory.
Test changes in the cytoscape_release directory.
Commit changes in cytoscape_release directory.
Determine the revision number that created the release branch. Run this command in the cytoscape_release directory.
svn log --stop-on-copy
The --stop-on-copy argument tells the log command to only look back as far as the last "copy" command, which is the command used to create a branch. Among other things, this log command will tell you the revision number of the copy command, which you need to know to use the merge command. Assume that this command tells us that the release branch was created at revision 1234.- Now check out the trunk so that you can merge the changes found in the branch back into the trunk.
svn co svn+ssh://gamay.ucsd.edu/cellar/common/svn/cytoscape/trunk cytoscape
Change directories into the trunk directory: cytoscape.
- Now merge the changes from the release branch into the trunk:
svn merge -r 1234:HEAD svn+ssh://gamay.ucsd.edu/cellar/common/svn/cytoscape/branches/release_branch
This command tells subversion to merge all of the changes between revision 1234 (when the branch was created) and the HEAD (the latest in greatest code in the branch) that have occurred in the release_branch branch into the current working directory (which is the trunk). Remember, this command only looks at changes that have occurred in the branch.
Test the changes made in the trunk.
Now commit the changes in the trunk directory: cytoscape.
- Now both your branch and trunk should have all of the latest and greatest changes made in the release branch, but the trunk may still have other changes that aren't intended for the release.