You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Carlos Peñas <ca...@warp.es> on 2008/10/31 19:50:40 UTC

Problematic post-commit-hook / svnlook diff size

Hello.

I'm running a subversion server with several projects. One of these is 
big enoug to make eternal diffs on merges.

When this occurs, a contributed script called commit-email.pl (I'm using 
debian etch packaged subversion server) tries to send the diff by mail, 
allocating excessive memory and depleting its resources.

We want to keep these mails unless diff size grows  beyond a fixed 
amount of bytes.

¿There is a way to preview the diff size with svnlook or else?

Thanks

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

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

Posted by Carlos Peñas <cp...@warp.es>.
El Lunes, 3 de Noviembre de 2008 21:50, John Niven escribió:
> > -----Original Message-----
> > From: Carlos Peñas [mailto:cpenas@warp.es]
> > Sent: Monday, 3 November 2008 20:44
> > To: users@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@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org


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

Posted by John Niven <jn...@bravurasolutions.com>.
> -----Original Message-----
> From: Carlos Peñas [mailto:cpenas@warp.es]
> Sent: Monday, 3 November 2008 20:44
> To: users@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?

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

Cheers
John

>
> El Viernes, 31 de Octubre de 2008 20:50, Carlos Peñas escribió:
> > Hello.
> >
> > I'm running a subversion server with several projects. One
> of these is
> > big enoug to make eternal diffs on merges.
> >
> > When this occurs, a contributed script called commit-email.pl (I'm
> > using debian etch packaged subversion server) tries to send
> the diff
> > by mail, allocating excessive memory and depleting its resources.
> >
> > We want to keep these mails unless diff size grows  beyond a fixed
> > amount of bytes.
> >
> > ¿There is a way to preview the diff size with svnlook or else?
> >
> > Thanks
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
> > For additional commands, e-mail: users-help@subversion.tigris.org
>
> --
> Carlos Peñas San José
> Warp Networks S.L.  http://www.warp.es
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: users-help@subversion.tigris.org
>
>

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


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

Posted by Carlos Peñas <cp...@warp.es>.
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? 

El Viernes, 31 de Octubre de 2008 20:50, Carlos Peñas escribió:
> Hello.
>
> I'm running a subversion server with several projects. One of these is
> big enoug to make eternal diffs on merges.
>
> When this occurs, a contributed script called commit-email.pl (I'm using
> debian etch packaged subversion server) tries to send the diff by mail,
> allocating excessive memory and depleting its resources.
>
> We want to keep these mails unless diff size grows  beyond a fixed
> amount of bytes.
>
> ¿There is a way to preview the diff size with svnlook or else?
>
> Thanks
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: users-help@subversion.tigris.org

-- 
Carlos Peñas San José
Warp Networks S.L.  http://www.warp.es

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