git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* git-kompare
@ 2007-08-24  5:40 Jean-Marc Valin
  2007-08-24 17:13 ` git-kompare Andy Parkins
  0 siblings, 1 reply; 5+ messages in thread
From: Jean-Marc Valin @ 2007-08-24  5:40 UTC (permalink / raw)
  To: git

[-- Attachment #1: Type: text/plain, Size: 966 bytes --]

Hi,

I just wrote this tiny git-kompare script that I thought some may be
interested in. It basically does a visual diff using kompare. If it
weren't for bugs in kompare, the script would basically do:

git diff --unified=99999 $* | kompare -

As you can see, I really suck at shell programming, so this isn't
intended for being merged, although probably anyone with a clue about
shell can probably rewrite it in a slightly cleaner way. At the moment,
the only case it doesn't handle is when a file gets added and the
initial source is /dev/null.

Bugs it works around are:
- Unrecognised git syntax
(http://mail.kde.org/pipermail/kompare-devel/2006-August/000141.html
which is fixed in some later version of kompare I think)
- Kompare doesn't know about /dev/null as a file (fixed only for removal)
- Kompare doesn't like it when the first file in the diff isn't in the
root of the repository.

Hope it's useful for someone (I really like it).

Cheers,

	Jean-Marc

[-- Attachment #2: git-kompare --]
[-- Type: text/plain, Size: 263 bytes --]

#!/bin/sh
(echo "Index: a\n--- a\n+++ a\n@@ -1,1 +1,1 @@\n-\n+\n"; git diff --unified=99999 $* | perl -ne 's/\/dev\/null/toto/; if (/^\+\+\+/) {s/^\+\+\+ b\/(.*)$/+++ $1\t(old version)/;} if (/^---/) {s/^--- a\/(.*)$/--- $1\t(new version)/;} print;') | kompare -

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: git-kompare
  2007-08-24  5:40 git-kompare Jean-Marc Valin
@ 2007-08-24 17:13 ` Andy Parkins
  2007-08-24 19:52   ` git-kompare Robin Rosenberg
  0 siblings, 1 reply; 5+ messages in thread
From: Andy Parkins @ 2007-08-24 17:13 UTC (permalink / raw)
  To: git; +Cc: Jean-Marc Valin

On Friday 2007, August 24, Jean-Marc Valin wrote:

> (http://mail.kde.org/pipermail/kompare-devel/2006-August/000141.html
> which is fixed in some later version of kompare I think)

I was the original reporter of that bug; I have to say the kompare 
developers were fairly quick on the uptake and fixed that problem with the 
next realease of kompare - which came very soon after the report.  I just 
waited for it to arrive in debian unstable, which also happened fairly 
quickly.  If you are seriously that far behind in your kompare version I 
strongly suggest upgrading, I mean, if it's in debian then it's in 
everything else :-)

I found it quite nostalgic seeing that report, as I made the report a few 
days after my first use of git, which means I've just had my git 
anniversary.  How quickly time flys - I can hardly believe I ever managed 
without it now.



Andy
-- 
Dr Andy Parkins, M Eng (hons), MIET
andyparkins@gmail.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: git-kompare
  2007-08-24 17:13 ` git-kompare Andy Parkins
@ 2007-08-24 19:52   ` Robin Rosenberg
  2007-08-25  0:17     ` git-kompare Jean-Marc Valin
  0 siblings, 1 reply; 5+ messages in thread
From: Robin Rosenberg @ 2007-08-24 19:52 UTC (permalink / raw)
  To: Andy Parkins; +Cc: git, Jean-Marc Valin

fredag 24 augusti 2007 skrev Andy Parkins:
> On Friday 2007, August 24, Jean-Marc Valin wrote:
> 
> > (http://mail.kde.org/pipermail/kompare-devel/2006-August/000141.html
> > which is fixed in some later version of kompare I think)
> 
> I was the original reporter of that bug; I have to say the kompare 
> developers were fairly quick on the uptake and fixed that problem with the 
> next realease of kompare - which came very soon after the report.  I just 
I am more of a GIT developer than a KDE developer.

> waited for it to arrive in debian unstable, which also happened fairly 
> quickly.  If you are seriously that far behind in your kompare version I 
> strongly suggest upgrading, I mean, if it's in debian then it's in 
> everything else :-)

Adding the patch to your version isn't hard. Just download the source package
and add the patch in the patches section and rebuild. That's how I lived with
the fix until Mandriva delivered a newer KDE version. Thanks to the kdesdk src
rpm I could rebuild the package fairly easily without dowloading, configuring
and builing most of KDE. The src rpm declare the dependencies I need. My 
guess is that is about as easy with dpkg, ebuilds or ports.

> I found it quite nostalgic seeing that report, as I made the report a few 
> days after my first use of git, which means I've just had my git 
> anniversary.  How quickly time flys - I can hardly believe I ever managed 
> without it now.

This was about two months after starting to use git in my case. My first git bug was
encountered abour ten minutes after trying git. (Linus fixed the bug the day after).

-- robin

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: git-kompare
  2007-08-24 19:52   ` git-kompare Robin Rosenberg
@ 2007-08-25  0:17     ` Jean-Marc Valin
  2007-08-25 10:25       ` git-kompare Robin Rosenberg
  0 siblings, 1 reply; 5+ messages in thread
From: Jean-Marc Valin @ 2007-08-25  0:17 UTC (permalink / raw)
  To: Robin Rosenberg; +Cc: Andy Parkins, git

> Adding the patch to your version isn't hard. Just download the source package
> and add the patch in the patches section and rebuild. That's how I lived with
> the fix until Mandriva delivered a newer KDE version. Thanks to the kdesdk src
> rpm I could rebuild the package fairly easily without dowloading, configuring
> and builing most of KDE. The src rpm declare the dependencies I need. My 
> guess is that is about as easy with dpkg, ebuilds or ports.

Unless I missed something, there are more things to work around than the
one that was fixed in your patch, no? For example, the fact that kompare
doesn't understand when the filename is /dev/null. As for upgrading
kompare, I'm all for the idea, but the KDE folks aren't making that
easy. The only link in the Kompare download section is for www.kde.org,
which isn't making the source code any easier to find (including a 404
link for "Source code" on the front page!). Any direct link?

BTW, I'm running the latest Ubuntu (Feisty) that ships with kompare 3.4.

	Jean-Marc

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: git-kompare
  2007-08-25  0:17     ` git-kompare Jean-Marc Valin
@ 2007-08-25 10:25       ` Robin Rosenberg
  0 siblings, 0 replies; 5+ messages in thread
From: Robin Rosenberg @ 2007-08-25 10:25 UTC (permalink / raw)
  To: Jean-Marc Valin; +Cc: Andy Parkins, git

lördag 25 augusti 2007 skrev Jean-Marc Valin:
> > Adding the patch to your version isn't hard. Just download the source package
> > and add the patch in the patches section and rebuild. That's how I lived with
> > the fix until Mandriva delivered a newer KDE version. Thanks to the kdesdk src
> > rpm I could rebuild the package fairly easily without dowloading, configuring
> > and builing most of KDE. The src rpm declare the dependencies I need. My 
> > guess is that is about as easy with dpkg, ebuilds or ports.
> 
> Unless I missed something, there are more things to work around than the
> one that was fixed in your patch, no? For example, the fact that kompare
> doesn't understand when the filename is /dev/null. As for upgrading

I'm on 3.5.7 now so I cannot easily test 3.5.6 with the patch anymore, but
on *my machine* diffs (including git diffs) with /dev/null work just fine.

-- robin

> kompare, I'm all for the idea, but the KDE folks aren't making that
> easy. The only link in the Kompare download section is for www.kde.org,
> which isn't making the source code any easier to find (including a 404
> link for "Source code" on the front page!). Any direct link?

I suggested *not* to upgrade completely. Go to ubunu's home page
and look for package sources and how to modify them. Ubuntu uses
the same package format as Debian so instructions for Debian will
most likely apply for Ubuntu.

- robin

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2007-08-25 21:26 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-24  5:40 git-kompare Jean-Marc Valin
2007-08-24 17:13 ` git-kompare Andy Parkins
2007-08-24 19:52   ` git-kompare Robin Rosenberg
2007-08-25  0:17     ` git-kompare Jean-Marc Valin
2007-08-25 10:25       ` git-kompare Robin Rosenberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).