Use the RTC Jazz API to accept change sets
![](http://jazz.net/_images/myphoto/99f5380903f9ef16c459cfe09bc838d5.jpg)
I have a list of change sets that I'd like to be able to accept from a stream into a work space. It looks as though I should be able to do it using IWorkSpaceConnection.accept() - but I cannot find source or doc associated with that method. Does anyone have sample code they can share?
I'm using RTC 4.0.3 client (and the 4.0.6 server).
Accepted answer
![](http://jazz.net/_images/myphoto/99f5380903f9ef16c459cfe09bc838d5.jpg)
the javadoc, downloadable from the jazz,net/downloads for your product level (all downloads)
will have that in it.
will have that in it.
accept
IUpdateReport accept(int flags, java.util.List incoming, ITeamRepository optionalTeamRepository, org.eclipse.core.runtime.IProgressMonitor monitor) throws TeamRepositoryExceptionAccepts into the workspace the given incoming change sets. The incoming change sets are added to the workspace, effectively incorporating the changes they describe into the workspace configuration. The resulting update report contains an entry for each item mentioned in one of the incoming change sets not already present in the workspace. These entries describe what happened to the item in the workspace, and provide the information that a client would need to perform a user-directed 3-way merge and to complete the integration of the changes into the workspace. Clients should be written without making strong assumptions on exactly how a server will perform this operation; clients should instead entirely work from the information contained in the report returned on each occasion. Items that require client intervention to complete the merge are considered to be conflicted.