Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.2 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Perl Modules

    SVN::Hooks 1.19

    Download button

    No screenshots available
    Downloads: 251  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Gustavo Leite de Mendonca Chaves | More programs
    Perl Artistic License / FREE
    July 6th, 2012, 13:11 GMT
    ROOT / Programming / Perl Modules

     Read user reviews (0)  Refer to a friend  Subscribe

    SVN::Hooks description

    A framework for implementing Subversion hooks

    SVN::Hooks is a Perl framework for implementing Subversion hooks.

    In order to really understand what this is all about you need to understand Subversion and its hooks http://svnbook.red-bean.com/nightly/en/svn.reposadmin.create.html#svn.reposadmin.create.hooks.

    Subversion is a version control system, and as such it is used to keep historical revisions of files and directories. Each revision maintains information about all the changes introduced since the previous one: date, author, log message, files changed, files renamed, etc.

    Subversion uses a client/server model. The server maintains the repository, which is the database containing all the historical information we talked about above. Users use a Subversion client tool to query and change the repository but also to maintain one or more working areas. A working area is a directory in the user machine containing a copy of a particular revision of the repository. The user can use the client tool to make all sorts of changes in his working area and to "commit" them all in an atomic operation that bumps the repository to a new revision.

    A hook is a specifically named program that is called by the Subversion server during the execution of some operations. There are exactly nine hooks which must reside under the hooks directory in the repository. When you create a new repository, you get nine template files in this directory, all of them having the .tmpl suffix and helpful instructions inside explaining how to convert them into working hooks.

    When Subversion is performing a commit operation on behalf of a client, for example, it calls the start-commit hook, then the pre-commit hook, and then the post-commit hook. The first two can gather all sorts of information about the specific commit transaction being performed and decide to reject it in case it doesn't comply to specified policies. The post-commit can be used to log or alert interested parties about the commit just done.

    There are several useful hook scripts available elsewhere http://svn.apache.org/repos/asf/subversion/trunk/contrib/hook-scripts/, mainly for those three associated with the commit operation. However, when you try to combine the functionality of two or more of those scripts in a single hook you normally end up facing two problems.

    SYNOPSIS

    A single script can implement several hooks:

     #!/usr/bin/perl

     use SVN::Hooks;

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

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

     run_hook($0, @ARGV);

    Or you can use already implemented hooks via plugins:

     #!/usr/bin/perl

     use SVN::Hooks;
     use SVN::Hooks::DenyFilenames;
     use SVN::Hooks::DenyChanges;
     use SVN::Hooks::CheckProperty;
     ...

     run_hook($0, @ARGV);



    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    Subversion hooks | Perl module | Perl | Subversion | hooks

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM