It's all about the answers!

Ask a question

Java code - how to deliver components to the stream induvidually in a iteration

nanda S (201619) | asked Jun 25 '14, 4:48 a.m.
edited Jun 25 '14, 4:53 a.m.


I using java API and I am trying to deliver components induvidually in a iteration, but how to pass a List of components to the deliver command

workspace.deliver(stream, sync, Collections.EMPTY_LIST,sync.outgoingChangeSets(component), monitor);



---create stream

---create workspace 

------------------------------------------loop start here--------------------------------------

for (int i=0; i<listofcomponents.size(),i++)


<creation of components>


-----------------------------------------loop ends here-----------------------------------------

Sharing the folders from local drive to components using the lscm command


for (int i=0; i<listofcomponents.size(),i++)


//deliver command



One answer

permanent link
Shashikant Padur (4.2k27) | answered Jun 25 '14, 5:24 a.m.
The deliver api takes in either change sets or baselines. To deliver all the outgoing change sets from all the components in your workspace you can do the following:
IChangeHistorySyncReport report = workspace.compareTo(stream, WorkspaceComparisonFlags.CHANGE_SET_COMPARISON_ONLY, Collections.EMPTY_LIST, null);
workspace.deliver(stream, report, Collections.EMPTY_LIST, report.outgoingChangeSets(), null);

If you want exclude certain components you can specify the list of components to be excluded as the third parameter in the workspace.compareTo() method.

If you are using the cli commands you can use 'lscm deliver -C comp1 comp2 ....'

Your answer

Register or to post your answer.