#!/usr/bin/perl -w # a script to munge the output of 'svn log' into something approaching the # style of a GNU ChangeLog. # # to use this, just fill in the 'hackers' hash with the usernames and # name/emails of the people who work on your project, go to the top level # of your working copy, and run: # # $ svn log | /path/to/gnuify-changelog.pl > ChangeLog %hackers = ( "jimb" => 'Jim Blandy ', "sussman" => 'Ben Collins-Sussman ', "kfogel" => 'Karl Fogel ', "gstein" => 'Greg Stein ', "brane" => 'Branko Cibej ', "joe" => 'Joe Orton ', "ghudson" => 'Greg Hudson ', "lefty" => 'Lee P. W. Burgess ', "fitz" => 'Brian Fitzpatrick ', "mab" => 'Matthew Braithwaite ', "daniel" => 'Daniel Stenberg ', "mmurphy" => 'Mark Murphy ', "cmpilato" => 'C. Michael Pilato ', "kevin" => 'Kevin Pilch-Bisson ', "philip" => 'Philip Martin ', "jerenkrantz" => 'Justin Erenkrantz ', "rooneg" => 'Garrett Rooney ', "bcollins" => 'Ben Collins ', "blair" => 'Blair Zajac ', "striker" => 'Sander Striker ', "XelaRellum" => 'Alexander Mueller ', "yoshiki" => 'Yoshiki Hayashi ', "david" => 'David Summers ', "rassilon" => 'Bill Tutt ', "kbohling" => 'Kirby C. Bohling ', ); $parse_next_line = 0; while (<>) { # axe windows style line endings, since we should try to be consistent, and # the repos has both styles in it's log entries. $_ =~ s/\r\n$/\n/; if (/^-+$/) { # we're at the start of a log entry, so we need to parse the next line $parse_next_line = 1; } elsif ($parse_next_line) { # transform from svn style to GNU style $parse_next_line = 0; @parts = split (/ /, $_); print "$parts[5] $hackers{$parts[3]}\n"; } else { print "\t$_"; } }