问题
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