Clearcase: List labels matching a particular strin

2020-03-25 11:58发布

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

标签: clearcase
2条回答
走好不送
2楼-- · 2020-03-25 12:19

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).

查看更多
我只想做你的唯一
3楼-- · 2020-03-25 12:26

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
查看更多
登录 后发表回答