It's all about the answers!

Ask a question

Get Changesets specific to Snapshot in RTC-SCM Programmatically


vinitha dsouza (14719122) | asked Oct 11 '17, 10:37 a.m.
edited Oct 11 '17, 10:40 a.m.

Hello Team,
My Usecase is below:
i would like to get all Changesets of Snapshot. For this i am doing below search criteria.
Stream + Component + Specific Baseline of Component

Below is line of code i am using,
ChangeSetSearchCriteria changeSetSearchCriteria = IChangeSetSearchCriteria.FACTORY.newInstance();
          changeSetSearchCriteria.setComponent(compHandle);
          changeSetSearchCriteria.setContext(workspHandle);
          changeSetSearchCriteria.setContext(bl.get(inCnt));  bl.get(inCnt) returns IBaseline
          List<IChangeSetHandle> changeSetHandles =
              workspaceMgr.findChangeSets(changeSetSearchCriteria, IWorkspaceManager.MAX_QUERY_SIZE, null);
          System.out.println(changeSetHandles.size());

But above Returns all the changesets of Components which is not i intended.
I expect for specific baseline which is not working.
Could you please let me know what is going wrong here.

Thanks in Advance.

Accepted answer


permanent link
Ulf Arne Bister (1.3k413) | answered Oct 12 '17, 9:56 a.m.

Hi,

I never tried the #findChangeSets approach but found this one was working for me, including getting all change sets through paging: https://jazz.net/forum/questions/239965/how-to-get-the-changesets-linked-to-a-particular-snapshot

Look for the accepted answer, it has the code.
If this solves your problem please mark it as accepted.

- Arne

David Lafreniere selected this answer as the correct answer

Your answer


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.