Hello,

> is there any hook script for window who restrict user to commit more than
> 1gb size of data.

* You can use "LimitRequestBody" directive to control maximum allowed
commit size. Add the following directive to
%VISUALSVN_SERVER%conf\httpd-custom.conf file and restart VisualSVN
Server:

[[
LimitRequestBody 1024000000
]]

All commits larger than ~1gb will be denied after you apply this
change. The change affects all repositories hosted on this VisualSVN
Server instance.

* The other, more complicated way to control commit size limits is to
write a pre-commit hook script to analyze the incoming transaction/
You can write a pre-commit hook script that rejects commits based on
size of the *added* files. You can use the command `svnlook filesize`
in the hook script to output the size of added file. For example, your
pre-commit hook script should do the following:

1. Run `svnlook changed -t %2 %1` to get the list of changes in
incoming transaction,
`svnlook changed` reference:
http://www.visualsvn.com/support/svnbook/ref/svnlook/c/changed/

2. Run `svnlook filesize -t %2 %1` against every added file, `svnlook
filesize` reference:
http://www.visualsvn.com/support/svnbook/ref/svnlook/c/filesize/

3. If the incoming transaction does not contain any files larger than
the limit you set -- accept the transaction and proceed with the
commit (exit 0),

4. If the incoming transaction contains files that are larger than the
limit -- reject the transaction (exit 1).

You may want to check SVNBook chapter that covers SVN repository
hooks: "Implementing Repository Hooks"
http://www.visualsvn.com/support/svnbook/reposadmin/create/#svn.reposadmin.create.hooks

Thank you.

--
With best regards,
Pavel Lyalyakin
VisualSVN Team

-- 
You received this message because you are subscribed to the Google Groups 
"VisualSVN" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to visualsvn+unsubscr...@googlegroups.com.
To post to this group, send email to visualsvn@googlegroups.com.
Visit this group at http://groups.google.com/group/visualsvn.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to