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

Re: Problematic post-commit-hook / svnlook diff size

From: Carlos Peñas <cpenas_at_warp.es>
Date: Tue, 4 Nov 2008 08:58:11 +0100

El Lunes, 3 de Noviembre de 2008 21:50, John Niven escribió:
> > -----Original Message-----
> > From: Carlos Peñas [mailto:cpenas_at_warp.es]
> > Sent: Monday, 3 November 2008 20:44
> > To: users_at_subversion.tigris.org
> > Subject: Re: Problematic post-commit-hook / svnlook diff size
> >
> > Well not a clever one, but I'm now supressing the email
> > sending if "svnlook diff | wc -c" gives a big count.
> >
> > The shame is that this command took 90 seconds to complete
> > and reclaims about 600 Mb to execute. It is excessive but at
> > least avoids sending 300Mb of diff file by mail, cutting down
> > the time needed to complete a big commit
> >
> > There's better ways to doing this out there?
>
> No more clever, but could you modify commit-email.pl to abort or not send
> the email if the *email* size becomes too large?

Well, with hooks avoiding to send over the wire big diff files my problem is
under control and my mail server is smiles again :)

Modify the commit-email.pl isn't difficult. It builds the body of the message
thru two arrays called @difflines and @svnlines (among other data). It will
be easy prevent email sending on big scalar(@array) values.

But I'm afraid that it will be slow because commit-email takes diff calling to
svnlook diff. Seems like the diff generation can be controlled by parameters

> Incidentally, I seem to recall that commit-email.pl has been deprecated in
> favour of
> http://svn.collab.net/viewvc/svn/trunk/tools/hook-scripts/mailer/mailer.py?
>view=markup; it might be worth taking a look at mailer.py to see if that
> could more easily be adapted (I took a quick look and I couldn't see
> anything that controlled email size).

I'll get a look over these two hooks (the pl and the py, and perhaps another
one made in ruby), to see if there's a way of control email size or if it's
easy to add an optional parameter to doing so.

Thanks!
>
> Cheers
> John
[snip]

-- 
Carlos Peñas San José
Warp Networks S.L.  http://www.warp.es
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-11-04 08:58:46 CET

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.