#!/usr/bin/perl # Copyright (C) 2007 Eric L. Wilhelm use warnings; use strict; =head1 NAME svn_log_by_author - filter an svn log stream by author name =cut package bin::svn_log_by_author; sub main { my (@args) = @_; my $author = shift(@args); my $handle = \*STDIN; my $active = 0; while(my $line = <$handle>) { if($line =~ m/^r\d+ \| ([^ ]+) \|/) { my $committer = $1; $active = ($committer eq $author); } $active and print $line; } } package main; if($0 eq __FILE__) { bin::svn_log_by_author::main(@ARGV); } # vi:ts=2:sw=2:et:sta my $package = 'bin::svn_log_by_author';