2 # Process `cvs log' output to get a resonable changelog
3 # (c) 2003 Martin Mares <mj@ucw.cz>
14 my ($file) = /^Working file: (.*)$/ or die;
18 } while (!/^description:/);
22 if (/^------/) { $_ = <STDIN>; next; }
25 my ($yy,$mm,$dd,$HH,$MM,$SS) = /^date: (....)\/(..)\/(..) (..):(..):(..);/ or die;
26 my $t = POSIX::mktime($SS,$MM,$HH,$dd,$mm-1,$yy-1900) or die;
27 my $T = sprintf("%06d", int(($t + 1800)/3600));
29 while ($_ = <STDIN>) {
30 /^(-----|=====)/ && last;
33 my $id = "$T:" . Digest::MD5::md5_hex($d);
34 if (!defined $msg{$id}) {
35 $date{$id} = "$yy-$mm-$dd $HH:$MM:$SS";
39 $files{$id} .= "\t* $file\n";
44 foreach $id (sort keys %date) {
45 print "### ", $date{$id}, "\n\n";
46 print $files{$id}, "\n";
47 print $msg{$id}, "\n";