通过ClearCase自动化库(CAL)获取ClearCase快照视图? [英] Get ClearCase Snapshot Views via ClearCase Automation Library (CAL)?

查看:104
本文介绍了通过ClearCase自动化库(CAL)获取ClearCase快照视图?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有人成功使用ClearCase Automation库(CAL)检索快照视图?我可以很好地获得所有动态视图,但是在"Connection.get_Views(true,region);"中没有一个快照视图出现.命令...

Is anyone using the ClearCase Automation Library (CAL) successfully to retrieve snapshot views? I can get all the dynamic views just fine, but not a single one of my snapshot views appears in the 'Connection.get_Views(true, region);' command...

有什么方法可以通过编程方式将这些作为ICCView实例获取?

Is there any way to get these programmatically as ICCView instances?

推荐答案

怎么样:

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

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

It should gets the collection of views in the specified region, including snapshot ones.
(Note: this may be similar to what you proposed in your question, but with a more accurate CAL syntax)

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

For instance, I do confirm the following ccperl script does return snapshot and dynamic views:

键入"ccperl listViews.pl",提供:

  • 您确实将下一行保存在名为"listViewws.pl"的文件中.
  • 您将"myRegionName"替换为当前的ClearCase区域
  • 您使用的区域与脚本中使用的区域相同.
  • you did save the next line in a file named 'listViewws.pl'.
  • you replace 'myRegionName' by your current ClearCase region
  • you are using the same Region than the one in the script.

脚本:

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++;
}

这篇关于通过ClearCase自动化库(CAL)获取ClearCase快照视图?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆