You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Michael W Thelen <mi...@pietdepsi.com> on 2005/09/26 19:33:27 UTC

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

Jon Bendtsen wrote:
> 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.

Thanks for the patch, and I'm sorry it's been so long without a reply.

> 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.

I don't know Python, so I can't comment much on the patch itself, but it
does seem like the max mail size and max diffs could be specified as
parameters instead of hard-coded.

Is anyone else able to comment?  Is this a feature we'd like mailer.py
to have?  I can file a patch issue if no one responds within a few days.

-- 
Michael W Thelen
It is a mistake to think you can solve any major problems just with
potatoes.       -- Douglas Adams

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

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

Posted by Jon Bendtsen <jo...@laerdal.dk>.
Den 26. sep 2005 kl. 21:33 skrev Michael W Thelen:

> Jon Bendtsen wrote:
>
>> 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.
>>
>
> Thanks for the patch, and I'm sorry it's been so long without a reply.
>
>
>> 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.
>>
>
> I don't know Python, so I can't comment much on the patch itself,  
> but it
> does seem like the max mail size and max diffs could be specified as
> parameters instead of hard-coded.

i might do those at some point in the future.


> Is anyone else able to comment?  Is this a feature we'd like mailer.py
> to have?  I can file a patch issue if no one responds within a few  
> days.

There was a few that replied, but C. Michael Pilato seemed the most
interesting as he? gives technical feedback. He mailed the users list
though.
     http://subversion.tigris.org/servlets/ReadMsg? 
listName=users&msgNo=37271

As for using the svn:mime-type i dont think that is the right idea,  
because
other applications, like viewcvs, websvn, ..., might use the svn:mime- 
type
field.
Else i do believe that Mr. Pilato has his? points, my code script code
quality is not that impressive, it could be better, but hey, it works  
for my
client, and they dont want to put more time/money into this matter.



JonB

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

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

Posted by Branko Čibej <br...@xbc.nu>.
Michael W Thelen wrote:

>Jon Bendtsen wrote:
>  
>
>>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.
>>    
>>
>
>I don't know Python, so I can't comment much on the patch itself, but it
>does seem like the max mail size and max diffs could be specified as
>parameters instead of hard-coded.
>  
>
Yes, mailer.py already has a config file, so adding those parameters 
seems logical.

-- Brane


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org