Question

this is kind of a follow up to this question: ClearCase UCM: Get latest version from Dev-stream

I need a dynamic view to have the LATEST (or CHECKED_OUT) version of certain components of a UCM VOB and at the same time specific baselines for other components.
For components where I want to include a specific baseline I can just include them with
element component_1/... BASELINE
where BASELINE is just a name of a baseline (without the need to specify a stream or anything).
The folder of the component is later included by a element * /main/LATEST-directive (at least to my knowledge).

As mentioned in the above mentioned link I can also add a line like
element component_2/... /main/INT-STREAM/DEV-STREAM/LATEST
which should give me the latest version of DEV-STREAM.
Now I found out that sometimes (when the DEV-STREAM was 'branched' from version /main/0 I need a
element component_2/... /main/DEV-STREAM/LATEST
to get the latest version of this component. And in other cases there is no DEV-STREAM (because the file was obviously never changed and therefore the DEV-STREAM is not created), so I need a third line
element component_2/... /main/INT-STREAM/LATEST.
And the same applies to version CHECKED_OUT.

As I want to create the config spec by script I would either need to find out where the component_2 is located (in the INT-STREAM or the DEV-STREAM) and where the DEV-STREAM was branched off or I would have to include 6 lines (one of them should match) for each component - in comparison to the one line for the baseline. Obviously I wouldn't want to include each file (there are VERY many) but would like to be able to simply specify the component with all its subfolders, just like for the baseline.

Thanks for reading - and obviously for any answers

Was it helpful?

Solution

You can avoid all those multiple rules with:

element component_2/... .../DEV-STREAM/LATEST
element component_2/... .../INT-STREAM/LATEST -mkbranch DEV-STREAM

The order is important, and the '...' allows you to select a branch without knowing of its exact parent branch.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top