2 # Process `cvs log' output to get a resonable changelog
3 # (c) 2003--2004 Martin Mares <mj@ucw.cz>
9 'mj' => 'Martin Mares <mj@ucw.cz>',
10 'robert' => 'Robert Spalek <robert@ucw.cz>',
11 'tom' => 'Tomas Valla <tom@ucw.cz>',
12 'valla' => 'Tomas Valla <tom@ucw.cz>',
13 'milan' => 'Milan Vancura <milan@ucw.cz>',
14 'milanek' => 'Milan Vancura <milan@ucw.cz>',
15 'tomhol' => 'Tomas Holusa <tomas.holusa@netcentrum.cz>',
16 'centrum' => 'Tomas Holusa <tomas.holusa@netcentrum.cz>',
17 'root' => 'Tomas Holusa <tomas.holusa@netcentrum.cz>',
18 'pavel' => 'Pavel Machek <pavel@ucw.cz>'
28 my ($file) = /^Working file: (.*)$/ or die;
32 } while (!/^description:/);
36 if (/^------/) { $_ = <STDIN>; next; }
39 my ($author) = /;\s*author:\s*([^;]+)/ or die;
40 my ($yy,$mm,$dd,$HH,$MM,$SS) = /^date: (....)\/(..)\/(..) (..):(..):(..);/ or die;
41 my $t = POSIX::mktime($SS,$MM,$HH,$dd,$mm-1,$yy-1900) or die;
42 my $T = sprintf("%06d", int(($t + 1800)/3600));
44 while ($_ = <STDIN>) {
45 /^(-----|=====)/ && last;
48 my $id = "$T:" . Digest::MD5::md5_hex($d);
49 if (!defined $msg{$id}) {
50 $date{$id} = "$yy-$mm-$dd $HH:$MM:$SS";
53 $author{$id} = $author;
55 $files{$id} .= " * $file\n";
60 foreach $id (sort keys %date) {
61 if (!exists ($names{$author{$id}})) {
62 die "Unknown commiter $author{$id}";
64 print "### ", $date{$id}, " ", $names{$author{$id}}, "\n\n";
65 print $files{$id}, "\n";
66 print $msg{$id}, "\n";