1

I have tried to find a way in clearcase, using cleartool to identify CRs - which introduced specific lines in source code for a given file. I'm looking for equivalent or very similar functionality to:

git blame -L <line_num1>,<line_num2> <filename>

, which is documented at git blame .

Is it possible to query clearcase repository to retrieve this information ?

I can grep trough all visible file branches, but this is not exactly what I'm searching for.

Thanks in advance.

4

1 回答 1

1

使用经典 ClearCase 的主要命令是cleartool annotate(您也有一些选择)。

这与 不完全一样git blame -L,因为您不能仅限于文件的一部分。

使用长格式,这将给出:

cleartool annotate -long msg.c

Annotated result written to "msg.c.ann".
type  msg.c.ann
02-Apr-99.10:51:54 ##### Steve (scd.user@reach)\main\rel2_bugfix\1
a test
.
.
.
-------------------------------------------------
-------------------------------------------------
##### 01-Apr-99.16:19:25 scd \main\1              | #include "hello.h"
##### 02-Apr-99.10:51:54 scd \main\rel2_bugfix\1  | /* a test */
##### 01-Apr-99.16:19:25 scd \main\1              |
.
.
.
##### .                                           |char *
##### .                                           | hello_msg() {

这适用于一个文件(或由空格分隔的文件列表)

于 2014-04-24T10:28:00.763 回答