tags:

views:

591

answers:

6

I'm looking for a side-by-side diff program a la xxdiff or DiffMerge that, instead of diffing files, allows blocks of text to be dragged into either the left side or right side window.

I'm refactoring some SQL embedded in source files, and it would be nice to drag the sql statements from each source file into the diff program instead of having to cut and paste to files and then diff the files.

Any clues appreciated, bonus for mac and linux compatibility... Thanks!

update: both winmerge and beyond do this perfectly... thanks again guys!

+4  A: 

If you use beyond compare and start a new text compare you can just paste into the windows and it will diff what you've pasted. Not quite drag and drop, but the same really.

No need to have the contents you want to diff in a file. I'd really recommend beyond compare, it's a great tool. You can get a trial version at:

http://www.scootersoftware.com/

Just to mention, it is linux compatible, but I've only ever used it on windows.

Andrew Barrett
+7  A: 

Winmerge allows you to use Alt + Left and Alt + Right to move different text blocks to left and right.

It's free / open source and overall great tool as well.

dr. evil
+1  A: 

Just start a new file comparison with Diffuse and paste the text into the comparison panes (click the realign button if the text is multiple lines long). Diffuse is free and works on Linux, Mac, and Windows. It also has syntax highlighting for SQL.

+2  A: 

gVim (gvimdiff, vimdiff) can do it, although without dragging, but with keyboard shortcuts.

It has great documentation: http://www.vim.org/htmldoc/diff.html

And works on Windows too.

Zsolt Botykai
A: 

I'm using meld http://meld.sourceforge.net/ and tktiff http://tkdiff.sourceforge.net/ on Unix, Linux and the like.

robert.berger
A: 

Devart's dbForge Schema Compare for SQL Server is a quick schema comparison and synchronization tool that has such functionality.

Devart