[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: Branko Čibej <brane_at_xbc.nu>
Date: 2005-11-04 01:10:35 CET

Alan Barrett wrote:
> On Thu, 03 Nov 2005, Branko ?ibej wrote:
>
>> 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.
>>
>
> I can add that as another feature, if there is demand for it. The
> behaviour that I have already implemented is the one that's more useful
> to me. Two other people have said that this behaviour is useful to them
> too.
>
> How about something like this (also changing the variable name, because
> it would no longer be just for truncation):
>
> max_diff_lines = 0 # no limit (default)
> max_diff_lines = 100 # diffs longer than 100 lines are omitted
> max_diff_lines = -100 # diffs longer than 100 lines are truncated
>
There's no need to be so terse. This is python, after all, so string
parsing is easy.

    max_diff_lines = # no value, no limit (default)
    max_diff_lines = (\d+)(\s+(truncate|omit))?

So, if you wanted to see at most 100 lines of diff and truncate the
rest, you'd say

    max_diff_lines = 100 truncate

if you wanted to omit diffs longer than 100 lines,

    max_diff_lines = 100 omit

and

    max_diff_lines = 100

would take a suitable default (probably truncate)

-- Brane

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Nov 4 01:09:06 2005

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