GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
SVN::Hooks::DenyFilenames(3) User Contributed Perl Documentation SVN::Hooks::DenyFilenames(3)

SVN::Hooks::DenyFilenames - Deny some file names.

version 1.34

This SVN::Hooks plugin is used to disallow the addition of some file names.

It's active in the "pre-commit" hook.

It's configured by the following directives.

This directive denies the addition of new files matching the Regexps passed as arguments. If any file or directory added in the commit matches one of the specified Regexps the commit is aborted with an error message telling about every denied file.

The arguments may be compiled Regexps or two-element arrays consisting of a compiled Regexp and a specific error message. If a file matches one of the lone Regexps an error message like this is produced:

        DENY_FILENAMES: filename not allowed: filename

If a file matches a Regexp associated with an error message, the specified error message is substituted for the 'filename not allowed' default.

Note that this directive specifies a default restriction. If there are any DENY_FILENAMES_PER_PATH directives (see below) being used, this one is only used for files that don't match any specific rules there.

Example:

        DENY_FILENAMES(
            qr/\.(doc|xls|ppt)$/i, # ODF only, please
            [qr/\.(exe|zip|jar)/i => 'No binaries, please!'],
        );

This directive is more specific than the DENY_FILENAMES, because it allows one to specify different restrictions in different regions of the repository tree.

Its arguments are a sequence of rules, each one consisting of a pair. The first element of each pair is a regular expression specifying where in the repository this rule applies. It applies if any file being added matches the regexp. The second element specifies the restrictions that should be imposed, just like the arguments to DENY_FILENAMES.

The first rule matching an added file is used to check it. The following rules aren't tried.

Only if no rules match a particular file will the restrictions defined by DENY_FILENAMES be imposed.

Example:

        DENY_FILENAMES_PER_PATH(
            qr:/src/:   => [qr/[^\w.-]/ => 'source files must be strict'],
            qr:/doc/:   => qr/[^\w\s.-]/i, # document files allow spaces too.
            qr:/notes/: => qr/^$/,         # notes directory allows anything.
        );

Gustavo L. de M. Chaves <gnustavo@cpan.org>

This software is copyright (c) 2016 by CPqD <www.cpqd.com.br>.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

2016-11-10 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.