Control Rule Block
The control rule block is defined by the author. The standard description provided by clearcase is the time rule block and the branch rule block. These rule blocks are set to use the same-time or-mkbranch option if there are several configuration items, the following describes the time and branch rule blocks respectively.
1 Time rule Block
The format is as follows:
TimeDate_time
Rule line
End Time [Date_time]
The matching rule can be a standard rule block or a control rule block or another rule block. If the time rule block is re-embedded, the embedded rule block complies with the embedded time definition. After the embedding, it complies with the outer definition. For example:
Element * checkedout
Time :02
Element.../test3.txt/main/test_config_spec/latest
Time 17: 00
Element.../test1.txt/main/test_config_spec/latest
End Time :00
Element.../test4.txt/main/test_config_spec/latest
End Time :02
Element */main/test_config_spec/latest
Element */main/latest-mkbranch test_config_spec
It is equivalent to the following rule blocks:
Element * checkedout
Element.../test3.txt/main/test_config_spec/latest-time :02
Element.../test1.txt/main/test_config_spec/latest-time
Element.../test4.txt/main/test_config_spec/latest-time :02
Element */main/test_config_spec/latest
Element */main/latest-mkbranch test_config_spec
If the last time rule block does not define the end time, the time rule takes effect until the last row. Generally, date_time is not added after end time. However, if there is nesting, it is better to add a time description, which must be consistent with the time described in the first unmatched time found up.
If the matching rule embedded in the time rule block has the-time option, the time option that comes with the matching rule takes effect, and the time rule does not apply to the matching rule with the time option.
2 Branch rule Block
The format is as follows:
MkbranchBranch-type-name[-Override]
Rule line
End mkbranch [Branch-type-name]
It is equivalent to adding-mkbranch branch-type-name after each rule row. If the internal rule line has the-mkbranch option and the-override option is not used, the mkbranch option that comes with the internal rule line is applied. If the application-override, the defined branch overwrites the mkbrranch option customized by the internal rule line. If the internal rule row is checkedout, mkbranch is invalid.
Branch rule blocks can be nested. In the case of nesting, it is best to add the branch name after end mkbranch; clearcase will go up to the first unmatched mkbranch. If the names are inconsistent, an error is prompted to prevent misoperation.
The branch rule blocks can be nested in the branch rule to create multiple branches. For example:
Element * checkedout
Element */main/test_config_spec/test_config_spec_sub/latest
Mkbranch test_config_spec
Mkbranch test_config_spec_sub
Element */main/test_config_spec/latest
End mkbranch test_config_spec_sub
Element */main/latest
End mkbranch test_config_spec
This branch is equivalent
Element * checkedout
Element */main/test_config_spec/test_config_spec_sub/latest
Element */main/test_config_spec/latest-mkbranch test_config_spec_sub
Element */main/latest-mkbranch test_config_spec
In this case, the selected configuration item Version checks whether there are branches. If not, a new branch is created.