通过 ClearCase 自动化库 (CAL) 获取 ClearCase 快照视图?

发布于 2024-07-30 06:55:55 字数 171 浏览 14 评论 0原文

有人成功使用 ClearCase Automation Library (CAL) 来检索快照视图吗? 我可以很好地获取所有动态视图,但没有一个快照视图出现在“Connection.get_Views(true, Region);”中 命令...

有什么方法可以以编程方式获取这些 ICCView 实例吗?

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...

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

爱,才寂寞 2024-08-06 06:55:56

怎么样:

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

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

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

键入 'ccperl listViews.pl< /code>',前提是:

  • 您确实将下一行保存在名为“listViewws.pl”的文件中。
  • 您将 'myRegionName' 替换为您当前
  • 使用的 ClearCase 区域,该区域与脚本中的区域相同。

脚本:

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

How about:

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

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)

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

Type 'ccperl listViews.pl', provided:

  • 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.

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++;
}
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文