Branch Development

VisIt provides several scripts that automate the creation of branches using svn. The following table lists the desired action and the script or svn commands needed to accomplish the action.

What you want How you do it
To create a branch from the mainline (i.e. ClearCase mkdev) Script: mk_branch_from_trunk
To checkout the branch directory (i.e. ClearCase ct setview -login) Script: co_branch

To bring in changes that were put on the mainline / trunk Script: merge_trunk_to_branch
To bring in changes made directly on your branch that occurred after the checkout. One example of a change of this type would include you doing work on another machine on this branch, doing a commit, and then wanting to pick up these change. Another example would be if another developer was collaborating on this same branch. Outside of these examples, you probably will not need this use case. SVN command: svn update
To check in your changes to your own branch SVN command: svn commit

To merge your changes to the trunk. (The result of this step is files modified on your trunk. You then must review the changes.) Script: merge_branch_to_trunk

To commit the changes from the merge (after being reviewed) SVN command: svn commit

To destroy the directory corresponding to your branch in the SVN repository. Script: del_branch
To remove the directory on your personal file system that was a checkout of a SVN branch. Unix command: rm -Rf


Here is the procedure for making a change to the code using branch development. These are the exact commands you would use for branch development.

What I typed What it did
% mk_branch_from_trunk tube_changes Created a directory in the branches directory of the SVN repo for me to make my changes.
% co_branch tube_changes src/operators/Tube Checked out the directory "Tube". It was placed in $PWD/tube_changes/Tube
% cd tube_changes/Tube ; xml2makefile Tube.xml ; make ; vi avtTubeFilter.C Did some development on that directory
% svn status

Output is:

"M      avtTubeFilter.C"
See what files have changed during my development on this branch.
% svn commit -m "Add small changes to Tube operator" Commit my changes to the repo. These changes only affect my branch.
Optional: merge_trunk_to_branch This merges the trunk into the branch. You need to do this as often as you merge the mainline to your personal view in CCase.
% cd ~ ; co_trunk /src Go to a check out of the trunk. When merging, you have to be inside of a directory that you merge into. (This is because it needs a place to put temporary files when there are merge conflicts.

% merge_branch_to_trunk tube_changes Merges the changes from tube_changes into the trunk.
% svn commit Commit the changes on your working copy of the trunk to the Repo.
You're done. Send e-mail to team, etc.

Using multiple machines

With branches, you can do development on multiple machines simultaneously. The motivation may be to do cross platform work, or it may be because you are doing development at home and also at work and want to share the results between the machines.

Here are the steps:

  1. mk_branch my_multi_machine_work
  2. Go to machine 1.
  3. co_branch my_multi_machine_work /src
  4. Go to machine 2.
  5. co_branch my_multi_machine_work /src
  6. Do work on machine 1.
  7. svn commit
  8. Go to machine 2.
  9. svn update
  10. Repeat as necessary.

If you are doing cross platform work and you want to share data between the two builds:

  1. Go to a shared directory between the machines.
  2. co_branch my_cross_platform /data
  3. Then machine 1 and machine 2 can access the data.