How does Hierarchy Logic in RTC Source Control Components work?
Problem: When the component is selected, multiple sub-components are getting added to the stream.
Steps to reproduce:
1. Select the repository workspace.
2. Click Add in components.
3. Select the option " component in another repository workspace or stream"
4. Select the first component
5. Click Finish
Actual Output: The selected component is adding sub-components into the repository workspace.
1) Reason for adding sub-component into the workspace when root component is added
If a user operates on a component that has subcomponents (add component, remove component, create baseline, and others), the operation will be applied to the entire component hierarchy as fully as possible. The intent of is that a component and its full set of subcomponents behave, and can be operated on, as a unit.
2) Reason for not adding root component into the repository workspace when sub-component is added
The parent component is dependent on all its subcomponents, whereas the subcomponents are independent components. They can be developed individually and may be by different teams as well. Hence, any operation on them directly will not affect the parent component in the component hierarchy.