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

Re: Limiting the commit size

From: Vladimir Prus <ghost_at_cs.msu.su>
Date: 2005-11-01 13:59:15 CET

On Tuesday 01 November 2005 07:48, jarrod roberson wrote:
> On 10/31/05, Vladimir Prus <ghost@cs.msu.su> wrote:
> > Hello,
> > is it possible, in a pre-commit hook, to limit the size in bytes of newly
> > added files? I've looked at all the "svnlook" commands, and none provides
> > this information directly.
> >
> > The reason I'm asking is that one person just mistakenly committed 600M
> > of binary files to our repository, and I'd like to prevent such accidents
> > in future.
> >
> > Thanks in advance,
> > Volodya
> don't let that person have commit priviledges anymore :-)
> but seriously, I think trying to limit screwups like that is a waste of
> effort.
> just like trying to enforce commit comments, you can force them to be not
> null, but you can't
> force people to put USEFUL comments, at least not programmatically.

While I can't programmatically prevent all possible misuse, I think limiting
commit size is still reasonable. Say, if somebody mistakenly commits 2M
binary, it's no biggie, I can "svn rm" it. If somebody mistakenly commits
600M its big addition to repository size, and to backup size, and so such
commit must be reverted completely, say via "svnadmin dump/load". Command
like "svn obliterate" will be handy here, but it does not exists, so
pre-commit hook is desirable.

I've managed to do such check with "svnlook cat .... | wc -c", but a standard
solution would be better.

- Volodya

To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Tue Nov 1 14:21:54 2005

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.