SVN commit howto
This page describes the process of committing code into the svn.gispython.org repositories.
Author: Kai Hänninen
Subversion
The projects use the Subversion version control system. If you are not familiar with it, you should first read the excellent Version Control with Subversion book. The svn.gispython.org server is currently running Subversion 1.1.4.
Trunk vs. Branches
The trunk is where the mainline of development takes place. We try to keep the trunk in good shape all the time so that users can always except a working system when they checkout code from it.
Non-intrusive features and bug fixes can be committed straight to trunk. For larger features that require long term development a separate development branch should be used. A branch is a parallel line of development which does not affect the trunk. In a branch it is ok to have code that does not even work all the time. When the work is finished in the branch it should be merged back to trunk. See the next section about criteria for merging.
Creating a branch is simple with Subversion, you simple copy the current trunk as a new branch and then checkout the branch and work on that.
svn copy http://svn.gispython.org/svn/gispy/PCL/trunk http://svn.gispython.org/svn/gispy/PCL/branches/[YOUR_BRANCH] svn checkout http://svn.gispython.org/svn/gispy/PCL/branches/[YOUR_BRANCH]
When merging back the changes made in your development branch back to the trunk, you might end up having conflicts. There is an excellent visual diff tool called Meld that can save you lots of time when merging changes and resolving conflicts.
One way to use Meld in merging your branch into trunk is to checkout both the trunk and the branch and then use Meld to copy over the changes from the branch to the working directory containing the trunk. Finally you should commit the changes into trunk.
svn checkout http://svn.gispython.org/svn/gispy/PCL/branches/[YOUR_BRANCH] PCL-branch svn checkout http://svn.gispython.org/svn/gispy/PCL/trunk PCL-trunk meld PCL-branch PCL-trunk ...use Meld to apply the changes to trunk... cd PCL-trunk svn commit
Commit / Merge Criteria
Before you commit code code to the trunk or merge code from your development branch you should make sure that your code:
- conforms to our CodingStyle
- has proper documentation (docstrings and inline comments)
- implements the intended functionality
- has appropriate unit tests that exercise the new code
- passes 100% of the unit tests
- does not break other parts of the system
