Get list of elements having the specific "Requirement X" comment on elements
I would like to开发者_JAVA技巧 get the list of elements of "myvob/project/
" having the comment "Requirement X
" with cleartool
command.
Is it possible ?
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>"
精彩评论