tags:

views:

17

answers:

1

Hi,

I would like to get the list of elements of "myvob/project/" having the comment "Requirement X" with cleartool command.

Is it possible ?

+1  A: 

I don't think there is a "cleartool find" query ready for that.

You could combine a cleartool find with the exec part to describe each element with their full name and comment, and then grep on the relevant comment.

See additional find examples:

Find a particular string in a comment by searching all versions of all elements in a VOB.

Note: Example syntax includes formatting for the version and the comment:

UNIX/Linux:

cleartool find -all -ver "! lbtype(<non-existing label>)" \
-exec 'cleartool desc -fmt "Version: %n\tComment: %c\n\n" $CLEARCASE_XPN' \
| grep <the string you are looking for>

Windows:

cleartool find -all -ver "! lbtype(<non-existing label>)" \ 
-exec "cleartool desc -fmt \"Version: %n\tComment: %c\n\n\" %CLEARCASE_XPN%" \ 
| findstr "<the string you are looking for>"
VonC
@Von : Where can I specify the path "\myvob\project\" , Since i'm only looking it for specific project instead full vob
srinannapa
@srinannapa: replace the `-all` by your path, and you will limit the find query to a specif path within a Vob instead of all the Vobs.
VonC