Search code examples
build-automationclearcasecleartoolclearcase-ucm

How to make cleartool tell if source is modified since last baseline


For build logging, I am able to obtain the current stream and last baseline by means of cleartool (as detailed in "How to obtain UCM stream and baseline with cleartool").
But this is only unambiguous if I can also tell that no changes were made since the last baseline.

So: how can I make cleartool tell me if changes have been applied since the last baseline?

Bonus question: does ClearCase terminology have a name for this (whether or not the baseline is "untouched")?


Solution

  • To see if a stream has any modification since the latest baseline (meaning that stream has at least one modifiable component), you can:

    • get the latest baseline date for the current view
    cleartool lsbl -fmt "%d\n" -cview
    

    (the last one is the most recent) - do a find for any new version since that date

    cleartool lsbl -fmt "%d\n" -cview
    2008-05-29T16:40:28+02:00
    [...]
    2009-09-27T09:51:28+02:00
    
    cleartool find . -ver "brtype(MyProject_Dev) && created_since(2009-09-27T
    09:51:28+02:00)" -print
    .@@\main\MyProject_Int\MyProject_Dev\3
    .\.checkstyle@@\main\MyProject_Dev\CHECKEDOUT
    .\.classpath@@\main\MyProject_Int\MyProject_Dev\1
    .\.classpath@@\main\MyProject_Int\MyProject_Dev\CHECKEDOUT
    [...]
    

    There is no special terminology for an untouched baseline, because a baseline is by definition "untouched" (you can never modified or change the content of a baseline).

    A stream can have modifications only if there are non-empty activities which shows that at least one version has been created.