c#如何确定文件是否在ClearCase中 [英] c# How to determine if a file is in ClearCase
问题描述
我正在编写一个程序,该程序需要知道文件(excel工作簿)是否为大写形式。如果是这样,我需要检查一下。
这是我检出文件的代码:
I am writing a program that needs to know whether a file (excel workbook) is in clearcase or not. If so I need to check it out. Here is my code for checking out a file:
private void buttonClicked(object sender, RibbonControlEventArgs e)
{
ClearCase.ClearTool checkingOut = new ClearCase.ClearTool();
string fileLoc = Globals.ThisAddIn.Application.ActiveWorkbook.FullName;
checkingOut.CmdExec(@"checkout """ + fileLoc + @"""");
}
我不想执行结帐,除非我知道它是否在Clearcase中或不。
这是Excel加载项的一部分。
I do not want to perform the checkout unless I know if it is in Clearcase or not. This is part of an Excel add-in.
谢谢!
推荐答案
了解文件是否在ClearCase中的最简单方法是执行 cleartool ls aFile
( ct.CmdExec( ls aFile);
使用CAL API)
The simplest way to know if a file is in ClearCase is to perform a cleartool ls aFile
(ct.CmdExec("ls aFile");
with the CAL API)
请参见 cleartool ls
手册页:
See the cleartool ls
man page:
列出当前工作目录中的VOB驻留对象和view-private对象。 / p>
List the VOB-resident objects and view-private objects in the current working directory.
cmd-context ls
Makefile@@/main/3 Rule: /main/LATEST
bug.report
cm_add.c@@/main/0 Rule: /main/LATEST
此处 bug.report
尚未在ClearCase中使用:它没有与之关联的选择规则。
Here bug.report
isn't in ClearCase yet: it has no selection rule associated to it.
这篇关于c#如何确定文件是否在ClearCase中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!