1

I want to find objects that have not got a LABEL in any version.

I can check if any object has a LABEL in its LATEST version with following command :

cleartool find .  -version "version(/main/LATEST) && !lbtype(MYLABEL)" -print

And this command also lists all versions :

cleartool find .  -version "!lbtype(MYLABEL)" -print

I want the object list that has not got label (MYLABEL) in any versions. How can I do this?

tshepang
  • 12,111
  • 21
  • 91
  • 136
akdora
  • 893
  • 1
  • 9
  • 19

1 Answers1

1

You can first try looking for elements instead (with the lbtype_sub query primitive):

cleartool find .  -ele "!lbtype_sub(MYLABEL)" -print

See "Additional examples of the cleartool find command"

About *_sub query primitives

When using the ClearCase find command in what circumstances should the *_sub query primitives (attype_sub, label_sub and attr_sub) be used instead of just lbtype or attype?

When the type being queried does not apply to the "level" (-element -branch -version) being queried.
For example, query for a label using -element: labels are only on versions within elements

(you can limit to files only with -type f, or folders only with with -type -d)


If that does not work would recommend a three steps process.

  • find all the elements (file or folder) that have one version with that label
  • find all the elements
  • remove the first elements from the second list

The end result is what you are looking for.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250