Search code examples
clearcasecleartool

How can I obtain foundation baseline for a component?


I have used below command but it provides all foundation baselines.

 cleartool descr -fmt "%[found_bls]CXp" stream:myStream@\myPVob

Is there any way to get foundation baseline of a single component?


Solution

  • I mentioned before how to get the foundation baselines for a stream.

    But fmt_ccase does not include foundation baselines for a component.
    The only two directives appplied to an UCM component are:

    • %[initial_bl]Xp: Initial baseline of the component
    • %[root_dir]p: The root directory for the component

    So you have two options:

    • %[component]Xp (for an UCM baseline), for describing each baseline you get from %[found_bls]CX, getting each component name that way.
      Once you get the expected component name, you know its baseline
    • %[components]CXp (for an UCM stream), listing the components for which the stream has foundation baselines.

    If the second option (%[components]CXp), applied to a stream, lists the component in the same order than it list baselines with %[found_bls]CXp (for a stream), then it would be quicker (the baseline for the third component would be the third baseline listed by %[found_bls]CXp)

    But if the order is not the same, then you must loop on each baseline from %[found_bls]CXp, and describe each of them with %[component]Xp, until you get the component you are after.