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

Re: Limit The size of Commit in SVN

From: Stephen Connolly <stephen.alan.connolly_at_gmail.com>
Date: Tue, 4 Feb 2014 11:51:16 +0000

On 4 February 2014 10:45, Mehboob Ahmed <m.mehboobahmed_at_gmail.com> wrote:

> hey Johan,
>
> all i want is when my developer hit the commit button my script trigger the
> error if the commit size only commit size no repository size only that
> perticular commit size is greater than a GB.
>
> @echo off
> :: Stops commits that have size of greated than 1GB.
> @echo off
>
>
>
>
> set REPOS=%1
>
> set TXN=%2
>
> set MAX_BYTES= 1073741824
>
> svnlook changed -t %TXN% %REPOS%
>
> svnlook filesize -t %TXN% %REPOS% %changed%
>
> for /D /r %%G IN (%TXN%) DO (
>
> if "%G%" GEQ "%MAX_BYTES%" (goto :err) else exit 0 )
>
> :err
> echo Your commit has been blocked because your commit size is exceed. 1>&2
> echo Kindly Commit less than 1GB. 1>&2
> echo Thanks Regards 1>&2
> exit 1
>
>
You're still going to have the 1GB transferred to the server before the
script runs... unless I misunderstand... so what is the utility in such a
restriction? You won't be saving the server load or the client commit
time... the only thing you may catch is somebody committing very large
binary files to SVN... which probably suggests a different check anyway

> Please Guide will be very great full to you.
> Regards
> Mehboob Ahmed
>
>
>
> --
> View this message in context:
> http://subversion.1072662.n5.nabble.com/Limit-The-size-of-Commit-in-SVN-tp186696p186895.html
> Sent from the Subversion Users mailing list archive at Nabble.com.
>
Received on 2014-02-04 12:52:00 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.