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

Trimming mailer.py messages (issue 2213)

From: Florian Weimer <fweimer_at_bfk.de>
Date: Mon, 22 Jun 2009 09:53:34 +0200

Why haven't those patches been applied yet? I think I can guess the
reason: To me, it's still unclear what type of limit is best. A
per-diff limit doesn't actually bound the message size, so it's
problematic. If set too low, it also affects single-file changes, and
if set too high, it doesn't bring down the size of large merges.
Truncating the whole message instead is somewhat rude, and makes sense
only as a safety net to protect your mail infrastructure.

What about keeping track of the line count so far, and after a limit
is exceeded, replace the diffs (and only the diffs) with a line like
this one:

[21 added lines, 18 deleted lines in 3 hunks omitted]

As a result, you get 5 lines and about 350 bytes per changed file.
It's technically still unbounded, but even for fairly large merges (or
loads), the total message size will remain somewhat manageable.

I think this might be a good compromise among the trimming options.
Thoughts?

-- 
Florian Weimer                <fweimer_at_bfk.de>
BFK edv-consulting GmbH       http://www.bfk.de/
Kriegsstra├če 100              tel: +49-721-96201-1
D-76133 Karlsruhe             fax: +49-721-96201-99
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2364095
Received on 2009-06-22 10:01:29 CEST

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.