Cleartool - How to rebase and leave just one component in the stream

爷,独闯天下 提交于 2021-02-08 05:29:19

问题


I would like to know if there is a command in cleartool to rebase a specific component and take out the other component that is not necessary? For instance, at ClearCase project, you have the option to rebase the baseline by component, and you also can remove the component you don't need by click on Remove button. Thus, once you remove it, the code for this component won't be there after you complete the rebase.

The command that I use to rebase a baseline is:

rebase -bas 'baseline code'
rebase -complete

However, this command above leaves the other components in my view. So, based on my screenshot, I would like to rebase the ZC DUAT_ZC, and delete the ZC_DATA (as I do when I push the Remove button) using command line. Any suggestion?


回答1:


The cleartool rebase command cannot delete/remove a component, but cleartool rmcomp can.

Test it on a test component first.

If a UCM project lists the component that you are attempting to delete, the warning Project project-name lists this component as a modified component is displayed.
If you confirm the deletion (or use -force), the component is removed from the project's list of modifiable components.

If the component is removed for all stream, then another approach would be to lock the foundation baseline as obsolete: that would make said baseline invisible.

Note: the component needs to be read-only, using cleartool chstream:

chstream -dmodcomp component_selector

As noted by the OP MBurgos in the comments, to create a new child stream directly with the right components, use cleartool mkstream:

cleartool mkstream -in <projec-selector> -baseline 'list of baseline' <child stream name>


来源:https://stackoverflow.com/questions/51547814/cleartool-how-to-rebase-and-leave-just-one-component-in-the-stream

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!