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

Locate which streams a changeset is on using RTC API.

Anyone who knows how to locate the streams a changeset is on, through the plain java client API?

0 votes


Accepted answer

Permanent link
As of RTC 4.0, you would want to take a look at the following:

List<IChangeSetHandle> changeSets = new ArrayList<IChangeSetHandle>();
changeSets.add({change_set_I_care_about}); // Note you can add multiple change sets here...

List<IWorkspaceHandle> streams = ... {this is the list of streams you want to look in, for example, prior to this you might want to run a query to find all the streams in a given project area, etc.}

ILocateChangeSetsSearchCriteria scope = ILocateChangeSetsSearchCriteria.FACTORY.create(changeSets , streams, Collections.EMPTY_LIST, Collections.EMPTY_LIST);

IWorkspaceManager workspaceManager = SCMPlatform.getWorkspaceManager(repository);

List<ILocateChangeSetsSearchResult> result = workspaceManager.locateChangeSets(scope, monitor);

Note: On the server, this ends up calling: IScmQueryService.findLocateChangeSets(ILocateChangeSetsSearchCriteria scope, IRepositoryProgressMonitorHandle repoMonitor)
Michael Valenta selected this answer as the correct answer

0 votes


One other answer

Permanent link
I think something like this might work for you-
IWorkspaceManager workspaceManager = SCMPlatform.getWorkspaceManager(repository);          IWorkspaceConnection workspaceConnection =
workspaceManager.getWorkspaceConnections(workspaceHandle,monitor);
workspaceConnection.hasChangeSets(changeSets, monitor);

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
× 169
× 149
× 79

Question asked: Sep 06 '12, 9:50 a.m.

Question was seen: 6,650 times

Last updated: Nov 08 '16, 10:24 a.m.

Related questions
Confirmation Cancel Confirm