It's all about the answers!

Ask a question

Auto Resolve Using Java API.


praveen patidar (8612844) | asked May 14 '13, 2:10 a.m.
Hello,

I am doing the stream to stream merge using RTC API. for the conflict files management, we are creating new change sets and attaching the work item. I am ok with the Merge part using Beyond compare.
I am doing beyond compare merge for the conflict files. the files that are well merged with BC I will upload back in the Workspace. After upload I am doing below stuff to mark as merge and move the files from Conflict to the merged change set. a

                IVersionableHandle ori = iItemConflictReport.getOriginalSelectedContributorState();
                IVersionableHandle selected  = iItemConflictReport.getSelectedContributorState();
                IVersionableHandle proposed = iItemConflictReport.getProposedContributorState();
                    System.out.println("- Mark as Merged for All files. "+fileItem.getName());
                    wsConn.commit(csHandle,Collections.singleton(opFactory.markAsMerged(ori, selected,   proposed)), null);
             
-----------------------------------------------------------

Issue : There is also an option at UI for Auto resolve, I tried the above thing before doing BC Merge without downloading but it is actually merging with proposed version only.

Question :
Is it possible to Merge using API ? Is RTC system smart enough to Merge a simple conflict ?

If I have version labeled as Auto Resolvable means after accepting changes my source and target becomes equal then how can I detect those changes using the conflict report API ?


Accepted answer


permanent link
Tim Mok (6.6k38) | answered May 14 '13, 3:05 p.m.
JAZZ DEVELOPER
For the Eclipse client, it uses Eclipse merging capabilities for text files. This isn't something you can call from the plain Java API. Other clients may implement their own auto-merging logic.
praveen patidar selected this answer as the correct answer

Comments
praveen patidar commented May 14 '13, 8:15 p.m. | edited May 14 '13, 8:16 p.m.

Thats what I read in one of the article but I lost the article. Thanks for the confirmation. I have seen the option to do

opFactory.merge(IMergeResultOp, versionable, versionable)

Can you please tell me how this API works? Where to get the IMergeResultOp object to pass?


Tim Mok commented May 15 '13, 9:18 a.m.
JAZZ DEVELOPER

Your answer


Register or to post your answer.