How to find which CRs in clearcase modified given lines in source code file (like 'git blame -L' does)?

本小妞迷上赌 提交于 2019-12-23 03:58:21

问题


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.


回答1:


The main command, with classic ClearCase, is cleartool annotate (you also have some alternatives).

This isn't exactly like git blame -L, as you cannot limit to a portion of a file.

With the long format, that would give:

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

That applies to one file (or list of files separated by a space)



来源:https://stackoverflow.com/questions/23266012/how-to-find-which-crs-in-clearcase-modified-given-lines-in-source-code-file-lik

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