It's all about the answers!

Ask a question

How to compare two base lines with rtc java api?


Stefan Sauterleute (2815) | asked Feb 09 '18, 4:06 a.m.
Hi @all,

how can I compare two base lines (IBaseline) not base line sets (IBaselineSet) with the rtc java plain api?

Unfortunately the IWorkspaceManager takes only IBaselineSet (Snapshots) but no IBaseline (base lines)
So how can i get the change set history (IChangeHistorySyncReport)?

IChangeHistorySyncReport changeReport = workspaceManager.compareBaselineSets(baselineSets1, baselineSets2, null, null);

This code snipped works only for snapshots not for base lines

Accepted answer


permanent link
David Lafreniere (4.8k7) | answered Feb 09 '18, 3:31 p.m.
FORUM MODERATOR / JAZZ DEVELOPER

Use the following:

IWorkspaceManager wm = SCMPlatform.getWorkspaceManager(repo);
IBaselineConnection bc = wm.getBasellineConnection(baselineHandle, monitor);
IChangeHistorySyncReport report = bc.compareTo(otherBaseline, monitor);

Stefan Sauterleute selected this answer as the correct answer

Comments
Stefan Sauterleute commented Feb 15 '18, 10:27 a.m. | edited Mar 28 '18, 12:44 p.m.

 Thanks, that works fine!

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.