本文介绍了如何在源代码文件的给定行中以明文形式修改了哪些CR(例如'git blame -L'呢)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

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>

,记录在 git blame 上.

, which is documented at git blame .

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

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

我可以grep遍历所有可见的文件分支,但这并不是我要搜索的.

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

谢谢.

推荐答案

带有经典ClearCase的主要命令是 cleartool annotate (您也有).

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

这与git blame -L完全不同,因为您不能限制文件的一部分.

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

采用长格式,将得出:

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)

这篇关于如何在源代码文件的给定行中以明文形式修改了哪些CR(例如'git blame -L'呢)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

11-03 05:11