Tripartite merger - different philosophies?

I have been a user of UltraCompare Pro since its inception , and I think it is a very full-featured comparison and merge tool. However, since I studied DVCS more closely, I found that it handles tripartite mergers differently than (most?) Other tools. Therefore, I wonder why this is so, and I'm missing something because of this.

There are three merge panels in UltraCompare (let them be called basic, local, and others). All merge actions take place inside these panels. In practice, this means that I do my work in the middle panel (local), combining the changes on the right (other) or, possibly, from a common ancestor on the left (base). The middle panel changes during the session, and then is saved - and fixed as a result of the merger. The fourth panel (output window) contains only information about the results of the comparison.

Screenshot UC
(source: ultraedit.com )

In other tools, it seems that the three panels exist only in a read-only state, and that the fourth lower panel (output) is the place where the whole merge takes place. What are the reasons for having an extra merge window? Is it easier to track all changes? Or is it just that because everyone has always done that, so we copy this behavior? What is your opinion on this?

Screenshot kdiff3
(source: hginit.com )

I'm not sure if there is a better or correct answer, so I haven't made this CW question yet, but I also rely on your opinion here.

+4
source share
4 answers

It seems to me that you very well want to keep the local version unchanged when you make changes.

original local other merged bar= foo+1 bar= foo+2 bof= foo+2 zot= foo+1 ... ... ... ... print foo print bar print foo+1 print bar?? 

Both local and other introduced a new variable bar . Drain the first change to bof / zot , go for a cup of tea, come back and try to combine print . Wait what was bar in local ? If the original local not there, this information has disappeared, and you are scratching with another text editor to find out what happened.

This is a contrived example, but this kind of thing can easily happen for any set of changes that you cannot save in your head and make at a time. In general, 3WM always has two variable elements, change A and change B. To reproduce all the information in this, you need four kinds for all possible permutations: 0 (original), A , B and AB (merge).

+6
source

Project: Merge is a comparison and merge tool I wrote for XML. I looked at the standard four-panel approach and almost instantly dropped it as a very wasteful way to display data. A point well proven in the screenshots above, where almost all panels show the same data several times.

Therefore, I developed a one-pane approach to display all input files and show which ones contribute to the output. (Or where there are differences when comparing files.) Although I did not allow completely free text editing (mainly because of how the XML nodes are managed and referenced) some parts of the merge result can be changed more or less, since you will be in the usual text editor. (My editor keyboard shortcuts are closely related to Visual Studio shortcuts related to navigation.) The most noticeable are the characteristic data, comments, and attribute values. You can also cut and paste whole XML nodes. (But, obviously, only in the form of text for external applications.)

The following screenshot shows a three-way merge with most of the changes appearing in the "left" file, and an unresolved conflict below the selected change:

alt text

+4
source

Personally, I like the free perforce merge tool (p4merge). It also has 4 windows - the upper middle for the original (before branching), on the left for the destination branch, on the right for the source branch, and the lower part is edited.

I like it better than your option 1, as all 3 original files may have important information that can influence the merge.

+3
source

Basically, there are two ways to display the differences between two files:

  • Two panels side by side
  • One panel

Graphically:

 aaa aaa bbb ··· ··· ccc ddd ddd 

and

  aaa -bbb +ccc ddd 

Some programs use the former (for example, WinMerge), and some programs let you choose (for example, TortoiseMerge or Google Project Hosting). This is probably a matter of taste, but I find that the second is intuitive when you want to track changes. However, if you want to edit the changes, you need two panels.

When merging a tripartite, various layouts come from this. Ultra compare uses a single panel approach to display changes, so you can edit two panels and a third panel. Other programs use a two-pane approach to display changes, so you get three panels plus a fourth for editing.

Again, I think this is just a matter of taste.

+2
source

All Articles