updating component hierary via API is not working
I have following scenario:
component c1 has 3 subcomponents (c2, c3 and c4) My Use Case: I want to replace c2 and c3 components with c5 and c6 components Current Structure: Parent component : c1 Child components : c2,c3,c4 Target Structure: Parent component : c1 Child components : c4,c5,c6 I created a workspace and add c1, c2, c3, c4, c5 components in to workspace. Then I used following method to update the hierarchy inside component c1. // update component hierarchy IWorkspaceConnection.updateSubcomponentData(c1Handle, addCompHandleList, removeCompHandleList, null, null); // create outgoing change set. IChangeHistorySyncReport changeSetSync = wsWorkspaceConn.compareTo( wsStreamConn, WorkspaceComparisonFlags.CHANGE_SET_COMPARISON_ONLY, Collections.EMPTY_LIST, null); // delivering change set. wsWorkspaceConn.deliver(wsStreamConn, changeSetSync, Collections.EMPTY_LIST, changeSetSync.outgoingChangeSets(), null); On delivering change set it threw following exception. com.ibm.team.scm.common.DeliveryIntroducesConflictsException: CRRTC5042E: Cannot deliver changes since they would create conflicts for item '/.subcomponent_info' in component 'Component 'c1''. Try accepting all incoming changes, resolve the conflicts, then deliver again.at com.ibm.team.scm.service.internal.ScmServiceInternal$2.createException(ScmServiceInternal.java:2834) at com.ibm.team.scm.service.internal.utils.IExceptionFactory$AbstractExceptionFactory.createException(IExceptionFactory.java:35) at com.ibm.team.scm.service.internal.ScmServiceInternal.deliverCombined(ScmServiceInternal.java:2945) for you feedback i would be thankful |
Accepted answer
Hi Aley,
It looks like that the component have different baselines in the stream and in the workspace repository. While adding components (let say with “baseline 4”) from stream to the workspace repository make sure that the same “baseline 4” is added to your repository. Only after that change set commit should not throw “DeliveryIntroducesConflictsException”. Aley Zaidi selected this answer as the correct answer
|
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
From the exception it looks like that I have an older version (with sub set of change sets) of the component in my repository workspace. But I am using the following way to add component in to workspace.
It looks like thatis giving an old baseline of the component which is then added to the workspace.