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

Re: need for a hook script

From: Ryan Schmidt <subversion-2006d_at_ryandesign.com>
Date: 2006-11-22 18:10:56 CET

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
Received on Wed Nov 22 18:13:10 2006

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