It's all about the answers!

Ask a question

Can I create a workspace from a component baseline? How do I load this workspace?

V D (133) | asked Feb 05 '21, 9:48 a.m.


I have a snapshot. User selects requisite baseline from the snapshot and I am able to get the handle to that component baseline (within the snapshot)
I need to download the source code from this baseline and copy it to another component.
Correct me if I am wrong, the steps are --- create workspace with that component baseline --- load workspace --- copy code to another workspace containing new selected component and check-in

I am trying use the createWorkspaceAPI and I find that IBaselineSet and IHistoryReference are 2 ways to call the API
How can I create workspace with Baseline ONLY 
Is it possible? or I have to create workspace with the snapshot I have and then fetch the required component baseline in it...
How can I load the workspace once I have the IWorkspaceConnection Handle
IWorkspaceConnection wcMy = workspaceManager.createWorkspace(owner, workspaceName, workspaceComment, baselineSet, monitor.newChild(10));

Shashikant Padur commented Feb 07 '21, 11:57 p.m.
Question: I need to download the source code from this baseline and copy it to another component.

Are you copying code selectively? or copying the entire code? If copying the entire code, why can't you replace the target component with the baseline of the source component?

One answer

permanent link
Ralph Schoon (63.3k33646) | answered Feb 06 '21, 5:01 a.m.
You might wqant to have a look here: especially the functions
- uploadToStream
- downloadComponentBaseline

Your answer

Register or 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.