[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] mailer.py: truncate_diff_lines feature

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: 2005-11-03 04:30:30 CET

Branko Čibej wrote:
> Alan Barrett wrote:
>
>> This feature is intended for use in cases where the email is read by
>> people who want to receive a 10-line diff when somebody makes a small
>> change, but don't want to receive a 1000-line mail message when somebody
>> creates a new 1000-line file, or when somebody makes many changes
>> throughout a large file. If you are sending mail to an automated
>> process, or to people who will want to treat the mail as a patch to be
>> applied, then you shouldn't be using this feature.
>
> In that case, I suggest defining some maximum diff size, and if the diff
> exceeds that size to not in include it in the mail at all. Just add a
> note, e.g. "Diff ommitted, because it's longer than N lines.
>
> Truncating the diff at some arbitrary length is totally wrong because
> it's a) lying to the user,

Huh? IIRC, the truncated diff was followed by text saying that it had been
truncated. How is that lying?

> and b) produces a patch that has nothing to
> do with the actual change.

If you are talking about the result of applying it with a "patch" program, then
(a) it is incomplete; it does not have "nothing to do with the actual change",
and (b) steps have been taken to make sure a "patch" program errors on it, so
that's no argument against it.

I have no strong opinion one way or the other. I suggest following whatever
practice we already have in other scripts if any. As a point in favour of
Alan's method, the reader may often find it useful to see just the first few
changes, especially when many similar changes have been made throughout a large
file, or when a new file is added and begins with a description of itself.

- Julian

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Nov 3 04:31:15 2005

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.