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

pre-commit script to limit file size

From: Dan Bikel <dbikel_at_cis.upenn.edu>
Date: 2005-01-06 17:21:06 CET

Hi. I am trying to write a pre-commit script that exits with a value of
1 if any of the changed files is a new (added) file that is over a
certain (large) size. This is to help prevent the accidental committing
of large, binary files that shouldn't be in a particular repository I'm
setting up for source code only.

Is there any way to do this without having to use
        svnloook -t $TXN cat $REPOS $filepath
?

It seems silly to have to cat the entire file to be added simply to
compute its size. The output of the 'svn list' command does the right
thing (lists file size in bytes), but that seems to be available only
for committed revisions, not transactions that have yet to be committed.

TIA,
Dan.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Jan 6 17:25:12 2005

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