如何在 clearcase 中搜索特定种类的合并超链接?

How do I search for specific kinds of merge hyperlinks in clearcase?

背景

我最近在明显的情况下创建了一个错误的合并超链接。这是自动合并多个文件的脚本的结果。鉴于脚本创建了错误的合并,我正在尝试搜索错误合并箭头的其他实例。以下是我想在搜索中设置的限制条件:

  1. 我创建的所有合并超链接。
  2. 在特定日期

This question 谈论在一个文件中找到合并超链接。但是,我正在寻找我创建的一组合并超链接。

我所知道的

我知道您可以 describe hyperlinks 如下所示:

Describe a hyperlink.

cmd-context describe hlink:Merge@516262@/vobs_proj 
hyperlink "Merge@516262@/vobs_proj"
 created 2006-07-14T16:43:35 by Bill Bo (bill.user@uranus)
 Merge@516262@/vobs_proj /vobs_proj/lib/cvt/cvt_cmd.c@@/main/v1.1_port/8 ->
 /vobs_proj/lib/cvt/cvt_cmd.c@@/main/71

但我正在寻找如何从一组合并超链接中查询 "created..." 字段。

问题

如何查询我在特定时间创建的合并超链接?

考虑 cleartool find 尝试 link 那些 hlink

cleartool find . -kind hlink -user <myLogin>

然后尝试将查找与 exec cleartool describe $CLEARCASE_PN 相结合,也许添加查询(如 the query_language 中所述)

如果查询不工作,至少你可以 grep 输出:

  • 您的登录
  • 排除 (grep -v) 个太旧的日期。

Brian Cowan adds :

I've found that you can use this to get the hlink names, but you have to use $CLEARCASE_PN.

Parsing it is non-trivial because the "hlink" formatting property apparently doesn't work.

You would have to:

  1. Filter the output by date (cleartool desc -fmt "%d %Xn\n" $CLEARCASE_PN)
  2. Describe each desired link and grep for "->"
    That'll get you the hyperlink source and destination.
  3. rmver -xhlink would let you remove the merge-created versions

如果这是最近的,你应该可以使用 cleartool lshistory -minor 我刚刚创建了一个合并超链接,VOB 根目录上的 lshist -min -rec 向我展示了这个。

--09-12T15:57 Brianc make hyperlink "Merge" on version "Documents\libatriadb_ldb.txt@@\main\testbr" "Attached hyperlink "Merge@504@\foobarf"." --09-12T15:57 Brianc make hyperlink "Merge" on version "Documents\libatriadb_ldb.txt@@\main\CHECKEDOUT" "Attached hyperlink "Merge@504@\foobarf"."

稍加使用 -fmt 选项,您就可以根据需要对其进行格式化。