-1

I want to compare the clearcase file with its previous version programmatically in C#.

Is there any way to invoke clearcase comparison window using C# CAL libraries for a file?

Ramesh K
  • 41
  • 4
  • Sorry for the downvote and the flag: it is a perfectly valid programming question. – VonC Dec 21 '12 at 13:12
  • Sorry for the closed question. You have hundreds questions similar to this one on stack Overflow, but those "moderators" are clueless. – VonC Dec 26 '12 at 09:39
  • That is perfectly fine VonC. You have given me the appropriate answer and that worked. – Ramesh K Dec 26 '12 at 09:44

1 Answers1

2

First, as illustrated in "How to call a VBScript file in a C# application?", it is best to wrap the cleartool diff call in a VB script and call that script from your C# program.

That would allow for your VB script to call a cleartool command, with the command diff --graphical in it (which will open the diff windows)

ClearCase.ClearTool CT = new ClearCase.ClearTool();
string result;
result = CT.CmdExec("diff --graphical ...");

The OP Ramesh K comments:

The above CmdExec worked for me. I used:

 ct.CmdExec("diff -graphical -pre "+filePath); 

directly in C# application and it invokes the graphical interface of the ClearCase diff tool.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Dear VonC, thanks a lot. The above CmdExec worked for me. I used ct.CmdExec("diff -graphical -pre "+filePath); directly in C# application and it invokes the graphical interface of clearcase diff tool. – Ramesh K Dec 26 '12 at 07:29