Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

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 ?


0 votes


Accepted answer

Permanent link
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

0 votes

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?

Your answer

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

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,938

Question asked: May 14 '13, 2:10 a.m.

Question was seen: 5,325 times

Last updated: May 15 '13, 9:18 a.m.

Confirmation Cancel Confirm