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

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • eloi
    New User
    • Jan 2016
    • 1

    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
  • Aaron
    Team Scooter
    • Oct 2007
    • 16000

    #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

    • sparrow
      New User
      • Aug 2017
      • 1

      #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

      • Aaron
        Team Scooter
        • Oct 2007
        • 16000

        #4
        Hello,

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

        Comment

        • LEPT0N
          New User
          • Sep 2018
          • 1

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

          I spend so much time doing this manually

          Comment

          • Chris
            Team Scooter
            • Oct 2007
            • 5538

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

            Comment

            • ColinCampbellEA
              Visitor
              • Apr 2020
              • 5

              #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

              • Aaron
                Team Scooter
                • Oct 2007
                • 16000

                #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

                • cRooke_Monster
                  New User
                  • Aug 2020
                  • 2

                  #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

                  • cRooke_Monster
                    New User
                    • Aug 2020
                    • 2

                    #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

                    • Aaron
                      Team Scooter
                      • Oct 2007
                      • 16000

                      #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

                      • kdunwoody
                        New User
                        • Apr 2010
                        • 2

                        #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

                        • Paulzip
                          New User
                          • Jan 2023
                          • 2

                          #13
                          This is a continual problem with the 3 way merge, where BC just refuses to align blocks, even though there is little to no difference in the 3 panes. So you have to align each line in each pane. Even if you align say the first, middle and last lines of a block, BC will STILL refuse to see the other lines could be aligned, you end up having to chase the alignment around, it drives me around the bend. Why can't I select 10 lines in one pane and select a block of lines in another pane and Align With, like I can with other compare tools? It's a basic bit of functionality.

                          Comment

                          • Aaron
                            Team Scooter
                            • Oct 2007
                            • 16000

                            #14
                            Hello,

                            You can drag a selection to select multiple lines for the source but the target alignment isn't performing a re-alignment on the target selection, and also immediately triggers instead of allowing all three input panes to have selections.

                            We actually improve this in BC5, which is currently in public beta, if you'd like to give it a try and give us some feedback. You can drag select multiple lines for each selection, and pick a selection from all three input panes.
                            Aaron P Scooter Software

                            Comment

                            Working...