3

For example, the current config spec is "element * /main/LATEST". There is a file "A.txt", its current version is 3 and a label named "LB" was applied on its version 2 before.

I want a command to query all files which do not have the label "LB" on its current version.

Obviously, file "A.txt" should meet the query.

How to write the clearcase command?

Peter - Reinstate Monica
  • 15,048
  • 4
  • 37
  • 62
Meng
  • 85
  • 1
  • 4

2 Answers2

6
cleartool find /your/path -cview -version "! lbtype(LB)" -print
  • -cview and -version restrict find to the versions of the current view
  • -version "! lbtype(LB)" find versions without LB
4

That command could help you:

cleartool find . -type f -version "version(/main/LATEST) && !lbtype(LB)" -print

That will print all the versions (files here) at /main/LATEST that haven't yet the 'LB' label.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Still works in 2019 ;-). Sometimes progress is .... slow. Btw, I suppose if one wants to check the respective file versions selected in the given view (i.e., not always /main/) MrTiZ' answer below is correct? – Peter - Reinstate Monica Jun 03 '19 at 09:34
  • @Peter Yes, the answer below is not restricted to the main branch – VonC Jun 03 '19 at 10:35