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

How to determine if a change set contains merges due to conflict

I'm currently working on RTC eclipse API and I have a use case where I need to determine whether a change set was merged with a different change set after a conflict. 


I need to determine the points pointed in this image.

What I'm currently doing is:

IChangeSetHandle csh;
IProgressMonitor monitor = new NullProgressMonitor();
IChangeSet changeSet = (IChangeSet) repository.itemManager().fetchCompleteItem(csh, IItemManager.DEFAULT, monitor);
ItemId<IItem> itemId = new ItemId<>(changeSet.getItemType(), changeSet.getItemId());
IChange change = ChangeSetUtil.getChangeFor(changeSet, itemId);
mergeState = ChangeSetUtil.getLastMergeState(change);

But the change object is always null .

What I would like to do is:

if (mergeState.isMergedDueToConflict()) // Check if a change contains merge
{
       // Do something
}

basically do something if the change set contains merge due to conflict. I'm not sure what I'm doing wrong here.

Note: The RTC version that I'm using is 6.0.6.1

0 votes


Be the first one to answer this question!

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,941
× 33

Question asked: Jul 21 '21, 11:10 a.m.

Question was seen: 892 times

Last updated: Aug 30 '21, 3:25 a.m.

Confirmation Cancel Confirm