Clearcase: List labels matching a particular string

橙三吉。 提交于 2019-12-01 05:47:28

问题


I would like to list the available labels matching a particular string applied in the view.


回答1:


I confirm a filter in cleartool find is not possible:

 ct find . -ele "lbtype_sub(My_LAB*)" -print

would not work (no wildcard in query argument.

If you cannot use a grep in a shell pipe, can you consider using grep in an exec part of a find, like in this example?

ct find . -kind lbtype -exec "echo %CLEARCASE_PN%|grep MY_LAB"

If this is not acceptable, you need to write the result in a file and process it with another tool (sed?)

You have packages for Windows including Unix commands: see this SO question.
Of you have freeware emulating the grep command.

If you must stay with native Windows commands, you must redirect the result in a file, and use FIND (English translation).




回答2:


Hmm. I'm not entirely sure about this although the following will list all labels used for a given VOB (entered using ClearTool command line application).

lstype -kind lbtype -invob vob_path_and_name -short

for example with a View mapped to drive U: VOB "Some_VOB" would be:

lstype -kind lbtype -invob U:\Some_VOB -short


来源:https://stackoverflow.com/questions/3342166/clearcase-list-labels-matching-a-particular-string

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!