It's all about the answers!

Ask a question

Use the RTC Jazz API to accept change sets

Zoe Slattery (4011720) | asked Apr 16 '14, 10:58 a.m.
edited Aug 16 '18, 1:14 p.m. by David Lafreniere (4.8k7)

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

permanent link
sam detweiler (12.5k6195201) | answered Apr 16 '14, 11:27 a.m.
the javadoc, downloadable from the jazz,net/downloads for your product level (all downloads)
will have that in it.


IUpdateReport accept(int flags,
                     java.util.List incoming,
                     ITeamRepository optionalTeamRepository,
                     org.eclipse.core.runtime.IProgressMonitor monitor)
                     throws TeamRepositoryException
Accepts 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.
Zoe Slattery selected this answer as the correct answer

Zoe Slattery commented Apr 19 '14, 2:43 p.m.

Thanks :-/ 

Albert Yao commented Aug 05 '18, 6:24 a.m. | edited Aug 05 '18, 5:35 p.m.

What does the "int flags" parameter mean?

David Lafreniere commented Aug 16 '18, 1:14 p.m.

     * @param flags
                 {@link AcceptFlags#PREFLIGHT} if this is just a trial run to find out
            what this operation would do, and {@link AcceptFlags#DEFAULT} if the
     *            operation should actually be carried out

Your answer

Register or 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.