Code: Select all
public long CheckInFile(VaultClientFile aFile, string aCheckInComment) {
...
//tried this
theClientInstance.UpdateKnownChanges_File(aFile.Parent, theClientInstance.TreeCache.GetBestWorkingFolder(aFile.Parent), true);
//and this
theClientInstance.UpdateKnownChanges_All(true);
//and this
theClientInstance.TreeCache.ChangeSetItems_Refresh(true);
ChangeSetItemColl allPendingChanges = theClientInstance.InternalChangeSet_GetItems(true);
foreach (ChangeSetItem aChange in allPendingChanges) {
if(aChange.DisplayRepositoryPath == aFile.FullPath) {
myChange = aChange;
break;
}
}
if(myChange == null) throw new VaultManagerException("You are trying to check in a file that hasn't been changed");
...
theClientInstance.Commit(myLonelyChange, false, false, ref theNewID);
return theNewID;
}
Thanks
-Josh