Replacing baselines - difference in behaviour bewteen the Plain API and the RTC client
![]()
I'm using the 4.0.6 RTC client and API with a 4.0.6 server.
The sequence of operations I am trying to do is: 1) Create a workspace from a snapshot of a stream 2) Replace component baselines in the workspace with baselines at a known level (not the most recent). 3) Make a snapshot of the workspace 4) Create a second workspace from the new snapshot If I set the flow target of the second workspace to the stream I would expect to see incoming (newer) baselines from the stream, as indeed I do whether I do this using the API of the RTC GUI. However - if I do it using the API I also see an outgoing change which is the baseline that I replaced. This baseline is exactly the same same as the one in the stream (compare) but if I deliver it it resets the stream history . This is not the behaviour I want. I expect that I am probably using the API incorrectly, here is the code that does the replacement: public IWorkspaceConnection replaceComponentInWorkspaceConnection( IWorkspaceConnection workspaceConnection, IComponentHandle componentHandle, IConnection baseline, IProgressMonitor monitor) throws TeamRepositoryException { workspaceConnection.applyComponentOperations(Collections .singletonList(workspaceConnection.componentOpFactory() .replaceComponent(componentHandle, baseline, false)), true, monitor); return workspaceConnection; } Is there something obvious that I am doing wrong? Or a better way to do what I want? |
One answer
![]()
Further testing on a separate system shows that my API code works in exactly the same way as the RTC Client. So, I'm suspecting now that there is a problem with our production server set up. Anyway - I no longer have a question about differences between the API and the client which is progress, I suppose.
|
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.