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.

e_z
  • 60
  • 6

1 Answers1

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)

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • I missed the fact that `cleartool annotate -long` prints branches as well, I suppose this is the best - **clearcase** can provide. Thanks @VonC – e_z Apr 24 '14 at 11:24