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


Manual Reference Pages  -  SVN::HOOKS::GENERIC (3)

.ds Aq ’

NAME

SVN::Hooks::Generic - Implement generic checks for all Subversion hooks.

CONTENTS

VERSION

version 1.30

SYNOPSIS

This SVN::Hooks plugin allows you to easily write generic checks for all Subversion standard hooks. It’s deprecated. You should use the SVN::Hooks hook defining exported directives instead.

This module is configured by the following directive.

    GENERIC(HOOK => FUNCTION, HOOK => [FUNCTIONS], ...)

This directive associates FUNCTION with a specific HOOK. You can make more than one association with a single directive call, or you can use multiple calls to make multiple associations. Moreover, you can associate a hook with a single function or with a list of functions (passing them as elements of an array). All functions associated with a hook will be called in an unspecified order with the same arguments.

Each hook must be associated with functions with a specific signature, i.e., the arguments that are passed to the function depends on the hook to which it is associated.

The hooks are specified by their standard names.

The function signatures are the following:
post-commit(SVN::Look)
post-lock(repos-path, username)
post-revprop-change(SVN::Look, username, property-name, action)
post-unlock(repos-path, username)
pre-commit(SVN::Look)
pre-lock(repos-path, path, username, comment, steal-lock-flag)
pre-revprop-change(SVN::Look, username, property-name, action)
pre-unlock(repos-path, path, username, lock-token, break-unlock-flag)
start-commit(repos-path, username, capabilities, txt-name)
The functions may perform whatever checks they want. If the checks succeed the function must simply return. Otherwise, they must die with a suitable error message, which will be sent back to the user performing the Subversion action which triggered the hook.

The sketch below shows how this directive could be used.



        sub my_start_commit {
            my ($repo_path, $username, $capabilities, $txt_name) = @_;
            # ...
        }

        sub my_pre_commit {
            my ($svnlook) = @_;
            # ...
        }

        GENERIC(
            start-commit => \&my_start_commit,
            pre-commit   => \&my_pre_commit,
        );



AUTHOR

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

COPYRIGHT AND LICENSE

This software is copyright (c) 2015 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.

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


perl v5.20.3 SVN::HOOKS::GENERIC (3) 2015-08-29

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