It's all about the answers!

Ask a question

Comparing Snapshots : How to get the changesets of a component added in both snapshots but different baselines. - Java API


Jazzuser user (681050) | asked Dec 27 '17, 5:51 a.m.

Hello Team,

I have a usecase to fetch the changesets by comparing two snapshots using RTC API.
If I have a component in both the snapshots but both are of different baselines, then am not getting the Changesets from that component.

we have used : compareBaselineSets().
 IChangeHistorySyncReport changeSync = workspaceManager.compareBaselineSets(snapshot, snapshotParent,
                    null, null);
This API gives only the details of the delta changesets of the components part of both the snapshots.

but this API, doesnt fetch the changesets, if the component added are in different baselines. although i can see them in the eclipse view.

Is there any alternate API / logic to get the diff changesets ?

Thanks.


Comments
1
Luca Martinucci commented Dec 27 '17, 8:11 a.m.

Can you explain in detail what is the scenario, and what is the problem?
Actually, I have done such a comparison with RTC plain Java API, using the same method you are using (compareBaselineSets).
Once you have retrieved your changeSync, you can easily retrieve the "delta changesets", i.e. the change sets that are in one snapshot, but not in the other.
It does not really matter whether or not the component is in different baselines in the two snapshots.


Jazzuser user commented Jan 08 '18, 12:44 a.m. | edited Jan 08 '18, 11:00 p.m.

Thanks for your reply  Luca Martinucci.
In the eclipse view, for the compare snapshots --> each other, will give me the diff : but sometimes i get :
for each component : only in <<SomeSnapshot>> and will display some changesets. However this Changesets are not returned from the compareBaselineSets method.
Why these changesets(in the eclipse view are displayed), as only in <<someSnapshot>>, why not in the API ?

Am really not understanding if the eclipse operation of comparing the snapshots with each other and the API "compareBaselineSets", works similar ?
Is there anyway i can understand more on this eclipse "compare snapshot operation" ?
Am not sometimes able to get the results matching with the eclipse view and the API.
Please help me understand how both are working.
Thank you.


Jazzuser user commented Jan 08 '18, 5:15 a.m. | edited Jan 08 '18, 11:01 p.m.

In addition,
from the API i get the IChangeHistorySyncReport. It contains both incoming and outgoing changesets.
Could you please give example of a incoming changeset. Am not understanding the incoming changesets.

Be the first one to answer this question!


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.