How do you obtain list of change sets being delivered in a Baseline in a Deliver Operation Advisor
I am working on a Deliver operation advisor to verify change set / work item linkages. When change sets are delivered by themselves, the DeliverOperationData for the deliver operation provides the list of change sets. When a baseline is delivered along with some new change sets (as part of the baseline) the DeliverOperationData does not provide the new change sets that are being delivered. I can get the handle(s) to the baseline(s) being delivered, but I am not seeing a straightforward way to obtain the change sets. Do I have to compare the baseline against the destination workspace/stream or is there a more direct way of identifying the new change sets? Does anyone have any example code of how to go from deliverOperationData.getBaselines() to a list of IChangeSetHandles (like is returned from deliverOperationData.getChangeSetHandles()?
Thank you,
Jamie Berry.
Thank you,
Jamie Berry.
One answer
You can use the source and destination workspaces and compare them with each other.
IWorkspaceConnection connection = SCMPlatform.getWorkspaceManager(ITeamRepository).getWorkspaceConnection(DeliverOperationData.getSourceWorkspace(), monitor);connection.compareTo(destinationWorkspaceConnection, ..);
You can follow that snippet to get your comparison report. That will return the baselines including change sets that differ from the two workspaces.