☻ 唐鳳 ☺
and 1 contributors

NAME

svnbot

DESCRIPTION

This is a small IRC bot using Net::IRC capable of relaying new commits to a Subversion repository to IRC.

SYNOPSIS

  $ ./svnbot.pl nick host[:port] interval repository show_branch sep_header

where

repository

is the path to the SVN repository (e.g. . or http://svn.perl.org/parrot/,

show_branch

specifies whether branch information should be shown (true|false), and

sep_header

specifies whether a separate header line should be outputted (true|false).

INSTALLATION

There's no separate installation step needed, simply run svnbot.pl and supply appropriate options.

FAQ

"I configured svnbot to check for new commits every n seconds, but the commits usually take much more time to show up. Why is this so?"

If you look at svnbot's source, you'll see that it really tries to check the SVN repository after n seconds elapsed. The problem is, that svnbot doesn't have a chance to check, because Net::IRC is busy reading from the socket to the IRC server. Unfortunately, the call to .readline Net::IRC issues is blocking, meaning that the operating system will suspend svnbot.pl until it receives some data from the IRC server.

In Perl 5, the problem would be easy to remedy, as perl5 allows you to set timeouts. But, as Pugs doesn't have a mechanism to set timeouts yet, there's nothing Net::IRC can do about it.