Announcement

Collapse
No announcement yet.

Align multiple lines at once: in 3-way merge using multi-select and Align With

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Align multiple lines at once: in 3-way merge using multi-select and Align With

    It is extremely tedious to compare lines of text. I've tried selecting all the lines on the right/left side, Select Align With from the context menu, then selecting the corresponding lines on the opposite side, but as far as I can see the functionality is just not there.

    In many of the cases I encounter where this would be necessary, I end up having to manually align each individual line (it would be fine if just lining up the first line caused an updated comparison of the following lines, resulting in the same desired behavior). As you can see, the same text was added to both the left side and right side (unfortunately not always in our control).

    Any solutions?

    Example:
    (Left Side) (Middle) (Right Side)
    Line A
    Line B
    Line C
    ...
    100 more lines

    Line A

    Line B
    Line C
    ...
    100 more lines, possibly identical to the left side

  • #2
    The Text Compare supports selecting multiple lines, using Align With, and then selecting multiple lines for a target. Unfortunately, this feature is not available in the Text Merge. Enhancing this is on our wishlist.

    We also have options to alter the alignment using the Session Settings dialog, which might help depending on your files. And to confirm: your center pane is currently set to the Common Ancestor? Our alignment algorithms allow you to have the left and right panes be either Yours or Theirs, but the Center pane is expected to be the Ancestor and you'll see drastically improved alignment results if the center is the ancestor file.
    Aaron P Scooter Software

    Comment


    • #3
      Unfortunately, this feature is not available in the Text Merge. Enhancing this is on our wishlist.
      More than one year is gone. How about is this feature?

      This problem cost so much time. It is very important to improve the manual alignment function in merge.

      Comment


      • #4
        Hello,

        This is still on our Customer Wishlist.
        Aaron P Scooter Software

        Comment


        • #5
          It's been another year - how's that wishlist?

          I spend so much time doing this manually

          Comment


          • #6
            Sorry, it's still on the list for a future version.
            Chris K Scooter Software

            Comment


            • #7
              I second this. There's a lot of tedium attempting to figure out what happened when BC thinks one } is a different } and the whole function is misaligned. Multi-line alignment during a merge would be really useful.

              Comment


              • #8
                Thanks. For } specifically, it may help to try out different alignment options, specifically the Session Settings, Alignment, Patience algorithm, which can weigh brackets.
                Aaron P Scooter Software

                Comment


                • #9
                  I just hit a really bad alignment issue in a merge. The tool is pretty much useless here. I have to scroll through pages of code to align a single line, then do it again, then I can never quite get all 3 files to maintain alignment. I'm going to have to do this some other way

                  Comment


                  • #10

                    I was able to fix my issue by using the 'isolate' feature to have it ignore the part it was confusing with another section. Then I copy/pasted the two misaligned sections into separate files. I did a merge on those two new files, then copied the result into the main merge (which was still open). That seemed to do the trick. I think the tool could do some process like that, merge within merge?

                    Comment


                    • #11
                      Thanks for the feedback and idea. Do you still happen to have access to the use case/sample files? It would be useful to get the set of sample files for us to add to any Text Merge feature requests. We might also have different settings or commands that might help.

                      There is the option to launch a new tab, a new blank Text Merge, and use the clipboard to paste in 3 new input (Ctrl+Shift+V to Open Clipboard in each pane) and then take that merged output and paste it where needed into the original merge's output pane, as a manual workaround.
                      Aaron P Scooter Software

                      Comment


                      • #12
                        I don't have any sample files I can share, but a typical use case is a patch for a blocking bug has been cherry-picked from a release branch to master, and now we are trying to merge the release branch back into master to ensure all bugs fixed on the release branch are also fixed on master. In this case you can get big stretches of code which are the same on both master & branch, but different from the ancestor version. It would be nice if (ideally) these were aligned automatically, or at least there was a bulk align option in the merge pane.

                        Comment

                        Working...
                        X