是否有人成功使用Clearcase Automation库(CAL)来检索快照视图?我可以很好地获得所有动态视图,但是我的快照视图中的一个单个视图都不会出现在'connection.get_views(true,region);'中。命令...

有什么方法可以以编程方式作为ICCVIEW实例?

有帮助吗?

解决方案

怎么样:

Dim CC As New ClearCase.Application 
CC.Views(true, myRegionName)

它应该在指定区域(包括快照的)中获取视图的收集。
(注意:这可能类似于您在问题中提出的内容,但具有更准确的Cal语法)

例如,我确实确认以下CCPERL脚本确实返回快照和动态视图:

类型 'ccperl listViews.pl', 假如:

  • 您确实将下一行保存在名为'的文件中listViewws.pl'.
  • 你更换'myRegionName'当前的清除区域
  • 您使用的是脚本中的区域。

脚本:

use Win32::OLE;
$DEBUG = 1;

print "Instantiating CAL CC\n" if $DEBUG;
my $cal_cc = Win32::OLE->new('ClearCase.Application')
or die "Could not create the ClearCase Application object\n";

$cclsview = $cal_cc->Views("False","myRegionName");
$Views_Entries = $cclsview->Count;
print "nbViews $Views_Entries\n";
$Views_Index = 1;
while ($Views_Index <= $Views_Entries) {
    print "Processing View entry $CS_Index\n" if $DEBUG;
    $View = $cclsview->Item($Views_Index);
    $ViewName = $View->TagName;
    $ViewIsSnapshot = $View->IsSnapShot;
    print "View $ViewName $ViewIsSnapshot\n";
    $Views_Index++;
}
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top