From: "Michał Górny" <gentoo@mgorny.alt.pl>
To: gentoo-dev@lists.gentoo.org
Subject: Re: [gentoo-dev] showing file diffs as root
Date: Sun, 30 May 2010 18:08:09 +0200 [thread overview]
Message-ID: <20100530180809.053f23b4@pomiocik.lan> (raw)
In-Reply-To: <4C0283ED.8080702@basementcode.com>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Sun, 30 May 2010 11:27:41 -0400
Christopher Harvey <chris@basementcode.com> wrote:
> As for generating the diff is it ok to use difflib to generate the
> diff text? I hear there is a diff environment variable..(but I can't
> seem to find it now) should I use that instead?
If I correctly understand what you're referring to, that variable is
useful if you just need to present the diff to the user in the format
preferred by him -- he could then choose an alternate diffing program,
offering another output format.
If you need to parse the differences, that's not an option for you as
the diffing program chosen by user might use any freeform output
format, making it unparseable. Thus, in that case difflib is the solu-
tion you're looking for -- it is prepared to provide the differences
in a way suitable for program use.
- --
Best regards,
Michał Górny
<http://mgorny.alt.pl>
<xmpp:mgorny@jabber.ru>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.15 (GNU/Linux)
iEYEARECAAYFAkwCjW0ACgkQnGSe5QXeB7uojwCg5bXcUVGR487tyuU+wnNDG5fA
JMkAoKiqCHJXsmQz7aYGU+J+BzTPwQsn
=lRtw
-----END PGP SIGNATURE-----
next prev parent reply other threads:[~2010-05-30 16:09 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-30 14:59 [gentoo-dev] showing file diffs as root Christopher Harvey
2010-05-30 15:21 ` Domen Kožar
2010-05-30 15:27 ` Christopher Harvey
2010-05-30 15:34 ` Domen Kožar
2010-05-30 16:08 ` Michał Górny [this message]
2010-05-30 20:34 ` Sebastian Pipping
2010-05-31 12:21 ` Francesco R
2010-05-31 12:57 ` Gilles Dartiguelongue
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100530180809.053f23b4@pomiocik.lan \
--to=gentoo@mgorny.alt.pl \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox