5 %Authors = (roessler => 'Thomas Roessler <roessler@does-not-exist.org>',
6 me => 'Michael Elkins <me@mutt.org>');
13 if ($_ =~ /^Working file: (.*)$/) {
15 $change->{workfile} = $workfile;
16 $change->{logmsg} = '';
17 $change->{author} = '';
18 $change->{revision} = '';
20 # print STDERR "workfile: ", $workfile, "\n";
23 elsif ($_ =~ /^(=======|------)/) {
24 if ($change->{revision}) {
26 # Some beautifications: Date, author.
27 if ($change->{author} =~ /^(.*?)\s?\<(.*)\>/) {
28 $change->{author} = "$1 <$2>";
30 $change->{date} =~ s!/!-!g;
33 push @Changes, $change unless $change->{logmsg} =~ /^#/;
35 $change->{workfile} = $workfile;
36 $change->{logmsg} = '';
37 $change->{author} = '';
39 } elsif ($_ =~ /^revision ([0-9.]*)/) {
40 $change->{revision} = $1;
41 } elsif ($_ =~ /^date: ([^; ]*) ([^; ]*); author: ([^;]*);/) {
44 $change->{author} = $Authors{$3} ? $Authors{$3} : $3;
45 $change->{committed} = $3;
46 } elsif ($_ =~ /^From: (.*)$/) {
47 $change->{author} = $1;
48 } elsif ($change->{revision}) {
49 if ($change->{logmsg} || $_) {
50 $change->{logmsg} .= $_ . "\n";
55 # print Dumper @Changes;
57 undef $last_logmsg; undef $last_author; undef $last_date; undef $last_hour; undef $last_comm;
60 for my $k (sort {($b->{date} cmp $a->{date}) || ($b->{hour} cmp $a->{hour}) || ($a->{author} cmp $b->{author}) || ($a->{workfile} cmp $b->{workfile})} @Changes) {
62 if (!($last_date eq $k->{date}) || !($last_author eq $k->{author}) ||
63 !($last_comm eq $k->{committed})) {
65 &print_entry ($files, $last_logmsg);
68 &print_header ($k->{author}, $k->{committed}, $k->{date}, $k->{hour});
71 if (@$files && !($last_logmsg eq $k->{logmsg})) {
72 &print_entry ($files, $last_logmsg);
77 $last_comm = $k->{committed};
78 $last_logmsg = $k->{logmsg};
79 $last_author = $k->{author};
80 $last_date = $k->{date};
81 $last_hour = $k->{hour};
83 push @$files, $k->{workfile};
87 &print_entry ($files, $last_logmsg);
92 my $committed = shift;
96 print $date, " ", $hour, " ", $author, " (", $committed, ")\n\n";
107 for my $f (@$files) {
115 for my $l (split ('\n', $logmsg)) {