I am trying to programmatically edit the verified file and then validate it and save the changes made during the verification. And then check it back with the saved changes: Edit -> CheckOut -> Save -> CheckIn
When I try to save, I have a problem that the file does not recognize itself in the folder and thinks about trying to overwrite another file.
void checkOut(string sourcefile) { ClearCase.CCElement element = m_CC.get_Element(sourcefile); if (element != null) { ClearCase.CCVersion latestVersion = null; FileInfo fi = new FileInfo(sourcefile); latestVersion = element.get_Version(); if (latestVersion != null) { ClearCase.CCBranch branch = latestVersion.Branch; ClearCase.CCCheckedOutFile file = latestVersion.CheckOut(ClearCase.CCReservedState.ccReserved, "", false, ClearCase.CCVersionToCheckOut.ccVersion_SpecificVersion, true, false); string path = file.ExtendedPath; } } } void checkIn(string sourcefile) { ClearCase.CCElement element = m_CC.get_Element(sourcefile); element.CheckedOutFile.CheckIn("", true, sourcefile, ClearCase.CCKeepState.ccRemove); } void excelEdit() { string fileName = Globals.ThisAddIn.Application.ActiveWorkbook.Name;
source share