You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Bjorn Roche <bj...@xowave.com> on 2007/12/14 18:14:53 UTC

Request to revisit bug 2213

Hey there,

	I work on a few small projects using subversion (which is  
fantastic!). Being able to views diffs in email is extremely useful,  
if not critical. However, every so often, a large, or huge commit is  
done and the email diff fails in a variety of ways: people get > 10  
Meg emails, the OOM destroys various processes on the svn server (no,  
seriously, I've seen it), etc. This situation happens when there is a  
vendor drop of hundreds of thousands of lines of code or, simply  
moving that much code, which svn itself handles gracefully, but the  
email stuff does not. I realize those email scripts are samples, but  
lots of people use 'em right out of the box. Clearly, this is bad.
	This issue has been addressed in the past (for example [1]) and  
there is even a bug report [2], but no solution has been committed.  
The bug report is marked as an "enhancement". In my opinion, it  
should be a "defect" since it can cause crashes, but I understand  
that most people working on projects with frequent large commits just  
turn off diffs and use web diffs or some other feature.
	I tried applying the patch in the bug report, but it is out of date.  
For me, since my knowledge of perl is not so hot, it is more worth my  
time to turn off svn ci emails when making large changes, than to  
make the change myself.

I would like to see:

- A modified commit-email.pl file s.t. it takes an additional  
argument, the maximum number of bytes or kilobytes for the email. If  
the email is larger than that, the email will omit the diff, but it  
will not omit any of the other good stuff like a list of changed files.
- the commit-email.pl script should stop reading diffs once it  
reaches the limit and immediately purge the memory used for the diff  
so as not to invoke the OOM killer or further waste resources (I  
don't think this is mentioned on the bug report, but I think it's  
important. AFAIK, on unix, it is possible for a process using lots of  
ram to cause other processes to die).

	Okay, that's it. I am not looking for support or asking for help. I  
just want you all to know that I love subversion and appreciate your  
hard work and seeing this bug fixed would make me love it even more,  
since it is probably the only complaint I have. Really. It would mean  
a lot. (Although, if I am missing something obvious, please, do  
tell....)

	Also, for anyone else with this issue who might find this email  
through searching, there are at least two other things you can do:

1) use the -diff n flag in your post-commit script, which of course,  
kills all your diffs, and is probably not what you want if you're  
reading this.
2) modify your commmit-email.pl file s.t. diffs are not send when  
files are added or deleted. This might be a sufficient, happy medium.  
Haven't tried it myself, but it's probably what I'll end up doing.  
Seems like it would be easy to make these command line arguments as  
well.

[1] http://subversion.tigris.org/servlets/ReadMsg?list=dev&msgNo=89960
[2] http://subversion.tigris.org/issues/show_bug.cgi?id=2213

Again, many many thanks for subversion! Keep up the great work!!

	bjorn

-----------------------------
Bjorn Roche
XO Wave
Digital Audio Production and Post-Production Software
http://www.xowave.com
http://blog.bjornroche.com
http://myspace.com/xowave

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

Re: Request to revisit bug 2213

Posted by Bjorn Roche <bj...@xowave.com>.
On Dec 14, 2007, at 2:27 PM, Ben Collins-Sussman wrote:

> It's not surprising to me that commit-email.pl is suffering bitrot.
> Almost everyone I know uses mailer.py instead.  Have you tried that?
> It definitely knows how to limit the size of emails.
>

BTW, it looks like the default mailer.py does NOT do this (at least  
in the version I'm looking at), but there is a patch attached to the  
bug report (2213) that does do it. Haven't tried it yet, though I  
might actually prefer mailer.py's ability to turn off copy, add and  
delete diffs. I usually find those distracting anyway. The perl  
script can do that too, but I'm not sure how it handles moving and  
copying, whereas mailer.py is much clearer on the matter.

	bojrn

-----------------------------
Bjorn Roche
XO Wave
Digital Audio Production and Post-Production Software
http://www.xowave.com
http://blog.bjornroche.com
http://myspace.com/xowave


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

Re: Request to revisit bug 2213

Posted by Ben Collins-Sussman <su...@red-bean.com>.
It's not surprising to me that commit-email.pl is suffering bitrot.
Almost everyone I know uses mailer.py instead.  Have you tried that?
It definitely knows how to limit the size of emails.

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

Re: Request to revisit bug 2213

Posted by John Peacock <jo...@havurah-software.org>.
Bjorn Roche wrote:
> - A modified commit-email.pl file s.t. it takes an additional argument, 
> the maximum number of bytes or kilobytes for the email. If the email is 
> larger than that, the email will omit the diff, but it will not omit any 
> of the other good stuff like a list of changed files.

Or you could just install SVN::Notify (and SVN::Notify::Config) and have 
far more control over post-commit messages than the core commit-email.pl 
will ever have:

	http://search.cpan.org/search?query=SVN::Notify

See the 'max_diff_length' option in particular for your needs.

HTH

John

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