It's all about the answers!

Ask a question

Get Changesets specific to Snapshot in RTC-SCM Programmatically

vinitha dsouza (1271364) | 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.setContext(bl.get(inCnt));  bl.get(inCnt) returns IBaseline
          List<IChangeSetHandle> changeSetHandles =
              workspaceMgr.findChangeSets(changeSetSearchCriteria, IWorkspaceManager.MAX_QUERY_SIZE, null);

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.3k112) | answered Oct 12 '17, 9:56 a.m.


I never tried the #findChangeSets approach but found this one was working for me, including getting all change sets through paging:

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.