Results 1 to 5 of 5
  1. #1
    Join Date
    Oct 2011
    Posts
    3

    Default Looking for 3-way compare (rather than merge)

    I've been doing a lot of 3-way merging these days and have been finding that BC's 3-way merge really isn't providing the function I want. What the merge tool gives me is left vs base and right vs base. But what I'm really looking for is left vs right. The only time I want base involved is if left and right differ. In that case I want to know if there was a change from base to left, base to right, or both.

    Currently I find the best way to do this is to open a 2-way compare in one window and a 3-way merge in another window. I do all my work in the compare window and only refer to the merge window if there's a difference in the compare window and I need to refer back to the base file to determine where the change(s) came from. Note that I may be pushing changes to the left AND the right, changing both files being compared.

    Maybe I'm wrong but it doesn't seem to me that this is all that uncommon a situation.

    Thank you,

    Steve

  2. #2
    Join Date
    Oct 2007
    Location
    Madison, WI
    Posts
    11,788

    Default

    Hello,

    The Text Merge session type is specifically designed for merging code, where the middle pane is a common Ancestor of the other two panes. At this point, the session logic helps make merging the changes from the Ancestor to the left and right much easier to merge into the Output. It is not an equal level 3 way compare.

    In your scenario, are any of the 3 files the common Ancestor of the other two? If so, this is the file that should be in the middle pane (which, visibility can be toggled on or off if you want to hide it during code review).

    Comparing across 3 files with a 3-way Text Compare is not a session type we currently support, but is something on our Customer Wishlist.
    Aaron P Scooter Software

  3. #3
    Join Date
    Oct 2011
    Posts
    3

    Default

    Hi Aaron,

    I'm sorry, I really didn't make that clear.

    Yes, one of the files is the common Ancestor. And yes, I have that in the middle pane. Thank you, I didn't realize the center pane could be toggled on or off.

    In fact toggling the center pane off makes what I'm talking about even more clear. Imagine the files in the left and right panes both have a change that has been made with respect to the common Ancestor. But the same change has been made to the two files. Even with the middle pane toggled off both files will show the change.

    But the key is that what I'm interested in is differences between the two files (not the common Ancestor). And since the files are the same I don't want to see any change indicated.

    The only time I want to see anything involving the common Ancestor is if the other two files are different. In that case it's important to know which of the files has been changed with respect to the common Ancestor. That way the change can be pushed from that file to the other to reconcile the two files.

    And that brings up other difference between the 3-way merge and my use case. I don't merge two files into a third file. When I'm reconciling two sets of files (from two development branches) I'm pushing changes from one file directly to the other. And I may also be pushing changes back the other way at the same time.

    Your 2-way compare is almost ideal for this. The ability when there's a difference to be able to push lines from one file to the other is exactly what I need.

    The only problem comes when I'm not sure whether the difference is due to a change to the left file or the right. That's where I need to know what the changes are with respect to the common Ancestor.

    So that's why I use a 2-way compare to do most of the work but have a 3-way merge going at the same time that I can refer to as needed. (Yes, I have multiple monitors.)

    I hope that clarifies my use case.

    Thank you,

    Steve

  4. #4
    Join Date
    Oct 2007
    Location
    Madison, WI
    Posts
    11,788

    Default

    Hello,

    Thanks for the clarifications. In that case, you want to enable the View menu -> Ignore Same Changes. This would remove the coloring from lines that are equal in Left and Right but different from Center/Ancestor.

    For the output, it is formed from the inputs, but can save to any location, including the file path of one of the top panes. Note, a Refresh would then re-run the merge logic, depending on any edits made to the output (merged or manual edits). We don't have a means to push in either direction however; that would be something the 3-way Text Compare session type could handle.
    Aaron P Scooter Software

  5. #5
    Join Date
    Oct 2011
    Posts
    3

    Default

    Ah, I missed "Ignore Same Changes". That definitely helps.

    I look forward to seeing 3-way compare if it makes it out.

    Thank You!

    Steve

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •