How to get change sets being delivered with baseline using server API
There are change sets in the repository workplace, upon creation of snapshot a baseline is created inside every component of work space and is visible as outgoing change in the pending changes view. Before creation of baseline change sets were visible in pending changes view, if deliver operation is performed, these change sets can be fetched using below server API
After creation of snapshot, baseline is visible in the pending changes view as outgoing, if this baseline is expanded we can see change sets being delivered inside that baseline. I have been trying to get baseline being delivered in deliver operation and change sets inside the baseline, with the help of below code I am able to get baselines being delivered as part of deliver operation but I am unable to get change sets being delivered inside the baseline.DeliverOperationData data = (DeliverOperationData) operationData;List<IChangeSetHandle> changeSetHandles = data.getChangeSetHandles();
Later I converted baseline handles into baselines but I am unable to get change sets being delivered inside these baselines, any pointers or guidance would be of great help.List<IBaselineHandle> baselines = data.getBaselines();
2 answers
I have this example for creating and delivering baselines:
Comments
Hello Ralph, Your code talks about delivering change sets to stream using java API, I need to get a baseline and change sets inside the baseline as part of deliver operation i.e. deliver operation is performed manually by user then follow up action will execute and get the change sets being delivered inside of baseline
I can get the change sets being delivered in delivery operation using below code
DeliverOperationData data = (DeliverOperationData) operationData;List<IChangeSetHandle> changeSetHandles = data.getChangeSetHandles();
Vikrant,
Hello Ralph,
I cannot provide guidance on the API, but I expect that you will have to do a compare operation between that baseline and the current configuration of the stream, in order to get that list of change sets. That is because a baseline is effectively a pointer to a change set history entry, and the list of change sets that you want here is not all of the change sets in the history of that baseline, but rather the difference between the change set history of that baseline, and the change set history of the stream (those are the change sets being added to that stream, when you deliver that baseline to that stream).
DeliverOperationData data = (DeliverOperationData) operationData;List<IChangeSetHandle> changeSetHandles = data.getChangeSetHandles();
List<IBaselineHandle> baselines = data.getBaselines();