Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

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

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.

0 votes

Comments

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.

1 vote

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.

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 log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,942

Question asked: Dec 27 '17, 5:51 a.m.

Question was seen: 1,750 times

Last updated: Jan 08 '18, 11:01 p.m.

Confirmation Cancel Confirm