How to relate conflicts by selecting rows from both?

I am studying the use of version control (with Tortoise HG), so this question can be very simple, but I cannot figure out how to solve it.

Suppose there is a text file in branch A with the following:

A B C D E F 

Branch B has the same text file:

 A B 3 4 E F 

When merging these two files with TortoiseHG, merging is enabled using KDiff. Kdiff allows us to select rows from only one of the two. I want the combined code to contain lines from both:

 A B C D 3 4 E F 

Order is not important. How to resolve merge conflict in KDiff3 to get what I want?

This is not an academic discussion. This is a simplified version of what happens with the code for a small Android application, where the XML files for strings are edited in both branches.

+7
source share
1 answer

It's actually pretty simple, in kdiff3 you turn off auto-transition, the button after dialing ABC, then go through the conflicts using the next conflict button (just before A), and in each conflict you switch A or B or A, then B or B, then A, to get the desired result - you can manually edit the file in the bottom panel, if necessary.

+11
source

All Articles