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

RE: How to block files if the exceed number

From: Ilan Yaniv <Ilan.Yaniv_at_timetoknow.org>
Date: Tue, 28 Jul 2009 09:15:45 +0300

Maybe there is, but the thing is that I didn't want to block all files
since our SVN also stores files like mp3 and swf.
I only wanted to implement this rule for doc, ppt and xls.
Anyway, I found the solution in Perl:
1) I cat the content of the file into scalar variable.
2) Then I run the length function that I was not aware of in Perl and it
did the work for me:
        my $fileSize = length $file

Thanks for all the help
Ilan

-----Original Message-----
From: Andy Levy [mailto:andy.levy_at_gmail.com]
Sent: Monday, July 27, 2009 1:57 PM
To: Ryan Schmidt
Cc: Ilan Yaniv; users_at_subversion.tigris.org
Subject: Re: How to block files if the exceed number

On Sun, Jul 26, 2009 at 08:32, Ryan
Schmidt<subversion-2009b_at_ryandesign.com> wrote:
> On Jul 26, 2009, at 07:21, Ilan Yaniv wrote:
>
>> I have this doc files that I want to block if they exceed the size
>> of X kb.
>>
>
> You would write a pre-commit hook script on the server. In it, you
> would use svnlook to get a copy of each file in the transaction, and
> if it is took big, exit from the hook script with a nonzero status
> code and print an error message.

Isn't it also possible to set a limit on the incoming data size via an
Apache directive? Assuming the OP is serving via Apache, that is.

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2376217

To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-07-28 08:17:29 CEST

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.