It's all about the answers!

Ask a question

Deliver specific changesets to different streams


VK L (8177126159) | asked Jun 08 '15, 3:42 p.m.
edited Jun 09 '15, 3:35 a.m. by Ralph Schoon (55.5k23642)
Hi,
I have the changeset reference and need to deliver selectively to specific streams - as all changesets are not applicable to be delivered. There wont be any conflicts as its in the required order.
Is it possible to deliver the selected changesets to streams without getting a total out-of-sync report?

Please advise.Thanks.

One answer



permanent link
Ralph Schoon (55.5k23642) | answered Jun 09 '15, 2:54 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
I am unsure if I understand the question, especially as it was tagged with extending, which means API work.

There are several ways how to do this. One would be to create a repository workspace from the stream you want to deliver to. Then you accept the changes you want into that repository workspace. Then you deliver the outgoing changes. If you have gaps, you would have to use the gap handling to get the change sets too.

You can accept change sets from work items, r you can search for them in different ways.

An out of sync typically only occurs, if one has the same repository workspace loaded and changed from different places. So it does not really play a role in this scenario at all.

Comments
VK L commented Jun 09 '15, 3:19 a.m.

Hi Ralph,
I want to deliver selective changesets from StreamA to StreamB [Not all]
I use WorkspaceA and complete delivering all my changes into StreamA. Now in order to deliver changes from WorkspaceA to StreamB, Changesync+deliver API doesnt provide an option to choose changesets to deliver [
It will sync up StreamA and StreamB]
I am looking to deliver only certain changesets from StreamA to StreamB using API. Please advise.


Ralph Schoon commented Jun 09 '15, 3:34 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

All I can provide is https://rsjazz.wordpress.com/2013/09/30/delivering-change-sets-and-baselines-to-a-stream-using-the-plain-java-client-libraries/

Note that a stream is 99% the same as a repository workspace, so that code should work. You can compare the two streams and get a set of change sets. Maybe operate on that?

I don't have code to search for a specific change set.

However, I am aware that a similar other question was here on the forum.


Ralph Schoon commented Jun 09 '15, 3:34 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Note, please try to put a little bit more effort into your questions and describe what you want to do and why.


VK L commented Jun 09 '15, 3:37 a.m.

I am looking for an API equivalent to CLI:"scm deliver -c"
where we can deliver selected changesets between source and target. Thanks.


Ralph Schoon commented Jun 09 '15, 3:42 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

This is the API I am aware of, from my blog post. Maybe start there?

System.out.println("Comparing Change Sets...");
    IChangeHistorySyncReport changeSetSync = repoWorkspace.compareTo(
            targetStream,
            WorkspaceComparisonFlags.CHANGE_SET_COMPARISON_ONLY,
            Collections.EMPTY_LIST, monitor);
    System.out.println("Deliver Change Sets...");
    repoWorkspace.deliver(targetStream, changeSetSync,
                Collections.EMPTY_LIST,
                changeSetSync.outgoingChangeSets(component), monitor);


showing 5 of 6 show 1 more comments

Your answer


Register or to post your answer.