Re: howto limit filetypes
From: Ryan Schmidt <subversion-2010a_at_ryandesign.com>
Date: Tue, 2 Feb 2010 09:49:01 -0600
On Feb 2, 2010, at 09:42, Marco wrote:
> Could you give me an example on how to implement this control so that
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.
|
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.