HTML File Merging Problem

HTML File Merging Problem

3
NewbieNewbie
3

    Oct 14, 2020#1

    UltraCompare Professional 64-bit
    Version 20.20.0.36
    German
    Text Diff

    I've got two simple html files. The diff works nicely, but as soon as I start copying differences from one side to the other, things are getting messed up. Differences are being displayed as resolved (green) although random lines were inserted by the operation. Please see the screenshots below

    Any ideas what's happening here, any solutions?

    Thanks
    jpp
    Screenshot 2020-10-14 100250.png (59.9KiB)
    Diff works nicely
    Screenshot 2020-10-14 100635.png (63.9KiB)
    Copying from window 2 to 1
    Screenshot 2020-10-14 100403.png (59.75KiB)
    result is not as expected

    Mofi
    6,48846632
    Grand MasterGrand Master
    6,48846632

      Oct 14, 2020#2

      The used text comparison and merge mode is not good for the type of text comparison you wanted to do with merging differences from one HTML file to the other HTML file.

      It looks like you are using toolbar/menu mode and so I describe the cause of the unexpected merge with this user interface mode. I have installed only English UltraCompare and so describe the cause with the English instead of the German terms.

      First, you have enabled in menu View the option Relational Lines Mode which is the eight menu item from bottom of menu View. It would be better to toggle off this option if merging differences should be done also and not just comparing the two files and the files are very similar. All the rectangles around the different blocks and the diagonal lines between the different blocks disappear on turning off Relational Lines Mode.

      Second, you have enabled in menu Merge the option Line Mode Merge which is the first menu item at top of menu Merge. That is the main cause of the unexpected line merge.

      It can be read in help of UltraEdit how the line mode merge differs from default block mode merge. In line mode merge the user has to select one or more lines in both panes before using one of the merge commands. This gives the user the freedom to merge any line(s) anywhere from left to anywhere to right and vice versa without or with overwriting one or more lines in destination pane.

      In your use case there was no line selected at all in any pane. For that reason UltraCompare merged the active line from second pane to active line in first pane with overwriting active line in first pane. It can be seen that the caret in left pane was at end of line 265. The caret in right pane was most likely at top of the file at beginning of line 1. So UltraCompare merged line 1 in second pane over line 265 in first pane on executing the command Merge Second To First with enabled Line Mode Merge.

      I use myself never the line mode merge feature. When I want to merge one or more individual lines from right to left or from left to right, I select the lines which I want to copy to other file, press Ctrl+C to copy them to clipboard, set caret in other pane at the position where the copied lines should be insert without or with making a selection for replacing the selection, and press Ctrl+V to insert the lines with overwriting selected lines on having lines selected at all. So I use mainly the default block mode merge which means option Line Mode Merge is enabled never by me.
      Best regards from an UC/UE/UES for Windows user from Austria

      jpp
      3
      NewbieNewbie
      3

        Oct 15, 2020#3

        thank you mofi. your answer was very helpful and appreciated. it made things quite a bit clearer to me.