How to List all outgoing ChangeSets using plain Java API
Accepted answer
The result of the call is a IChangeHistorySyncReport where you can see the incoming and outgoing changes.
The code you've posted is for searching change sets. It doesn't include a context of where you want to search so depending on your criteria, it could return change sets that have been discarded and never delivered to any stream.
Comments
Thanks Tim. I have started coding according to your suggestion. Now, I am stuck at initializing the workspaceHandle..
You can use IWorkspaceManager#findWorkspaces(IWorkspaceCriteria, int, IProgressMonitor) to find the workspace that you want. The criteria allows for searching by workspace name. You may want to add the owner to the criteria as well in case another user has the same workspace name.
The call will return a list of IWorkspaceHandle, which you can use to get the IWorkspaceConnection.
5 other answers
Comments
IWorkspaceSearchCriteria allows you to set the partial or exact owner name.
For stream, you can do another search with a new IWorkspaceSearchCriteria and use #setKind to specify streams instead of workspaces.
Or, you can use the workspace IWorkspaceConnection to get the flow table and access the current accept flow. It will return the IFlowEntry, which has a IFlowHandle (it's the parent interface for IWorkspaceHandle).
The second method would be more reliable to find the stream since it checks the workspace's current flow target. However, the flow table may be a little confusing so feel free to ask questions about it. I only suggest the first method if you want to run a comparison between the workspace and a few different streams.
Found how to set the exact owner name.
Comments
Hello
Is there way to list all the files associated with these change set handlers ?
Hello ,
Sorry for miscommunication. What I want is to have ChangeSet from ChangeSethandle to print the comments, owner and work item ID for that.What API combination should I use for the Same ?