How to load components from a baseline using API?
I'm working on a migration tool in which we are trying to migrate SCM data from third party repository (CMVC) to RTC along with all the history. For that we are retrieving all the baselines from CMVC and building the history using these baselines. Now to ensure that we have imported the history from CMVC correctly, we are trying to do the audit by comparing baseline data from CMVC and RTC (by downloading CMVC baselines and RTC baseline and then comparing).
Now to load the RTC components from baselines were were using the API as:
Now above method loadOperation.requestLoadAs() has been removed from the API, how to accomplish the above task?
Now to load the RTC components from baselines were were using the API as:
IComponentHandle componentHandle = baseline.getComponent();
IBaselineConnection blConnection = SCMPlatform.getWorkspaceManager(repository).getBaselineConnection(baseline, monitor);
IComponent component = (IComponent) repository.itemManager().fetchCompleteItem(
componentHandle, IItemManager.DEFAULT, monitor);
ILoadOperation loadOperation = IOperationFactory.instance.getLoadOperation(null);
IPath copyFileAreaRoot = new Path(PathString);
ILocation location = new PathLocation(copyFileAreaRoot);
ISandbox sandBox = FileSystemCore.getSharingManager().getSandbox(location, false);
loadOperation.requestLoadAs(sandBox, null, component.getName(), blConnection, componentHandle, component.getRootFolder());
Now above method loadOperation.requestLoadAs() has been removed from the API, how to accomplish the above task?
2 answers
Hi,
I'm also interested in an answer !
In a previous version of the API, even if theses classes are not in the javadoc, the method requestLoad can use an IBaselineConnection as a parameter.
File localRoot = ...
IPath rootPath = new Path(localRoot.getCanonicalPath());
LoadDilemmaHandler handler = ...
ILoadOperation loadOp = IOperationFactory.instance.getLoadOperation(handler);
ISandbox sandbox = FileSystemCore.getSharingManager().getSandbox(new PathLocation(rootPath), false);
IBaselineConnection baselineConnection = ...
Collection<IVersionableHandle> files = ....
loadOp.requestLoad(sandbox, null, baselineConnection, files);