如何在源代码文件中找到clearcase修改给定行中的哪些CR(例如' git blame -L')?

时间:2014-04-24 10:15:33

标签: git clearcase cleartool clearquest

我试图在 clearcase 中找到一种方法,使用cleartool来识别CR - 它在给定文件的源代码中引入了特定的行。我正在寻找与以下相同或非常相似的功能:

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

,记录在git blame

是否可以查询 clearcase 存储库以检索此信息?

我可以grep通过所有可见的文件分支,但这不是我正在搜索的内容。

提前致谢。

1 个答案:

答案 0 :(得分:1)

使用经典ClearCase的主命令是cleartool annotate(您还有some alternatives)。

这与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() {

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