The Design of Software (CLOSED)

A public forum for discussing the design of software, from the user interface to the code architecture. Now closed.

The "Design of Software" discussion group has been merged with the main Joel on Software discussion group.

The archives will remain online indefinitely.

Simple Code Diff/Merging Tool

Hi All,

I am looking for a very simple code diffing / merging tool.

There are many around but they seem to either belong to part of a larger SCM system or they only allow it to diff/merge files rather than text that is just pasted into it adhoc.

I want something that I can just *cut and paste* code snippets into separate windows and have it automatically show me the differences and allow me to sync them and then cut and paste the synced code back into my IDE.

At the moment my only option seems to be to copy the two sections of code into notepad and save each as a separate file, go to a diffing tool and then load each text file into the tool.  This is quite a pain.

Ideally I would also like it to have the ability to allow merging of 3 separate pieces of code (e.g. 1 original and two separate changes) rather like Vault's tool shown here:

http://www.ericsink.com/scm/screendumps/scm_diffmerge_2.gif

So to summarize, these are the requirements:
1.  Must be able to *cut and paste* code into the diffing windows
2.  Allow code to be synced within the tool (i.e. not just changes reported)
3.  The synced code can be *cut and pasted* back into my IDE app.
4.  Allow 2 or 3 way diffs / merges

I'm sure something like this must exist!

Thanks in advance for your recommendations.

-Cyrus
CyrusB
Wednesday, December 06, 2006
 
 
EditpadPro has a tabbed interface, and can diff two tabs to a third.  So you can open a couple of tabs then paste and diff.

But if you care about diffs, Araxis Merge is your friend.
HS McGillicudy Send private email
Wednesday, December 06, 2006
 
 
>> Ideally I would also like it to have the ability to allow merging of 3 separate pieces of code <<

Install UnxUtils (http://unxutils.sourceforge.net/) and check out diff3 (esp. -m option).
Samuel Reynolds Send private email
Wednesday, December 06, 2006
 
 
kdiff3 is pretty nice:

http://kdiff3.sourceforge.net/
Herbert Sitz Send private email
Wednesday, December 06, 2006
 
 
I assume the diffing of buffers that aren't saved to files is the thing some diff tools can't do.  I think kdiff3 can get pretty close.  Try opening without using files.  Then put first code snippet in clipboard and paste into window a.  Then put second snippet in clipboard and paste into window b.  Then choose Merge, Merge Current File and go through process of selecting the lines you want in output window.
Herbert Sitz Send private email
Wednesday, December 06, 2006
 
 
WinMerge is okay.  AthlantDiff is free.

And ionForge Evolution is free and therefore so is its Diff/Merge tool.

You can download the starteam client for windows, copy out VisualDiff and VisualMerge, and uninstall it (I heard they suck, though).

- Nate.
Nate Send private email
Wednesday, December 06, 2006
 
 
Thanks for your comments.

I just tried KDiff3 and Araxis Merge.

Both seem to do what I am looking for.

I definitely prefer the Araxis product.  It is much more polished and intuitive.  Then again it costs ~US$269 compared to $0 for KDiff3...

Thanks all for your suggestions!
CyrusB
Wednesday, December 06, 2006
 
 
BeyondCompare is great, but only 2-way rather than 3-way as far as I know.
John Rusk
Wednesday, December 06, 2006
 
 
My Programmers Editor "ED for Windows" should meet your needs. It has a good diff and lets you update each difference in either file to bring that difference into sync. See http://www.getsoft.com
Neville Franks Send private email
Thursday, December 07, 2006
 
 
I've been using WinMerge for about 3 years now.  It does everything I need it to... recursive diffs, merging, different views, ignoring certain files/constructs, etc.
KC Send private email
Thursday, December 07, 2006
 
 
+1 Winmerge.  It works great, and integrates with TortoiseSVN well (a plus for us, as it's better than the builtin Tortoise merge).
Rich Send private email
Thursday, December 07, 2006
 
 
I'll put in my vote for Araxis. It's a great program, and does its thing extremely well. I didn't pay for it personally, however, which does help :-\

The ability to paste code snippets in is vital, in my view. I use this all the time for merging what appear to be duplicate pieces of code. It looks like WinMerge also has this facility, but its display doesn't update in real time (something I've found incredibly useful), and, for my money (see above), it's not quite as clear as Araxis.

By way fo random suggestion, there is a tool called "ExamDiff Pro" which may be worth checking out. I have only used it extremely briefly (garish UI, but it seems to work :) but the coworker from whom I heard about it rates it very highly.
Tom_
Thursday, December 07, 2006
 
 
I use & like ExamDiff Pro myself but AFAIK you can only compare two files/directories, not copy-and-paste buffers.
Ian Johns
Thursday, December 07, 2006
 
 
BeyondCompare is handy. It is primarily a diff tool, but it does a bunch of other things as well. It is not exactly a merge tool, but it does allow merging documents in a primitive way.
outback
Thursday, December 07, 2006
 
 
I can't recommend Beyond Compare from Scootersoftware highly enough. I've been using it for many years.
It's cheap, well designed and very easy to use. On top of that it has an exclusive feature that I didn't find in any other application: it integrates with Explorer and allows you to select the files to compare right clicking on them. Very handly.
Give it a try at http://www.scootersoftware.com/
Andrea N. - Direct Access Send private email
Friday, December 08, 2006
 
 
I'll throw another hat into the ring: Compare and Merge from TGRMN Software, who also make an excellent (and inexpensive!) file replication utility called ViceVersa.

http://www.compareandmerge.com/

Friday, December 08, 2006
 
 
Visual Slickedit comes with an excellent diff tool. I'm not sure it does three way diffs ( I haven't tried the latest version ) but it satisfies all your other requirements.

You can download a free trial:

http://www.slickedit.com
redeye Send private email
Friday, December 08, 2006
 
 
I second the recommendation for Beyond Compare.  Very nice GUI based diff/merge tool.
javier posada
Tuesday, December 19, 2006
 
 
"...integrates with Explorer and allows you to select the files to compare right clicking on them. "

Araxis likewise.  Very handy indeed.
HS McGillicudy Send private email
Thursday, December 28, 2006
 
 

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics
 
Powered by FogBugz