[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: Nico Kadel-Garcia <nkadel_at_gmail.com>
Date: Mon, 3 Feb 2014 07:56:33 -0500

I don't have such a tool. I see some pre-commit scripts in the
subversion source tree that might be a starting place, but nothing
aimed at measuring and restricting file size. If you're restricting
the complete diff size, not just individual files, you're going to
need to have a look that adds up all those diffs. And it's going to
need to be in Perl or Python, not shell, because shell gets a bit
strange when adding numbers larger than 255.

I don't have the time or the need for that tool myself, I'm on a
contract that is keeping me busy. I'd look into the existing python
based pre-commit scripts for some hint on how to accomplish this.

On Mon, Feb 3, 2014 at 7:09 AM, Mehboob Ahmed <m.mehboobahmed_at_gmail.com> wrote:
> hi Nico Kadel-Garcia-2
>
> i want to restrict user to commit any kind of data not individual file a
> complete commit. and i want it because in my office developers commit data
> more than a GB i want them to restrict and commit less than a GB can you
> provide me a complte pre-commit hook.
> so far i have done this, kindly guide me.
> =================================
> @echo off
> :: Stops commits that have size of greated than 1GB.
> @echo off
>
> set Repository=%1
>
> set Revision=%2
>
> set MAX_BYTES= 1073741824
>
>
>
> if "%Revision%" 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
> ==========================
> Waiting for your reply
> Regards Mehboob Ahmed
>
>
>
> --
> View this message in context: http://subversion.1072662.n5.nabble.com/Limit-The-size-of-Commit-in-SVN-tp186696p186865.html
> Sent from the Subversion Users mailing list archive at Nabble.com.
Received on 2014-02-03 13:57:07 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.