Branch mastership
Branch mastership is the scheme that supports independent development work at different VOB replicas. Every branch type defined in a VOB (including the main branch type) has a master replica.
Mastership restrictions allow you to create a branch only if its creation will not conflict with an attempt to create a branch of that type at the replica that masters the type:
- Branches can be created only at the replica that masters the branch type, unless you are creating a new element.
- By default, branches can be modified only at the replica that masters the branch type. Checking out a version is considered a branch modification. However, you can change mastership of an individual branch to another replica. You can also check out a version nonmastered, which means that the checkout succeeds even if your current replica does not master the branch. In order to check in the new version, you must request mastership of the branch and (if necessary) do a merge.
The branch mastership strategy works by using branches to isolate changes for particular development tasks. (For example, fixing a defect may require changes to five elements, in which each change is made on a branch of type v1.0_bugfix.) With DevOps Code ClearCase® MultiSite, work on various tasks can be done at different replicas, each using its own branch type. The work on different branches can be propagated among replicas, and then merged, as often as required by an organization's development strategy. Because the branches of an element are independent, changes made at different replicas do not conflict.
Branch mastership is implemented at both the branch type level and the branch level:
- By default, the replica at which a branch type is created masters the branch type and all instances of that branch type. For example, the sanfran_hub replica masters the branch type object names v1.0_integration and owns the right to create and modify v1.0_integration branches in all of the elements in the VOB.
- An administrator or developer can transfer the mastership of an individual branch (an instance of a branch type) to another replica. This feature enables serial development. For example, if a developer at the Boston site needs to work on a branch of type v1.0_integration in the element main.c, the San Fransisco administrator can transfer mastership of the branch main.c@@/main/v1.0_integration to boston_hub, or the developer can request mastership of the branch.