7.4. Version control

The BCVTB source code can be accessed using the Subversion version control system under https://corbu.lbl.gov/svn/bcvtb/ , and it is distributed with the installation program.

To obtain an account, email MWetter@lbl.gov .

Please always keep the trunk of the repository in a working condition and work on your own branch for development and testing. Prior to committing changes to the trunk, make sure that all unit tests work without an error. How to run unit tests is described in Section 7.6, “Compiling the BCVTB” .

To check out a release, type

svn checkout https://corbu.lbl.gov/svn/bcvtb/tags/releases/0.1.0/bcvtb

To check out the trunk, type

svn checkout https://corbu.lbl.gov/svn/bcvtb/trunk/bcvtb

For own development and testing, create a branch using

cd branches/[your_login]
svn mkdir ../[your_login]/work
svn copy https://corbu.lbl.gov/svn/bcvtb/trunk/bcvtb ../[your_login]/work
svn co   ../[your_login] -m "Checked in working branch"

Prior to committing changes to the trunk, make sure that all unit tests work without an error. How to run unit tests is described in Section 7.6, “Compiling the BCVTB” . If all unit tests work without an error, proceed as follows:

To merge changes from your working branch to the trunk, proceed as follows:

  1. Do a dry run to see what happens:

    mwetter@localhost:trunk$ svn merge --dry-run https://corbu.lbl.gov/svn/bcvtb/trunk https://corbu.lbl.gov/svn/bcvtb/branches/[your_login]/work ../trunk
    D    bcvtb/bin/file1.txt
    A    bcvtb/bin/file2.txt

    Here, file1.txt will be deleted and file2.txt will be added.

  2. Merge the files:

    mwetter@localhost:trunk$ svn merge https://corbu.lbl.gov/svn/bcvtb/trunk https://corbu.lbl.gov/svn/bcvtb/branches/mwetter/work ../trunk
    D    bcvtb/bin/file1.txt
    A    bcvtb/bin/file2.txt

    This updates the local copy of the repository.

  3. Run the unit test by running from the bcvtb/example directory the command

    ant unitTest

  4. If successful, commit the changes in your local copy of the trunk to the repository:

    mwetter@localhost:trunk$ svn commit -m "merged changes from mwetter/work branch to trunk"

  5. If there are problems and you need to revert to the latest copy of your local repository, type

    svn revert -R ../trunk

For SVN instructions, see the online book Version Control with Subversion : http://svnbook.red-bean.com/nightly/en/index.xhtml

For SVN clients, see http://subversion.tigris.org/project_packages.html