Creating branches¶
The script https://bioproj.extra.cea.fr/redmine/projects/brainvisa-devel/repository/changes/brainvisa-svn/trunk/bin/bv_create_branch in development/brainvisa_svn project enables to do that easily :
Usage: bv_create_branch branch_type projects [options]
Example: Creating 4.4 branches for core projects
bv_create_branch bug_fix aims anatomist-* axon brainvisa-share documentation soma-base soma-qtgui soma-io
The option -s (simulation) enables to print the commands rather than execute them in order to check if they are correct.
This command will also update the project_info.cmake files setting version 4.4 in the new bug_fix branch and incrementing the version of the trunk branch.
After the creation of the branch, brainvisa-cmake projets list must be updated to enable getting the new branch using bv_maker. See the paragraph Updating brainvisa-cmake projects list.
Creating tags¶
The same script can be used to create tags, that is to say a copy of the last bug_fix branch in project/tags/X.Y.Z.
It is useful to create a tag when a new release of a project is created to keep a trace of the sources in the state they are in the release.
Example: Creating 4.4.0 tag of 4.4 branch
bv_create_branch release aims anatomist-* axon brainvisa-share documentation soma-base soma-qtgui soma-io
The option -s (simulation) enables to print the commands rather than execute them in order to check if they are correct.
The project_info.cmake files will be updated.
After the creation of the tag, brainvisa-cmake projets list must be updated to enable getting the new branch using bv_maker. See the paragraph Updating brainvisa-cmake projects list.
Updating brainvisa-cmake projects list¶
<font color="red">*Be careful*</font>: The new branch will not be taken into account automatically by bv_maker. It is necessary to update it using the script bv_update_projets_list. This script parses the repository to update information about the projects, components and their branches and tags. The script can also be used to parse and update information for a subset of projects and components using the options -p (project) and -c (components).
Examples
# update information for all the components of soma project bv_update_projects_list -p soma # update information for soma-workflow and soma-pipeline components bv_update_projects_list -p soma -c soma-workflow -c soma-pipeline # update information for axon and anatomist projects bv_update_projects_list -p axon -p anatomist
The script does not commit modifications of brainvisa-cmake automatically. The modifications are done in a temporary directory and a message at the end of the script execution indicates if some changes need to be committed and if so, the corresponding commands are displayed.
After the update of bv_maker, you will have to update the sources and configure the build directory to get the new bv_maker. And then you will be able to get the new branch or tag with bv_maker sources.