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

Re: How to ignore importing files based on filesize?

From: Ryan Schmidt <subversion-2009a_at_ryandesign.com>
Date: Tue, 10 Feb 2009 22:57:04 -0600

On Feb 10, 2009, at 07:59, Shrinivasan wrote:

>> Easiest would be client-side, writing a wrapper script around the
>> Subversion client to check the sizes before committing.
>
> We have both linux and windows clients.
> so we can do nothing with the clients.
>
>> If you have a large userbase, with no control of what client is used,
>> you have to do it server-side. Do you need to filter on size only, or
>> size & file type?
>
> Yes.
> We need to work around the server.
>
> We need the filter on filetype and filesize, both.

[snip]

> What to do with the server to create the filters?

In the pre-commit hook, run "svnlook cat" on each file in the
transaction and see how big it is. For example, on Linux, you could
pipe the output of "svnlook cat" through "wc -c" to get the number of
bytes. Then reject the commit if the file is too big.

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

To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-02-11 05:58:17 CET

This is an archived mail posted to the Subversion Users mailing list.