Merging single lines?

Two- and three-way text compare and merge issues.

Merging single lines?

Postby boriente » Tue Mar 10, 2009 10:02 am

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.
boriente
Newbie
 
Posts: 2
Joined: Thu Oct 23, 2008 9:54 am

Re: Merging single lines?

Postby Mofi » Tue Mar 10, 2009 12:07 pm

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.
User avatar
Mofi
Grand Master
Grand Master
 
Posts: 4049
Joined: Thu Jul 29, 2004 11:00 pm
Location: Vienna

Re: Merging single lines?

Postby boriente » Wed Mar 11, 2009 7:59 am

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.
Attachments
UC Merge.png
UC Merge.png (41.4 KiB) Viewed 2479 times
boriente
Newbie
 
Posts: 2
Joined: Thu Oct 23, 2008 9:54 am

Re: Merging single lines?

Postby Mofi » Sat Mar 14, 2009 10:05 am

Okay, you got it. Extra hint: see power tip Block and line mode merge.
User avatar
Mofi
Grand Master
Grand Master
 
Posts: 4049
Joined: Thu Jul 29, 2004 11:00 pm
Location: Vienna

Re: Merging single lines?

Postby bulgrien » Thu Apr 22, 2010 12:22 am

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.
User avatar
bulgrien
Master
Master
 
Posts: 92
Joined: Fri Dec 11, 2009 1:02 am
Location: Pennsylvania, USA


Return to Text Compare and Merge