For now, I'd like to ignore the fact that I'm checking in from an alternate location. I've written a Unit test that checks out a text file, touches it without modifying the content, then checks it in. I'm trying to allow my checkin method to undo checkout if the file is unchanged. My current code always determines the ChangeSetItem to be of type ChangeSetItemType.Modified. Here is a snippet of what I've tried:
Code: Select all
public long CheckInFile(string aCheckInComment, VaultClientFile aFile) {
MyInstance.Refresh();
ChangeSetItemColl allPendingChanges = MyInstance.InternalChangeSet_GetItems(true);
foreach(ChangeSetItem aChange in allPendingChanges) {
if(aChange.DisplayRepositoryPath == aFile.FullPath) {
myChange = aChange;
break;
}
}
if(myChange.Type == ChangeSetItemType.Unmodified) {
//always hits, even when contents are the same
}
}
Can you guys suggest something that I might be overlooking in the API that will allow me to force a ChangeSetItem to reevaluate whether or not it has been changed?
Thanks
-JK