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

RE: How to block files if the exceed number

From: Ilan Yaniv <Ilan.Yaniv_at_timetoknow.org>
Date: Sun, 26 Jul 2009 15:37:31 +0300

Ryan,

The thing is that I have the files in the list using the SVNLOOK
command.
Then I run perl command: $filesize = -s $file
Where $file is the file from the list. But here is the catch... It is
just the file name and not the actual file, so I can't get the filesize
using the command.

Any ideas?

Ilan

-----Original Message-----
From: Ryan Schmidt [mailto:subversion-2009b_at_ryandesign.com]
Sent: Sunday, July 26, 2009 3:32 PM
To: Ilan Yaniv
Cc: users_at_subversion.tigris.org
Subject: Re: How to block files if the exceed number

On Jul 26, 2009, at 07:21, Ilan Yaniv wrote:

> I have this doc files that I want to block if they exceed the size of
> X kb.
>

You would write a pre-commit hook script on the server. In it, you
would use svnlook to get a copy of each file in the transaction, and
if it is took big, exit from the hook script with a nonzero status
code and print an error message.

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2375648

To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-07-26 14:38:28 CEST

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.