Search code examples
clearcase

I can't see the added value of using lbtype_sub versus lbtype?


I have just finish to read this IBM technote but I didn't understand: Additional examples of the cleartool find command


Solution

  • Look at cleartool find man page and the query language

    lbtype (label-type-name)

    In all cases, TRUE if the object itself is labeled label-type-name. (Because elements and branches cannot have labels, this primitive can be true only for versions.)

    lbtype_sub (label-type-name):

    • With elements:
      TRUE if the element has a version that is labeled label-type-name.
    • With branches:
      TRUE if the branch has a version that is labeled label-type-name.
    • With versions:
      TRUE if the version itself is labeled label-type-name.

    So a cleartool find . -version would use lbtype(), whereas a search on elements (cleartool find -all -element) will have to use lbtype_sub().