How to delete the workspace programmatically in RTC SCM API
Hello All,
We have a usecase wherein we, need to get the Changesets from a particular snapshot given(Baselines).
We are creating the workspace connection for getting the connection object as mentioned in below uri :
https://jazz.net/forum/questions/239965/how-to-get-the-changesets-linked-to-a-particular-snapshot
IWorkspaceConnection tempwrkspaceCon=workspaceMgr.createWorkspace(scopeHandle, "testStreamDemoPurpose2", "forTestingpurpsose", snapShot, null);
IChangeHistory changeHistory = wrkspaceCon.changeHistory(compHandle);
List<IChangeHistoryDescriptor> csDescriptorList = changeHistory.getHistoryDescriptors(Integer.MAX_VALUE, false, null);
for (IChangeHistoryDescriptor csDescriptor : csDescriptorList) {
//some more code.
}
After getting all the ChangeSets, we need to delete the tempwrkspaceCon workspace, because that is not required anymore.
Could you please suggest as how to delete the workspace pointer programmatically ?
Thanks.
One answer
I believe you use the same API you used to create the workspace to delete it: com.ibm.team.scm.client.IWorkspaceManager.deleteWorkspace(IWorkspaceHandle, IProgressMonitor)