You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Emil Huseynli <em...@unimark.az> on 2006/11/22 11:43:11 UTC
need for a hook script
Hello.
I need for a hook script that prevents user to import or commit
large files.
I've searched through hook scripts in
http://svn.collab.net/repos/svn/trunk/contrib/hook-scripts/
and
http://svn.collab.net/repos/svn/trunk/contrib/hook-scripts/
but haven't find any appopriate.
Maybe someone have already wrote such script,
maybe you know.. can you give an url to it,
or some advises on how to write script.
Best regards, Emil Huseynli
Unifun Ltd.
Re: need for a hook script
Posted by Ryan Schmidt <su...@ryandesign.com>.
On Nov 22, 2006, at 05:43, Emil Huseynli wrote:
> I need for a hook script that prevents user to import or commit
>
> large files.
>
>
>
> I’ve searched through hook scripts in
>
> http://svn.collab.net/repos/svn/trunk/contrib/hook-scripts/
>
> and
>
> http://svn.collab.net/repos/svn/trunk/contrib/hook-scripts/
>
> but haven’t find any appopriate.
>
>
>
> Maybe someone have already wrote such script,
>
> maybe you know.. can you give an url to it,
>
> or some advises on how to write script.
I don't know of such a script, but your basic strategy would be:
- use 'svnlook changed -t "$TXN" "$REPO"' to get a list of files in
the transaction
- for each file, use 'svnlook cat -t "$TXN" "$REPO" "$FILE" | wc -c'
to get its size in bytes
- if this is too large for you, print an error message to stderr and
exit with a code other than 0
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org