Auto Resolve Using Java API.
![]()
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
![]()
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 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? IMergeResultOp has subinterfaces:
Instances are manufactured by
|