Branch Modules
Description of GUI and options
Start Menu Path: Project Explorer Menu / Configuration Mgt / Branch Modules
Function: The Branch Modules tool is used to copy modules from one branch to another. This can be due to the creation of a new branch or at a later time, when a module is branched incrementally.

The Branch Modules tool presents a GUI to the user as shown above.
- The "Select Modules" button opens up a Tag List Editor window that allows to select the modules that should be branched. As explained in the Branch Concepts page, the modules need to be baselined.
- The "Modulename" lists the selected module versions.
- Using the "Browse" button, the user must choose the target branch (project) to which the selected module versions shall be copied. It is not possible to branch one module or any of its parallel copies to the same branch twice. The tool will check this condition during branching and alert the user. The "Select target project" field will show the name of the target project after the selection.
- Once a target project has been selected and at least one module has been selected, the "Start Branch Copy"button is activated.
- If the "Recreate links to foreign projects" checkbox is active, the Branch Modules tool will copy all links of the source modules. If a link target cannot be found in the target branch and is not part of the branch operation, the copied link will point to the same object as the original link.
- If the "Recreate links to foreign projects" checkbox is inactive, then those links for which no link target module exists in the target project will not be copied and a warning will be issued after branching.
- The "Redirect links to object that are missing in the target branch to objects in the source branch" checkbox controls how BranchManager deals with the case that the target module for a copied link can be determined, but the target object for that link does not exist or is deleted. If all links should be kept in the target module, then this option (and also the previous option) should be activated. If so, BranchManager will create a link to the target object of the original link. If deactivated, the link will not be copied and a warning issued.
- The "Do not allow new links outside the branch" checkbox, affects how BranchManager copies the Link Pairing Restrictions (also called 'Link Settings') of a module. If active, BranchManager will only copy link pairings that have a target module inside the target branch. If inactive, BranchManager will copy all Link Pairing Restrictions (also the ones that point to modules outside the target branch). This option therefore controls if the user shall be able to create links outside the target branch.
- New option "Create log of branching operations" (default off), allow to log branching operation to a file. When this option is checked, after clicking on ‘Start Branch Copy’ button, a dialog box will be open to define the log path. By default a filename is define (maybe you will need to create this file first, and select it in the dialog box).
Creating a Branch with the branch modules script
The creation of a branch requires the following actions:
- Starting the branch modules script
- Selecting a list of source modules and their baselines to be branched
- Selecting the target project
- Setting the branch options
- Starting the branch operation
Starting the branch modules script
Select the source project from the Project browser. Use the plugin menu (Configuration Mgt) and select “Branch Modules”. This will pop up the GUI as in the picture above.
Selecting a list of source modules and their baselines to be branched
For selecting the module baselines to be branched, the Tag List Editor dialog is used. This can be the entire contents of the source branch or some subset. BranchManager also supports branching modules from different source projects to the same target project. It is mandatory that for all source modules, a baseline to be branched is selected. This baseline represents the ‘common base’ of the two modules and plays a crucial role for merging.
Note: To not loose track of the existing branches in your database, it is recommended that all source modules come from the same DOORS project (branch).

Selecting the Target Project
The target project can be any DOORS project, except the project where the source modules come from. It is recommended that generalized rules are instituted in the organization based on the type of branch. For example, a personal branch would likely want to be clearly owned by an individual user id found in the hierarchy of projects and folders. However, shared branches are likely defined as siblings of the source branch as a parallel path. The only constraint of the tool is the usage of a project as the source and destination of a branch. Organization rules can be applied beyond this level. After pressing the "Browse" button, the destination project for the branched modules must be chosen.

This will identify the root from which the branch will be created. Inside that project the target modules will be created according to their relative position in the source branch. That means that if the source project looks like this:
Alarm System
Customer Requirements
Customer Requirements
System Requirements
System Specification
Component Requirements
HW
Buzzer
Surveilance
And the ‘Buzzer’ module is branched to a target project ‘Alarm Clock’, then the module will be created under:
Alarm Clock
Component Requirements
HW
Buzzer
Note: After branching, the branched modules can be renamed or moved to another folder, or even another project (however care needs to be taken that there is not already a parallel module in that branch!). Moving or renaming the module has no impact on a later merge. In the module history of the branched module, the original path and name of the module will be visible. This can be confusing when trying to retrace the history of a module. Therefore moving a module to another branch is not recommended.
Setting the branch options
Depending on the use case for branching, the checkboxes define how BranchManager deals with links during branching. See Description and Options.
Starting the branch operation
Press the "Start Branch Copy" button.