When performing a three-way merge in Beyond Compare, we can get the following misalignment due to code similarity (X are segments of remote codes and only two files are shown):
XXXXXXXXXXXXXXXXX somefunc() <---1 XXXXXXXXXXXXXXXXX { XXXXXXXXXXXXXXXXX modified body XXXXXXXXXXXXXXXXX ... XXXXXXXXXXXXXXXXX } XXXXXXXXXXXXXXXXX ...next segment ...next segment
The required alignment is as follows:
XXXXXXXXXXXXXXXXX somefunc() somefunc() { { modified body body ... ... } } ...next segment ...next segment
So, I do a manual alignment between position-2 and position-1, and actually I get the following:
XXXXXXXXXXXXXXXXX somefunc() somefunc() XXXXXXXXXXXXXXXXX { XXXXXXXXXXXXXXXXX body XXXXXXXXXXXXXXXXX ... XXXXXXXXXXXXXXXXX } { XXXXXXXXXXXXXXXXX modified body XXXXXXXXXXXXXXXXX ... XXXXXXXXXXXXXXXXX } XXXXXXXXXXXXXXXXX ...next segment ...next segment
Thus, he manages to align one line, but then he shifts the rest of the code.
How can we use manual alignment to get the desired result? Changing the settings for changing the alignment parameters also does not give the desired result. (Also note: the body and the modified body are very similar, so the match cannot be missed)
This is a forum post here that mentions a separate line-alignment, but that would be very tedious for longer sections.
Edit: If the specified alignment is not possible in the current version, is it possible to disable automatically synchronized scrolling of the input and output editor panels, so that non-primary sections of the code can be viewed by the user at the same time. These sections will be unequal in the program, but will be considered aligned from the user point of view.
alignment beyondcompare three-way-merge
Basel shishani
source share