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

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

Hi

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

______________________________________________________________________________________________________________

example:

---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

---------------------------------------------deliver--------------------------------------------------

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

{

//deliver command

???????

}

0 votes



One answer

Permanent link
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 ....'

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
× 1,700
× 383

Question asked: Jun 25 '14, 4:48 a.m.

Question was seen: 5,193 times

Last updated: Jun 25 '14, 5:24 a.m.

Confirmation Cancel Confirm