Get Changesets specific to Snapshot in RTC-SCM Programmatically
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
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