2

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.

enter image description here

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?

MBurgos
  • 43
  • 5

1 Answers1

0

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>
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • I tried to do this command **`rmcomp -f "component"`**, however, it is showing a message: "not possible to remove component whose initial baseline is being used by a stream" – MBurgos Jul 27 '18 at 14:17
  • @MBurgos Did you make new baselines base on the foundation baseline of that component? – VonC Jul 27 '18 at 14:18
  • I didn't make new baseline. However, I know what is happening in this situation. Once I create a child stream, it is coming with the whole baselines. Then, it doesn't allow me to delete the component or baseline. For my issue, I believe I can fix it, if during the creation of the child stream (mkstream), I just select the baseline or component that I want there. Do you know, how to do this by clear tool ? – MBurgos Jul 27 '18 at 18:38
  • @MBurgos Any possibility to delete that child stream? – VonC Jul 27 '18 at 18:39
  • For my issue to be solved, I believe it can be fixed if during the creation of the child stream (mkstream), I just select the baseline or component that I want there. Do you know, how to do this by clear tool ? – MBurgos Jul 27 '18 at 18:43
  • @MBurgos by default, the child stream should take the prefered foundation baseline of the parent stream. If not, a simple cleartool rebase -bas xxx... would allow you to set the baselines you want (provided said baselines have been created on the parent stream) – VonC Jul 27 '18 at 18:59
  • I believe that I found the solution: mkstream -in -baseline 'list of baseline' . After this command, It is showing just the baseline needed. After that, I just rebase this baseline. – MBurgos Jul 27 '18 at 19:02
  • @MBurgos Indeed, good point. I have included your comment in the answer for more visibility. – VonC Jul 27 '18 at 19:04