On 03.02.2014 13:09, Mehboob Ahmed wrote:
> hi Nico Kadel-Garcia-2
>
> i want to restrict user to commit any kind of data not individual file a
> complete commit. and i want it because in my office developers commit data
> more than a GB i want them to restrict and commit less than a GB can you
> provide me a complte pre-commit hook.
> so far i have done this, kindly guide me.
> =================================
> @echo off
> :: Stops commits that have size of greated than 1GB.
> @echo off
>
> set Repository=%1
>
> set Revision=%2
>
> set MAX_BYTES= 1073741824
>
>
>
> if "%Revision%" GEQ "%MAX_BYTES%" (goto :err) else exit 0
>
> :err
> echo Your commit has been blocked because your commit size is exceed. 1>&2
> echo Kindly Commit less than 1GB. 1>&2
> echo Thanks Regards 1>&2
> exit 1
Heh. Your error message is incorrect; it should say, "Your commit has
been blocked because the committed revision number would be too high."
You just limited the total number of commits that can be made to the
repository. Unfortunately, that is in no way related to the size of
those commits. :)
-- Brane
--
Branko Čibej | Director of Subversion
WANdisco // Non-Stop Data
e. brane_at_wandisco.com
Received on 2014-02-03 14:36:53 CET