Detect if a stream differs from a snapshot
I need to know if a stream is different than a given snapshot programatically. I have implemented a solution but I'm not convinced its the best way to approach the problem. Here is some quick pseudo code describing how I currently do this:
If any of the following are true, there are changes:
- the difference between the number of components in the stream and the number of baselines in the snapshot is non-zero
- each component that exists in the stream does not have a corresponding baseline in the snapshot
- if there are any incoming or outgoing changesets or baselines after executing a IWorkspaceConnection.compareToBaseline() call
Is this the best way to compare a stream to a snapshot? Is there a better interface to do this type of comparison? Have I covered all the bases necessary to ensure there are no changes?
Thanks for your help!
-Dave
If any of the following are true, there are changes:
- the difference between the number of components in the stream and the number of baselines in the snapshot is non-zero
- each component that exists in the stream does not have a corresponding baseline in the snapshot
- if there are any incoming or outgoing changesets or baselines after executing a IWorkspaceConnection.compareToBaseline() call
Is this the best way to compare a stream to a snapshot? Is there a better interface to do this type of comparison? Have I covered all the bases necessary to ensure there are no changes?
Thanks for your help!
-Dave