It's all about the answers!

Ask a question

compare component with baseline using Java client API


vikrant kamble (1323897) | asked May 31 '16, 5:05 a.m.
 Hi All, 
I want to compare component with baseline using java client API,
Below are API I know to compare component with baseline

IChangeHistory compHistory = IWorkspaceConnection.changeHistory(componentHandle);

IBaselineConnection latestBaselineFromTarget = workspaceManager.getBaselineConnection(baselineHandle, null);

IChangeHistory baselineHistory = latestBaselineFromTarget.changeHistory();

IChangeHistorySyncReport report = compHistory.compareChangeHistories(baselineHistory, null);

changeSetsHandles.addAll(report.outgoingChangeSets());
changeSetsHandles.addAll(report.incomingChangeSets());

Here I can get change sets, but I am getting more change sets than what is displayed in change explorer view of eclipse (when component is compared with baseline via eclipse).

Is there any other API to compare component with baseline.
Please let me know

Thanks in advance
Vikrant

One answer



permanent link
vikrant kamble (1323897) | answered Jun 01 '16, 1:41 a.m.
 Hi All,

Below solution worked for me
IWorkspaceConnection.compareToBaseline(BaselineHandle, monitor);

As per my understanding, This method will compare baseline with its associated component

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.