All Unkept
Posted in: KDE, Linux, Software development  —  27 November 2004

Kompare - a tool of beauty

I have to say that developing under Linux, or using Linux to develop even Windows apps, has some great features sometimes. I've not seen anything that equals the flexibility and beauty of the following under Windows:

I use Subversion for revision control of my private projects, but exactly the same as this could be done if I used CVS, and probably other Unix type tools (and probably very difficult with version control apps designed with the Windows mentality). In my working dir I type "svn diff" to see what I've changed and get the results in diff format, which is nice enough. But type " svn diff | kompare -o - " instead, and I get this:

kompare screenshot

Now that's just beautiful (if you are a developer -- apologies for yet another very geeky blog item). With the Windows version control apps I've used, you're limited to what is built in -- the concept of standard output and standard input (which is used with the pipe '|' operator above) is just misssing, so this is a lot harder to do. Note that Subversion (svn) was never designed to work nicely with Kompare (which is what is visible in the screen shot) -- it's the power of Unix design that allows you to string these commands together in lovely ways like this.

As I've read somewhere, point and click interfaces are never going to be as powerful as command based ones -- the use of words and symbols allows far more to be expressed than simple gestures ever will.

Comments §

§ On 16 March 2005, Skip wrote: 24
Just wondering, I just tried that command with Kompare 2.1 and KDE 3.1.3 and it errors out with option unknown -o. I tried with just "svn diff | kompare -" which at least started kompare, but it borked saying it didn't understand the diff format. Any thoughts or ideas?

§ On 17 March 2005, luke wrote: 25
Hmm, I'm afraid I don't know. It might be a bug that was fixed with later versions. Also you might need to check for Unix/DOS line endings, that is a common culprit in these kind of things

§ On 10 August 2006, Will wrote: 89
Try adding an extra - at the end of the command: "| kompare -o -" This works for me.

§ On 12 October 2008, John Jackson wrote: 363
So how do you get it to save the file after making changes?

§ On 30 January 2009, ikawe wrote: 402
excellent tip! This worked great with mercurial:

"hg diff | kompare -o -"

John Jackson: This tool is for visualizing changes already made. (though you can merge multiple change sets if you're into that...)

Add comment

Format:

  • Javascript has to be on to get past my spam protection, and cookies, and there is a delay, sorry for any inconvenience!
  • I reserve the right to moderate comments.