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

Re: Commit Size Restriction

From: Johan Corveleyn <jcorvel_at_gmail.com>
Date: Wed, 13 Jul 2016 23:21:46 +0200

On Wed, Jul 13, 2016 at 10:13 PM, Greg Stein <gstein_at_gmail.com> wrote:
>> From: Siva
>> Sent: woensdag 13 juli 2016 16:07
>> To: subversion-users
>> Subject: Commit Size Restriction
>>
>> Hi All,
>>
>> My Subversion Edge is installed in Windows Server.
>>
>> Is it possible to restrict commit size by repository or whole server?
>>
>> Regards,
>> Sivaram
>>
> On Wed, Jul 13, 2016 at 09:18:05PM +0200, bert_at_qqmail.nl wrote:
>> How do you define ‘commit size’?
>> With delta compression, re-use on copies of files and directory trees, etc. it is very hard to define what size a commit would be.
>>
>> And as we have pluggable filesystem backends we don’t know what amount of disk space would be used after a commit.
>>
>>
>> Personally I would just use a simple commit filter if necessary, to avoid users accidentally committing DVD images.
>>
>> Bert
>>
> The simplest mechanism to avoid large (new) files from getting
> committed into your repository is to use the "LimitRequestBody"
> directive in your Apache configuration. This is the mechanism that
> we use on svn.apache.org
>
> Cheers,
> -g
>

There is also 'svnlook filesize' (if your svn server is >= 1.7), which
can be used from inside a pre-commit hook to check the added files in
a transaction. See
http://subversion.apache.org/docs/release-notes/1.7.html#svnlook-filesize.

[[[
C:\Users\Johan>svnlook help filesize
filesize: usage: svnlook filesize REPOS_PATH PATH_IN_REPOS

Print the size (in bytes) of the file located at PATH_IN_REPOS as
it is represented in the repository.

Valid options:
  -r [--revision] ARG : specify revision number ARG
  -t [--transaction] ARG : specify transaction name ARG
]]]

-- 
Johan
Received on 2016-07-13 23:22:12 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.