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

Re: [PATCH] size and force text files to be considered binary in mailer.py

From: Michael Brouwer <michael_at_tlaloc.net>
Date: 2005-08-23 17:11:33 CEST

Making mailer.py aware of renames would be cool. Currently if you
rename a file you get the old file with all --- and the new one with +
++. Instead it should diff the file with the new name against the
contents of the file with the old name resulting in only the actual
changes made to the file after the rename (if any).

Michael

On Aug 19, 2005, at 3:00 AM, Jon Bendtsen wrote:

> Hi
>
> Here follows a patch that allows one to specify a max mailsize in
> the mailer.py script.
> Further more the script allows you to specifiy which text files are
> to be considered binary
> and thus no diff included in the mail.
>
> my mailer.py is taken from debian unstable and the head of the
> mailer.py script looks like this.
>
> # $HeadURL: http://svn.collab.net/repos/svn/branches/1.2.x/tools/
> hook-scripts/mailer/mailer.py $
> # $LastChangedDate: 2005-04-21 14:12:41 -0400 (Thu, 21 Apr 2005) $
> # $LastChangedBy: breser $
> # $LastChangedRevision: 14358 $
>
> I think it is version 1.2.0
>
> The mailsize is calculated by having a hardcoded max size limit in
> the mailer.py script.
> For every diff
> for every line
> i take the length of the line and subtract it from the max
> size.
> If the max size reaches 0 or below, one more line is added
> saying that the limit has been reached and no more text is
> included in the email.
>
> Currently the limit is hardcoded to 2MB
>
> Further more the number of diffs are counted and if there is more
> than 128 diffs/files, it aborts
> futher generation as well, but does send the mail that was
> genereated so far.
>
>
> To force files to be considered binary, the name of the file is
> checked against a list of regular
> expressions. The regular expressions is taken from the file
> filediff.conf that usually resides in
> the conf directory right next to the mailer.conf.
> Every line except those beginning with # are used in a regular
> expression match.
> If any match is found we stop checking for other regular
> expressions, and stops generating
> diffs for this file. A message is included that it is forced binary
> because of $patern
>
> I'm looking for input, suggestions, ... and eventually maybe
> someone will include it into the
> mailer.py which exists now.
>
>
>
>
> JonB
>
>
> <patch-120>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: dev-help@subversion.tigris.org

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Tue Aug 23 17:15:20 2005

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

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