在 ClearCase 中,您可以使用“cleartool ls”列出目录的内容。
我的问题是如何使用 CAL(ClearCase 自动化层)做同样的事情。我更喜欢 COM API 的原因是我不必解析“ls”的输出。
到目前为止,我能够成功获取 VOB 和视图,但我没有找到任何列出内容的方法。
到目前为止我的代码:
IClearCase cc = new ApplicationClass();
CCVOB vob = cc.get_VOB("\\VOB-name");
CCView view = cc.get_View("ViewTag");
感谢您的帮助。
我用 C# 为那些感兴趣的人写了 VonC 的答案。
string[] files = Directory.GetFiles("View path here", "*.*", SearchOption.AllDirectories);
foreach (string file in files)
{
try
{
CCVersion ver = cc.get_Version(file);
Console.WriteLine(ver.Path);
}
catch(Exception) {/*the file is not versioned*/}
}