How to get the Changesets linked to a particular snapshot ?
![]() Hello All,
|
Accepted answer
![]()
Arne Bister (2.6k●1●28●32)
| answered Jun 01 '17, 4:11 p.m.
JAZZ DEVELOPER edited Jun 01 '17, 4:16 p.m. Hello Jazzuser,
IBaselineSet snapshot Get list of baselines --> get change sets (need temp workspace to resolve history): List<IChangeSetHandle> changesetList = new ArrayList<IChangeSetHandle(); IWorkspaceConnection tempWSConnection = SCMPlatform .getWorkspaceManager(teamRepository).createWorkspace( currentUser, name, comment, snapshot, null); List<IBaseline> baselineList = snapshot.getBaselines(); for (IBaseline bl : baselineList {This way you get all change sets in snapshots baselines history but it can take a bit of time as this is a paging approach. Please mark as accepted if this solves your task, - Arne Jazzuser user selected this answer as the correct answer
Comments Hello Arne..
Try this:
|
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.
Comments
To confirm, by "change sets linked to it", do you mean "the set of change sets that are in the history of the baselines that make up the snapshot"?
Thanks a lot for the reply Geoffrey, Yes you are right, it is "the set of change sets that are in the history of the baselines that make up the snapshot:.
We are programmatically doing it, so we are looking for an API.
Is there any API to this ? could you please share sample code if any. This would help me alot.
Thank you.
I'll have to defer to others on the forum for the API pointers. If using the command line is acceptable, I'd take a look at the scm command to see if it gives you what you need.