Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

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:

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?

0 votes



2 answers

Permanent link
 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);

0 votes


Permanent link
 Do I really need to create a temporary workspace with my baseline to load files ????

0 votes

Your answer

Register or log in to post 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,926
× 1,201
× 169

Question asked: Dec 19 '11, 1:25 a.m.

Question was seen: 8,577 times

Last updated: Dec 03 '13, 3:10 p.m.

Confirmation Cancel Confirm