Getting View Owner/Creator with Rational ClearCase Automation Library (CAL)

余生长醉 提交于 2019-11-28 10:23:23

问题


Has anyone here already worked with the Rational / IBM CAL and knows if at all, and how to check for a view's creator/owner (username)? Elements, Vobs etc all have an Owner/Creator, but for some reason views do not?


回答1:


I have only do small VB scripts with CAL, as illustrated in this answer about label.

After having checked cc_cal.chm (found in C:\Program Files\IBM, in the latest 7.1.0.1 version of ClearCase installation), I have found their ICCView interface very incomplete, and always prefered to patch the output of a classic:

cleartool lsview -l -full -pro aTagViewName

With that output, I am sure to find whatever information I need.


The only other "pure CAL" way to get some views for a given username is for UCM views, where you can ask the stream for those (but that does not address directly your question)

 Dim Streams As CCStreams 
 Dim Stream As CCStream 
 Set Streams = Project.DevelopmentStreams(Name) 
 For Each Stream In Streams 
       Dim Views As CCViews 
       Set Views = Stream.Views(Name) 
       Dim View As CCView 
       For Each View In Views 
             Str = Str & View.TagName & " in stream: " & _ 
             Stream.Title & vbCrLf 
       Next 
 Next 



回答2:


Basically, if you can think of a way to do it with cleartool, the answer is yes. If there isn't a specific interface/object API to do what you want, just create the cleartool object in CAL and stuff your query in there!

The advantage to using CAL is that you only need to load the .dll once, and don't have to pay the price of executing a zillion separate cleartool processes if that's what you'd otherwise have to do.

The CAL documentation sucks, though. In Visual Studio, you can add CAL as a resource by finding the DLL in your resource explorer, and talk to it via COM like anything else.

If you aren't using VB or VB.NET (e.g. C#), you'll have to do a little more type-casting than you see in the sample documentation.



来源:https://stackoverflow.com/questions/830412/getting-view-owner-creator-with-rational-clearcase-automation-library-cal

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!