Merging single lines?

Merging single lines?

2
NewbieNewbie
2

    Mar 10, 2009#1

    I've seen another topic covering this issue but it's time to resurrect it.

    Why can't I select a single line from file and merge it to the other file, not before or after but replacing the line. Many times I'm comparing files that are extremely similar except for selected lines. Line Mode Merge would lead me to believe this is possible but it isn't. I'd have to merge whole block before or after then delete the unwanted lines from the merged-to file. Too much work. This is why I find myself using Beyond Compare for a lot if not most of my merges. It is much more intuitive that UC Pro.

    6,680583
    Grand MasterGrand Master
    6,680583

      Mar 10, 2009#2

      Hm, I can merge - better copy - just 1 line in a block of different lines with activated line mode merge by replacing just this line in the other window pane. I tested it with UC v6.10.0.1008. Could you be more specific. Maybe a screenshot saved as PNG would help.

      However, you can use also inline edit with UC Prof. v6. So you can select a line in window pane 1, copy it with Ctrl+C, select the line in pane 2 and paste with Ctrl+V. Not a very quick solution, but always working.
      Best regards from an UC/UE/UES for Windows user from Austria

      2
      NewbieNewbie
      2

        Mar 11, 2009#3

        OK I figured it out. But it seems a little counter-intuitive considering what UC shows you on the screen. As I understand it the default mode is acting on blocks of lines. If Line Mode Merge is not active the "Merge First to Second, and Merge Second to First" arrows will merge the whole block. I get that. If Line Mode Merge is active, and you select the line you want to merge you'll see the arrows/icons for "Merge First to Second Before", "Merge Second to First Before" etc become active which is what confused me. I didn't want to merge the line before or after the corresponding line in the second file. I want to overwrite it with the first file's line. You need to right-click or use the icons in the toolbar to merge the individual line. I hope this makes sense.


        Here's what I did: Activated line mode merge. Then right-mouse click on the line you want to merge and you will see a couple of options: "Merge First to Second" and "Merge Second to First", or use the icons up there on the toolbar. Voila! It works. I've attached an image. It might be too huge but I just grabbed it with SnagIt, annotated it and attached it.

        Seems to me that task as simple as this that spawns a thread on the forums should be revisited or documented more clearly.
        UC Merge.png (41.4KiB)

        6,680583
        Grand MasterGrand Master
        6,680583

          Mar 14, 2009#4

          Okay, you got it. Extra hint: see power tip Block and line mode merge.
          Best regards from an UC/UE/UES for Windows user from Austria

          901
          MasterMaster
          901

            Apr 22, 2010#5

            One of the biggest problems with UltraCompare is the lack of separate session types for compares and merges. UC attempts to integrate compare and merge functionality into one session type using the line-merge and block compare modes. I agree that the interface is confusing and counter-intuitive. I've been asking for a redesign which implements a true 3-way merge session for several years now. In my opinion, the ability to copy a line and overlay the matching line on the other side should be available in both the block and line modes. The block and line modes should provide a different way of viewing and working with the same session type. In other words, what UC really needs is a new 3-way merge session type. The block and line modes should exist in both the compare and the merge session types with varied implementations that reflect the type of activity a user would typically do in each session type.