How to delete different lines in UltraCompare

This forum is user-to-user based and not regularly monitored by IDM.
Please see the note at the top of this page on how to contact IDM.

How to delete different lines in UltraCompare

Postby Nick » Fri May 14, 2010 10:50 pm

Hi,
My problems is this:

I have two files (text) loaded in pane 1 and pane 2. Now I want to merge differences to second pane all together (a lot of lines - thousands not in blocks but scattered all around) not each block by block or line by line (how to do that?) and after that I need to delete those lines from pane 1. Merging is something like COPY and I need MOVE function.
When I selected all differences in pane 1 (CTRL+A) I can't just press delete to remove them or merge (merge is grayed out) - it would be nice to have something like cut.
As I can see in one previous post for deleting identical lines there must be some way to do that but I can't find it - cutting would be much easier.

Thanks
User avatar
Nick
Newbie
 
Posts: 8
Joined: Wed Jan 17, 2007 12:00 am

Re: How to delete different lines in UltraCompare

Postby bulgrien » Sat May 15, 2010 9:02 pm

What exactly do you mean by "merge differences"? Do you always want to insert lines that are different into the other side? (That is what UltraCompare calls a merge) Do you want to overlay lines that are different on the other side? Are the files sorted? If you are wanting an automated 3-way merge, UltraCompare simply isn't there yet. It is first and foremost a compare tool and has a very poor implementation of text merge functionality.
User avatar
bulgrien
Master
Master
 
Posts: 92
Joined: Fri Dec 11, 2009 1:02 am
Location: Pennsylvania, USA

Re: How to delete different lines in UltraCompare

Postby Mofi » Sun May 16, 2010 6:05 am

Cut the differences from file 1 and paste them on correct positions in file 2 is not possible as you already know. However, there is quite a simple solution to get what you want.

First just create a copy of your second file.

Now compare file 1 with file 2 and merge all from left to right. This command is available, and as you wrote this is a copy and not a move. Save file 2 with the differences from file 1.

Select now for pane 2 the previously made copy of you file 2. Run again the compare you will see the same differences as before. Switch the view to "Just Differences", select in left pane all lines with differences with Ctrl+A and delete them. Save file 1 and exit UltraCompare.
User avatar
Mofi
Grand Master
Grand Master
 
Posts: 3937
Joined: Thu Jul 29, 2004 11:00 pm
Location: Vienna

Re: How to delete different lines in UltraCompare

Postby Nick » Sun May 16, 2010 7:07 pm

Thank You Mofi but...

That is more or less what I was trying to do but when I selected view only differences I can't delete anything in pane 1 nor pane 2. I selected with CTRL+A and everything is selected but delete is impossible (from keyboard and from right click menu). If I selected view all than I can delete whatever I want. Maybe my settings somewhere are wrong - files are not read only.
I tried program Beyond compare and I can do exactly that but not in UltraCompare. Any other idea?

BTW - merging all from left to right is with command Merge - Accept all - or I am wrong?

Thanks
User avatar
Nick
Newbie
 
Posts: 8
Joined: Wed Jan 17, 2007 12:00 am

Re: How to delete different lines in UltraCompare

Postby Mofi » Mon May 17, 2010 12:26 am

Merge - Accept All - Accept from Left Frame is the command you need to copy all different lines from left to right.

And you are right. After selecting all different lines it is not possible to delete or cut the lines in view "Just Differences" although the command Cut is not disabled in the menu Edit. A workaround is to switch to view "Just Matching", select all identical lines in pane 1 with Ctrl+A, copy all identical lines with Ctrl+C, switch back to view "All", select all lines with Ctrl+A, press DEL to delete all (I needed to do these 2 steps twice because first line was not deleted) and finally press Ctrl+V to paste the identical lines back into the file. Very complicated process, additional file modification options like delete/cut all different lines from left would be helpful here.
User avatar
Mofi
Grand Master
Grand Master
 
Posts: 3937
Joined: Thu Jul 29, 2004 11:00 pm
Location: Vienna

Re: How to delete different lines in UltraCompare

Postby Nick » Mon May 17, 2010 5:14 am

Thank You Mofi for solution
User avatar
Nick
Newbie
 
Posts: 8
Joined: Wed Jan 17, 2007 12:00 am


Return to UltraCompare General Discussion