Question

In clearcase UCM after rebase or any stream configuration change using one view the other view require "setcs -stream(CLI)" or "synchronize with stream(GUI)" button is enabled in view properties window. How to identify my view is out of sync from stream through commandline? What is the command to identify that my view is out of sync?

Was it helpful?

Solution

Thanks VonC.

The below method is failed (stream config spec and view config spec is not in order sometimes). cleartool catcs will return some uuid which we cannot compare with foundation baselines. I have achieved this by comparing cleartool dump -l <streamname> output with cleartool catcs output.

Found the another method.

The ucmutil command ucmutil lspvar -pvar SUM_CSPEC_ID <streamname> will return the config_spec_id of the stream which can be compared with cleartool catcs | grep -i identity output. The config_spec_id is mentioned in view config spec as identity UCM.Stream oid:uuid@vobuuid:uuid config_spec_id in the second line.

OTHER TIPS

Generally, the output return by a cleartool ls within an out of sync view reflects that out-of-sync status.

you can also try, as documented in this technote, a cleartool checkout.
If it returns this error message:

cleartool: Error: Checkout is currently disabled for element "element_name".
Its config spec rule information is currently unavailable 
due to either an aborted update or an update in progress.

... that means the view is out of sync.

Don't forget, in some cases, to do first a:

 cleartool chstream -generate yourStream@\pvob

That is useful if a component has switched from non-writable to writable.

But if just foundation baselines have changed, then cleartool setcs -stream is enough.

if all my components are read only in that stream and view(where I do only build). In that case how to check my view is out of sync?

One way would be to get:

  • all foundation baselines of the stream (with fmt_ccase)

    cd /path/to/my/view
    myStream = $(cleartool lsstream -cview)
    myFoundationBaselines = $(cleartool descr -fmt "%[found_bls]CXp" $myStream)
    
  • compare those baselines with the ones of the view
    (grep each baselines found in the previous step in your config spec)

     cd /path/to/your/view
     cleartool catcs
    

In short, there is no direct native way: you need to script it.

You will see the name of the baselines currently used by the view by grepping in a catcs for -mkbranch.
Those are the baseline you need to compare with the foundation baselines.

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