From users-return-787-apmail-subversion-users-archive=subversion.apache.org@subversion.apache.org Tue Feb 02 15:49:35 2010 Return-Path: Delivered-To: apmail-subversion-users-archive@minotaur.apache.org Received: (qmail 499 invoked from network); 2 Feb 2010 15:49:35 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 2 Feb 2010 15:49:35 -0000 Received: (qmail 30449 invoked by uid 500); 2 Feb 2010 15:49:34 -0000 Delivered-To: apmail-subversion-users-archive@subversion.apache.org Received: (qmail 30417 invoked by uid 500); 2 Feb 2010 15:49:34 -0000 Mailing-List: contact users-help@subversion.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list users@subversion.apache.org Received: (qmail 30409 invoked by uid 99); 2 Feb 2010 15:49:34 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Feb 2010 15:49:34 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [80.67.18.13] (HELO smtprelay01.ispgateway.de) (80.67.18.13) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Feb 2010 15:49:25 +0000 Received: from [70.253.80.1] (helo=[192.168.7.75]) by smtprelay01.ispgateway.de with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.68) (envelope-from ) id 1NcKzw-0005S5-HE; Tue, 02 Feb 2010 16:49:04 +0100 Subject: Re: howto limit filetypes Mime-Version: 1.0 (Apple Message framework v1077) Content-Type: text/plain; charset=us-ascii From: Ryan Schmidt In-Reply-To: <959e9b23-cd4c-4c94-97c3-185d1c2d9162@r24g2000yqd.googlegroups.com> Date: Tue, 2 Feb 2010 09:49:01 -0600 Cc: users@subversion.apache.org Content-Transfer-Encoding: quoted-printable Message-Id: <07802BA1-A5E7-45A0-91D4-22FDA09F0CAF@ryandesign.com> References: <43fab981-593f-48fe-967f-dd3c7fe58402@r24g2000yqd.googlegroups.com> <201002021624.28484.eckhardt@satorlaser.com> <959e9b23-cd4c-4c94-97c3-185d1c2d9162@r24g2000yqd.googlegroups.com> To: Marco X-Mailer: Apple Mail (2.1077) X-Df-Sender: 368818 X-Virus-Checked: Checked by ClamAV on apache.org On Feb 2, 2010, at 09:42, Marco wrote: > Could you give me an example on how to implement this control so that > users can not commit particular filetypes? In the pre-commit hook, you are given the path to the repository and the = transaction number. You can use these to call "svnlook" to see what's in = the transaction. If you just want to check filenames extensions, then = "svnlook changed" tells you the names of every changed file; if any = listed filename extension matches one of your file extensions that = aren't permitted, exit with a nonzero status code to terminate the = commit. If you want to get more involved and actually check the contents = of files, "svnlook cat" can retrieve the individual files from the = transaction which you can then inspect as needed.