I try to compare two snapshots from one stream programamtically in plain java...
Step 1: getting my stream (working)
IWorkspaceConnection stream = null;
List<IWorkspaceConnection> list = RtcAdapter.inst().getStreams(); //my library
for (IWorkspaceConnection connection: list){
if (connection.getName().equalsIgnoreCase("myStreamName") ){
stream = connection;
break;
}
}//now we have found our stream
Step 2: getting base lines (working)
List<IBaselineSet> snapShotList =
RtcAdapter.inst().getSnapShotsFromStream(stream);
IBaselineSet snapShot0 = null;
IBaselineSet snapShot1 = null;
for (IBaselineSet snapShot: snapShotList){
if (snapShot.getName().equalsIgnoreCase("mySnapShotName0") ){
snapShot0 = snapShot;
}
if (snapShot.getName().equalsIgnoreCase("mySnapShotName1") ){
snapShot1 = snapShot;
}
}//now we've got also my two snapShots
Step 3: comparing each other (not working)
IUpdateReport report =
workspaceManager.compareBaselineSetConfigurations(
snapShot0, snapShot0, stream.getComponents(), monitor);
my report is empty... --annoying--
report=com.ibm.team.scm.common.internal.dto.impl.UpdateReportImpl@1de5a20 (stateBefore: <unset>, stateAfter: <unset>)
i also tried to get the ChangeHistorySyncReport...
IChangeHistorySyncReport report =
workspaceManager.compareBaselineSets(
snapShot0, snapShot1, componentList(stream), monitor);
also the report is empty...
so how do I create a proper report? or how can I compare two baselines? (what am I doing wrong?
report.getAffectedComponents()
returns an empty array, as well does report.getModifiedComponents()
UPDATE as far a s i know now i must inspect the ChangeHistorySyncReport... and when i print my report it says:
com.ibm.team.scm.common.internal.dto.impl.ChangeHistorySyncReportImpl@150f091 (localTime: <unset>, remoteTime: <unset>, compareFlags: <unset>)
this makes my question deeper - how can i set better CompareFlags?