DiffMerge request for functionality

Support for our DiffMerge utility.

Moderator: SourceGear

Post Reply
Posts: 3
Joined: Fri Apr 04, 2008 8:46 am
Location: Denmark

DiffMerge request for functionality

Post by kehler » Fri Apr 04, 2008 8:50 am

3 way merge

Code: Select all

               TA        T
branch    \
                 A        B

The drawing about describes my situation.

I have a development path that end in T.
I have a ‘release’ path which has previously been merged into the development path (A has been synchronized with TA).
I now want to merge the development from A to B into T.
I.e., it is a 3-way merge between T and B with the common ancestor A (notice that the path from A to T becomes longer and longer, and is a good deal longer than the A to B path).

It is very important for me to be able to see the two diff’s clearly.
Especially the diff between A and B.
Currently I make a folder diff between A and B and keep that besides the merge so I can switch to that and see the changes I’m really trying to merge into T.
Unfortunately the 3-way-merge view doesn’t make that too clear.

I suggest that you have a way of viewing the diff(A,B) in the 3-way-merge view (and of course also the diff(A,T) it is after all a symmetric operation even if it is typically used in non-symmetric contexts.
It would be nice both to be able to see the diff directly by using a ‘better color scheme’ or to switch to a 2-way-diff view.

Currently unfortunately this kind of merge is very difficult.

Change between horizontal and vertical layout
It would be nice if the diff view could change between horizontal and vertical layout.
When you have just moderately long lines it is cumbersome to have to scroll and it is difficult to spot difference on a line.

Being able to split a edit group
Sometimes the merge tool get the edit groups (lines that are thought of as being edited as a whole) wrong.
In these cases it would be nice to be able to split the groups into lines and then pick between the lines from the two endpoints. (only some of the lines from B should be copied to T).

DiffMerge is a good tool, the best we have been able to find.
Nevertheless merging is rather difficult and time consuming and we would like it to be easier.
If you have any questions about my suggestions don’t hesitate to ask.
Carsten Kehler Holst
Prolog Development Center A/S

Posts: 534
Joined: Tue Jun 05, 2007 11:37 am
Location: SourceGear

This is an awkward situation.

Post by jeffhostetler » Fri Apr 04, 2008 1:29 pm

WRT 3 way merge:
This is an awkward situation, but unfortunately it happens.
What we're basically talking about is a 4-way merge. Or a 5-way
merge with the center having the absolute common ancestor (the '+'
in your diagram). Showing this in one window is problematic because
although A and TA are sync'd, they are not necessarily identical. I've
stared at this problem in the past and haven't found a
direct/obvious/general solution to present this information.
(not that 3-way merge was all that obvious/trivial :-))

in some sense, it all kind of depends upon how close A and TA are
(they may be sync'd but not identical).

assuming that you have vault 4.x or fortress 1.x, you might try
something like the following. (but this may or may not be more trouble
than what you're doing now.)
[1] open a diff between A,B (read-only is OK)
[2] open a diff between TA,T
[3] open a diff between B,T

the 2 instances of T (on the right sides of [2] and [3]) will be shared
(edits in one will show up in the other). then you can edit T, either by
applying patches from B or by manually typing into T or copying/pasting
from B into T. window [2] will highlight the additions that you're making
to your dev branch. This may or may not be useful, it just depends upon
the correlation between the various versions. Let me know if you have

I'll add your comments to the work item for this.

WRT horizontal vs vertical layout:
this has been requested before. i'll add your vote for this.

WRT splitting an edit group:
assuming you have the version of DiffMerge that shipped with 4.x or 1.x,
you can split an edit group by control clicking on the colored lines.
this will cause each line individually to be highlighted. or you can use
the copy/paste.

hope this helps,

Posts: 3
Joined: Fri Apr 04, 2008 8:46 am
Location: Denmark

Post by kehler » Mon Apr 07, 2008 5:54 am

Thanks for your quick answer.
You are right it is an akward situation - but I think it is quite common.

I suggest a simple extension to the 3-way view:


so you can open the A,B diff from the [B] pane
(and the A,T diff from the [T] pane).

That way you don't have to make the diff separately and it should be possible for the two views to have synchronized view ports. When you switch form one to the other you should look at the same lines.

I don't know if it is a good idea to consider the TA point.
I might reduce the differences and the number of conflicts.

Carsten Kehler Holst
Prolog Development Center A/S

Post Reply