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 ??????? } |
One answer
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
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.