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