Reloading the component from EWM client using API
Hello,
We are working on automating - Replacing the component baseline in a stream and repository workspace in EWM , when I use replaceComponent EWM API to replace the baseline of the component, the component goes out of sync.
workspaceConnection.applyComponentOperations(Collections.singletonList(workspaceConnection.componentOpFactory().replaceComponent(componentHandle, baselineConnection, workspaceHandle, false)), monitor);
To resolve this error , we are trying to reload this “out of sync component” in our local sandbox, I am using “ILoadOperation.requestreload “ API from EWM
ISharingManager sharingManager = FileSystemCore.getSharingManager();
}
@Override
return teamRepository;}
}; loadOperation.setEclipseSpecificLoadOptions(com.ibm.team.filesystem.client.operations.ILoadOperation.IMPORT_PROJECTS);
But this is throwing me this error: com.ibm.team.filesystem.client.FileSystemStatusException: Status ERROR: com.ibm.team.filesystem.client code=2 Loading the directories in the file system would overwrite/remove existing directories.
When we reload components from the EWM client ,we have an option for overwriting the local changes. But from the code side , we are unable to figure out how we resolve the issue.
Can anyone suggest any solution here?
|
Accepted answer
Thank you Ralph....Unloading and Reloading that particular component seems to be the effective solution for resolving this issue Ralph Schoon 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
I think it is unlikely you get an answer. Very few people would know that API. Repository workspaces are not built to be changed on the server. Repository workspaces assume that code changes get checked in. If you change a loaded repository workspace on the server, they go out of sync.
If you can't find out how the Eclipse client does it - which might include code that is not part of the API - one way of dealing with it would be to unload and reload the component.