Is there any way to merge in a visual merge tool on windows that simultaneously shows annotations?
Asked Answered
J

0

7

I am using Mercurial, but I imagine that any merge tool that is aware of the version control system below it could do several things that a merge tool which is not aware of the version control system and only sees two "files" in two different folders, could never do.

I have been using KDIFF3, and recently tried BeyondCompare, and neither of them will do this, at least not that I could figure out.

What I want to do is best shown in this picture, an annotation column and perhaps even ability to open other windows from those annotation columns so I could browse specific versions of specific files to see context when trying to do a merge.

In the image here, I am showing a two way merge, but the same applies for a three way merge. To the right or to the left of the actual file content being shown, I would like a gutter or a right side annotation column showing some kind of annotation of where this change came from. Since Mercurial hex ids are relatively unfriendly and unhelpful, and since repository-local-revision-numbers are repository local, I think that a short text description based on commit comments would be most helpful. Of course, with Mercurial, 99% of these commit comments are going to say "Merge", and nothing else. (Groan.) But lets pretend for a minute that we weren't using tools and workflows that left us that crippled at merge time, and instead, that we could have a useful commit comment show up each time:

enter image description here

Right now the workflow for complex merges looks like this for me:

  1. Using my distributed version control tool (mercurial), pull changes from another repository which is in effect a branch. Merge. The merge window for TortoiseHg is usually where I start all this from. This in turn lets me configure a merge tool (beyond compare or Kdiff3).

  2. However, it does not appear that there is any merge tool (that I have seen) that can be told, "hey you're not just merging two way or three way with different versions of a file in the two completely different folders, with the names I told you, but those files are also files that have a complete edit history available to you to show your human the actual context, the commits that those line changes came from with their commit comments, often having a bug number as part of the commit which will give the person doing the merge the ability to see What in the Heck is Really Going on.

I would change from Mercurial to Git, for example, even, for a real merge experience that didn't force me to do manually what I think my tools could be doing for me automatically. I'm using Mercurial, TortoiseHG, and KDIFF3, and if I could just change from KDIFF3 to some other tool, or do ANYTHING at all to get annotations and merges together on one screen, I would like to do so.

Judie answered 24/5, 2013 at 13:34 Comment(5)
I don't think that such tool exist. I'm using P4Merge, which is the best tool I've tried, KDiff3 I don't get it, BeyondCompare is less clear I would say.Dougherty
I don't get why you think that "99% of these commit comments are going to say "Merge""... that's not my experience at all. Maybe your developers rarely if ever commit their work?Palila
In 2020 still using mercurial? :-)Judie
@WarrenP indeed.Palila
In my experience KDiff3 is not very useful for merging; when merging, it shows side-by-side: 1) revision 1, 2) revision 2, and 3) base version; and 4) at the bottom the result. So I install TortoiseGit (or TortoiseSvn), and configure TortoiseHg to use TortoiseMerge instead. In TortoiseMerge I instead see: 1) difference between revision 1 and base; 2) difference between revision 2 and base; and 3) at the bottom the result. I don't know of any tool which would give you a revision history/blame during the merge; but if I needed that, I can view it in a separate window (outside the merge process).Diarrhea

© 2022 - 2024 — McMap. All rights reserved.