Good diff tools under Ubuntu GNOME - diff

Could somebody give me some recommendations on diff tools on Ubuntu? Actually what I need is not just file comparison, but also directory comparison.
I think diff tools under Windows is really most convenient, especially WinMerge.
But under Ubuntu, what I can get with high efficiency is only TkDiff, but it only support file comparison?
Hope to get some help from here.

Meld is an actively-developed, open-source GUI-based diff utility targeted at developers.
It is free
It runs on Linux
GNU License
40+ posts tagged as meld on Stack Overflow.
Actively developed through February 2013 (the time of this posting)
Allows two and three way comparison between files and folders
Supports Subversion, Git, and Mercurial

I usually use kdiff3 and happy with it. It can handle directories too.

It's not free software, but Beyond Compare is now available for Linux. I haven't used the Linux version but found BC2 invaluable for merging and comparing files and directories on Windows.

I'm using the Krusader::Synchronize Directories (Ctrl+Y) tool for this task.
It compares directories and selects a newer files to rewrite the older ones automatically, then you can check the list of the differences and compare the files content (kdiff, kompare or xxdiff) while necessary.
Finally you can start the synchronize action (copying files) itself.
It is crucial for this tool to have a file timestamps (modification time) set correctly.

Although not opensource, p4merge is free and available on Linux, Windows and Mac. If you are used to Perforce, it will also feel familiar.
My personal taste is kdiff3 but p4merge worth to be mentioned.

While I find kdiff3 utmostly confusing every time, for simple tasks I like the dirdiff utility (see its manpage). It is a graphical tool, and while not strong in features for merging, it lets you get a quick overview of relevant differences (hide non-relevant by doing "File -> Hide selection").

Related

Is there a free diff tool that allows in-line edits - like Beyond Compare?

I use KDiff3, but miss Beyond Compare's ability to modify text (or undo changes) while looking at the diff output. Is there any free windows tool that allows it?
Meld is easily the best (free) merge tool I've used.
I was quite happy with SourceGear DiffMerge before I switched to BeyondCompare. The main thing BC had that made me switch was the current-line diff at the bottom of the screen (which is great for long lines).
I've had good luck with http://winmerge.org/ but I still thought Beyond Compare was worth the $30. My employer paid for it happily.
There is such a tool at www.scmlite.com. It is free and has good edition capabilities from inside the side by side windows. It lets you compare files or directories, and also synchronize two directories which is very handy to sync your backup. It is windows only at the moment. sqlite based.

Netbeans as Mercurial Merge Tool

the company I work for have started to use Mercurial as our version control software, with NetBeans becoming the editor of choice for most developers.
Up until now we've been using WinMerge and KDiff3as our Mercurial merge tool, but have decided that we don't like it.
Now one of the things we've noticed about NetBeans is that it has a very nice diff tool built into it, so was hoping that there might be some way of using this as the Mercurial merge tool?
Can anyone let me know if this is possible, and if so, how?
(Or, are there any other windows diff/merge tools that are as good as the NetBeans diff tool?)
Cheers
I am not sure about using the NetBeans diff tool but as for other merge tools that will work well with Mercurial, I would recommend Perforce's Merge tool which I have heard is somewhat similar to the Netbeans one.
Another good one is DiffMerge.
As near as I can tell, there is no way to call Netbean's diff/merge tool from the command line, which is necessary to use it from Mercurial.
FWIW: I use Beyond Compare 3 for all of my diff / merge activities, even though I use Netbeans as a primary editor, and it does have Mercurial integration.
Functionally, I find the Beyond Compare interface to be a little easier, and it comes with a number of other features that I didn't think I needed, but have since grown completely dependent on, such as performing text diffs on entire folders, image diffs, and pushing changes between files that are being diffed.

PowerBuilder 11.5 & Version Control

What is the best version control system to implement with PowerBuilder 11.5?
If you have examples of how you have did branching/trunk/tags that would be awesome. We have tried to wrap our heads around it a few times and always run into problems because we use shared libraries such as PFC/PFE in multiple applications.
Right now we are only using PBNative, and it sucks.
The Agent SVN is a MS-SCCI Subversion plug-in works with PowerBuilder.
Here is a link that describes how to setup Agent SVN to work with PowerBuilder and Subversion.
We currently use Perforce and it's P4SCC plugin, which works very well. In fact, I'm sure I read somewhere that the guys at Sybase who write PowerBuilder, actually use Perforce themselves.
So, to be fair, let's start out by saying that while you're asking about version control, PBNative is source control. If you compare something that is intended to have more features than just keep two developers from editing the same piece of source, then yes, PBNative will suck. The Madone SL may be an incredible bicycle, but if you're trying to take a couple of laps around an Indy track, it will suck.
"Best" is a pretty subjective word. There are lots of features available in version control and configuration management tools. You can get tons of features, but you'll pay through the nose. StarTeam has some nice features like being able to trace a client change request or bug report all the way through to the changed code, and being able to link in a customized diff tool (which is particularly useful in PB). Then again, if cost is your key criteria rather than features, there are lots of free options that will get the job done. As long as the tool supports the Microsoft SCC interface, you should be OK.
There is a relatively active NNTP newsgroup that focuses on source control with PowerBuilder, which you can also access via the web. You can probably find some already-posted opinions there.
Many years ago I used Starteam to control PB applications. PowerBuilder needless to say is an outdated bear, and it has to export each and every object from its "libraries" into source control.
Currently our legacy PB apps have its libraries saved whole into Subversion, without any support for diff's etc.
We use Visual SourceSafe. We don't use PFC, but we do have libraries that are shared among several projects. Till now, each project was developed separately from the others, and so the shared libraries were duplicated. To have them synchronized, they were all shared at the VSS level. Lately we've reorganized our sources so all projects are near each other, and there's only one instance of the shared libraries.
VSS is definitively not the best source control system, to say the least, but it integrates into PB without the need of any bridges. PB has an inherent problem working with source control, so it probably won't make a very difference working with one instead of the other (at least from the PB point of view).
Now, on a personal note, I'd like to say PB 11.5 is a piece of sh*t. It constantly crashes, full of unbelievable UI nuisance and just brings productivity to its knees. It's probably the worst IDE ever created. Stay away if possible.
FYI: The new PB12 (PB.NET) will integrate with SCC systems so you can easily choose which source control system that you want to use. Since we basically have dropped PBLs (they are now directories) files can be checked in/out individually - even with a plain vanilla editor since files are now normal (unicode) text files.
StarTeam integrates so beautifully with the PB IDE. I used that combination at my previous company (PB9 and ST5.x) for several years. You should be managing your code at the object level - don't log the entire PBL into ST...
If you're having problems with that setup, hit me up offline. phoran at sybase dot com.
We use Merant Version Manager for older projects and TFS for newer work. The only issue we have is that TFS does not support keyword expansion and changing the 'read the flowerbox comments' attitude people have. Some folks are nervous about losing the inline versioning history.
We use StarTeam and have been very pleased with it. It combines bug tracking with version control. Unfortunately though we don't store our files on the object level. We just store the PBL files directly in source control. Anything that supports the SCC interface theoretically should work correctly in PowerBuilder.
PB9: We used PVCS but had stability problems with pbl corruption and also problems co-existing with later versions of Crystal Reports (dll conflict) so now we use PB9 with Dynamsoft's Source Anywhere Standalone. This system is more primitive; it is missing the more advanced features for promotion levels and for pulling out an older milestone version of all objects to make a patch build.
What we are looking for now is something which will allow more advanced "change management", to support promotion levels at the change level (rather than at the object level). Would it be better to use perforce, starteam, or (harvest change manager + HarPB), or something else? Any advice on these combinations would be greatly appreciated.
You can always use Plastic SCM with PowerBuilder through SCC. Plastic is pretty advanced in terms of graphics, tools, replica and so on, so it's always a good choice to keep in mind.

What's the best three-way merge tool? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
Subversion, Git, Mercurial and others support three-way merges (combining mine, theirs, and the "base" revision) and support graphical tools to resolve conflicts.
What tool do you use? Windows, Mac OS X, Linux, free or commercial, you name it.
Here's a few that I've used or heard of, just to get the conversation started:
KDiff3
DiffMerge
P4Merge
Meld
Beyond Compare Pro.
(I recognize that this is sort of like the Best Diff Tool, but it's different in that I explicitly focus on three-way merge tools; WinMerge is off the list, for example.)
KDiff3
open source, cross platform
Same interface for Linux and Windows, very smart algorithm for solving conflicts, regular expressions for automatically solving conflicts, integrate with ClearCase, SVN, Git, MS Visual Studio, editable merged file, compare directories
Its keyboard-navigation is great: ctrl-arrows to navigate the diffs, ctrl-1, 2, 3 to do the merging.
Also, see https://stackoverflow.com/a/2434482/42473
Just checked out P4merge since I heard about it in another blog article:
Very slick interface, and FREE! I've been a faithful Araxis Merge user, but considering this is free and awesome, I'd encourage you to check it out.
Beyond Compare 3 Pro supports three-way merging, and it is a pretty impressive merge tool. It's commercial (but worth it, IMHO) and is available on Windows, Linux, and Mac OS X.
As pointed out in a comment, it's also inexpensive.
Note: If one does not have a merge set, that is, merge markers resident in the destination file, Beyond Compare does not offer three-way file compare/editing. Beyond Compare says that feature is on their list.
Note: 3-way merge is a feature in the Pro edition of Beyond Compare 3 only
Meld Diff Viewer
I have had only good experiences working with Meld. I use it when I have to do messy code merges between branches. It is simple to use and has a clean interface.
Open Source
Linux, Windows and MacOS Supported
Multiple File Diff
Three-way Compare Support
In Ubuntu, install is as simple as: sudo apt-get install meld
vimdiff. It's great. All you need is a window three feet wide.
Source Gear Diff Merge:
Cross-platform, true three-way merges and it's completely free for commercial or personal usage.
Kdiff3 conflict resolution algorithm is really impressive and it nicely integrates with Git.
I recommend to configure it as Git mergetool or to use a nice Git frontend as GitExtensions.
Even when Git/Subversion indicates a conflict, Kdiff3 solves it automatically. There's versions for Windows and Linux with the same interface. It is possible to integrate it with Tortoise and with your linux shell. Side note: you can also experiment with Git merge strategies
It is in my list of favorite open source software. One of the first tools I install in any machine.
You can configure it as the default diff tool in Subversion, Git, Mercurial, and ClearCase. It also solves almost all the ClearCase conflicts. In Windows, it has a nice integration with windows explorer: select two files and right click to compare them, or right click to 'save to later' a file, and then select another one to compare.
The merged file is editable, so you can fine tune after merge conflicts. Has slick keyboard shortcuts.
You can also use it compare and merge directories. See:
An advanced feature is to use regular expressions for defining automatic merges.
My only annoyance is that it is a little difficult to compile if it isn't present in your favorite distro repository.
Araxis Merge. It is commerical, but it is so worth it... It is available for Windows and the Mac OS X.
I love Ediff. It comes built-in with GNU Emacs.
To do a three-way diff, use ediff-files3 (for selecting three files) or ediff-buffer3 (for selecting three already-open buffers). You'll get a screen looking like this:
Note the word-difference higlighting.
You can hit n or p to go to the next/previous diffs, while ab will copy the region from buffer a (the leftmost one) to buffer b (the middle one), and similarly for other two-letter combinations of a, b, c; rb will restore the region in buffer b. Hit ? for a quick help menu, or read the fine manual on diff3 merging in Emacs.
Ultracompare. It is really good, handles large files (more than 1 GB) well, is available for Windows/Mac/Linux, and it's commercial, but it is worth it.
Diffuse is an easy to use three-way merge tool. It supports all of the platforms and version control systems you mentioned, and it can compare more than three files at the same time.
xxdiff if you're in Linux land.
The summary is that I found ECMerge to be a great, though commercial product. http://www.elliecomputing.com/products/merge_overview.asp
I also agree with MrTelly that Ultracompare is very good. One nice feature is that it will compare RTF and Word docs, which is handy when you end up programming in word with the sales guys and they don't manage their docs correctly.

DVCS Choices - What's good for Windows?

So I want to get a project on a distributed version control system, such as mercurial, git, or bazaar. The catch is that I need the Windows support to be good, i.e. no instructions that start off with "install cygwin...". Now I've heard that git's Windows support is decent these days, but don't have any first hand experience. Also, it sounds like the bazaar team has an explicit goal of making it as multiplatform as possible.
Can I get any recommendations?
I use msys-git on windows every single day. Works fast and flawlessly.
Although the newer build has some problems with git-svn, this build (Git-1.5.5-preview20080413.exe) has a working git-svn.
There's a nice comparison between git, hg and bzr in this InfoQ article. They all have their strengths and weaknesses. You'll have to think about your project and your workflows and choose the best fit. The good news is that they're all fairly good.
At last I checked, the only thing you need for Mercurial is Python and to grab a binary package. If you find yourself with more time and want to fiddle / build it yourself, look here.
The only real drawback with HG is its idea of branching .. but for some people that's a major plus.
I like it because its intuitive, easy to install and works on anything that Python does. I don't think that all of the available plugins will work for you, but most should.
I've had the best luck with Bazaar, followed by Mercurial. Never could get Git to work correctly. A quick search shows that Git still requires clunky emulation layers like Cygwin/MSYS, and I can't find any integration tools like TortoiseBzr for Git.
With Mercurial in Windows, I had several minor issues (insensitive paths, symlinks, ). They were usually fixed eventually, but I felt that the same quality of testing was not applied to running on Windows as for the other platforms. Bazaar also had better documentation for integrating with native applications like Visual C.
EDIT: Perhaps add a "dvcs", "distrubutedversioncontrol", "distrubuted"
I've used Mercurial on Windows with no problems. You can use TortoiseHG or just use the command line. Mercurial does require Python, but that is easy to install in Windows as well.
Mercurial Binary Packages
I agree with basszero. I'm using mercurial under windows and it's as easy and reliable as it can get. My development team is spread over Europe (well Dublin and Vienna :-).
We use VPN to commit or sometime the built in webserver (hgserve). Both work fine with no problems out of the box.
Also diff3 open source tool works perfect with mercurial and TortoiseHG out of the box.
If you are concerned about an easy to use interface:
The bazaar folk now include TortoiseBzr in their windows binary package. That's got to be a pretty strong indicator that they think it is up to snuff. I don't know what the maturity/stability of TortoiseHg is, but there certainly isn't a decent GUI interface for git yet, and the MSYS git build still needs some work IMO.
If your team are comfortable with or prefer the command line, then either bazaar or mercurial would probably work well for you, and are both probably about the same in terms of learning curve. Git's learning curve is much higher. It is like the swiss-army knife that is almost wider than it is long, with all the little gadgets and do-dads in it and hanging off it, with the springs so tight that you occasionally slice a finger open trying to prise a blade out.
In my experience using GIT on windows is a major pain. But I have been using Fossil SCM for some time now, and I think it actually fits your needs exactly.
It also has a built in Ticket system and a Wiki. And the whole program is contained in 1 file and it works right out of the box.
I totally recommend it.
Here is a link to the site http://www.fossil-scm.org/
Remember, this site is self hosting, what that means is you are looking at the web interface to fossil it self, when you look at tickets and the wiki and documentation, you actually are using fossil.
But if your project has millions of lines of code and is a few gigabytes in size, you have to use GIT, there is no way around that problem.
Enjoy.