It's all about the answers!

Ask a question

How to compare two base lines with rtc java api?


Stefan Sauterleute (282) | asked Feb 09, 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 (3.3k7) | answered Feb 09, 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, 10:27 a.m. | edited Mar 28, 12:44 p.m.

 Thanks, that works fine!

Your answer


Register or to post your answer.