vergessen
vergessen

Reputation: 61

Perl, SVN::Hooks, and SVN::Hooks::Notify

Can anyone tell me offhand if SVN::Hooks::Notify's NOTIFY and NOTIFY_DEFAULTS blocks replace (or rather, stop the evaluation of) the POST_COMMIT block? My PRE_COMMIT block works fine, and my existing NOTIFY/NOTIFY_DEFAULTS blocks process just fine.

However, nothing I have under the POST_COMMIT block fires at all... and yes, hooks/post-commit is linked to the script. The perdocs for svn::hooks::notify state that it runs within POST_COMMIT, but I would prefer to do some extra processing first before kicking off a notification email (eg, inserting pertinent information into a db table for later use).

Upvotes: 1

Views: 40

Answers (1)

ysth
ysth

Reputation: 98398

The NOTIFY block sets a post-commit hook; there is no separate hook for notify.

And as far as I can tell from the SVN::Hook source, you can have set as many of a given hook as you want, and they will run in the order you add them in. So you may need to do e.g.:

use SVN::Hooks;
BEGIN {
    POST_COMMIT { ... }
}
use SVN::Hooks::Notify;

to have your other hook come before the notify hook.

Upvotes: 1

Related Questions