[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: STDOUT and Hook Scripts

From: Les Mikesell <lesmikesell_at_gmail.com>
Date: Thu, 11 Mar 2010 13:42:20 -0600

On 3/11/2010 12:56 PM, Stein Somers wrote:
> The post-commit hook starts a single process, and eats its STDOUT.
>
> But you can make that single process into whatever you want. If you hook
> script is for instance:
>
> #!/bin/sh
> perl watch-file.pl | perl notify.pl
>
> then your hook consists of a shell process and two perl processors
> working together. SVN doesn't know anything about the STDOUT produced by
> watch-file.pl. It still eats the STDOUT that notify.pl produces -
> someone has to. The commit is finished when notify.pl is done (more or
> less).

Likewise, perl is just as good as the shell at starting programs on
pipes and manipulating file descriptors. One program could read from or
write to a pipe within your perl code.

-- 
   Les Mikesell
    lesmikesell_at_gmail.com
Received on 2010-03-11 20:43:56 CET

This is an archived mail posted to the Subversion Users mailing list.