forked from lancebaiyouview/DirectFB
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmkchlog
80 lines (75 loc) · 2.43 KB
/
mkchlog
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
#!/usr/bin/perl
# Generate a ChangeLog file from a CVS log.
# Written by Robert Krawitz <rlk@alum.mit.edu>
# This code is in the public domain and may be used
# for any purpose.
%logmsgs = (); # Index by date, time, and author
$skipme = 0;
$names{"dok"} = 'Denis Oliver Kropp <dok@directfb.org>';
$names{"andi"} = 'Andreas Shimokawa <andi@directfb.org>';
$names{"neo"} = 'Sven Neumann <sven@gimp.org>';
$names{"mitch"} = 'Michael Natterer <mitch@convergence.de>';
$names{"holger"} = 'Holger Waechtler <holger@convergence.de>';
$names{"count"} = 'Andreas Kotes <count@convergence.de>';
$names{"mm"} = 'Martin Mueller <mm@convergence.de>';
$names{"syrjala"} = 'Ville Syrjala <syrjala@sci.fi>';
$names{"andros"} = 'Andreas Robinson <andro134+student.liu.se>';
$names{"klan"} = 'Claudio Ciccani <klan@users.sf.net>';
$names{"obi"} = 'Andreas Oberritter <obi@tuxbox.org>';
$names{"adaplas"} = 'Antonino Daplas <adaplas@users.sourceforge.net>';
while (<>) {
if (/^Working file: /) {
chomp;
($ignore, $ignore, $currentfile) = split;
while (<>) {
if (/^----------------------------$/) {
last;
}
}
next;
} elsif (/^----------------------------$/) {
next;
} elsif (/^revision /) {
($ignore, $revision) = split;
@junk = split(/\./, $revision);
} elsif (/^date: /) {
($ignore, $date, $time, $ignore, $author, $ignore, $ignore,
$ignore, $plus, $minus, $ignore, $ignore, $ignore, $commitid) = split;
$time =~ s/:[0-9][0-9];$//;
$author =~ s/;$//;
$datetimeauthor = "$date $time $author $commitid";
$body = "";
$firstline = 1;
while (<>) {
if (/^----------------------------$/) {
last;
} elsif (/^=============================================================================$/) {
last;
} elsif ($firstline && /^branches:[ \t]+[0-9]+(\.[0-9]+)+;$/) {
next;
} else {
$body .= $_;
$firstline = 0;
}
}
if ($skipme == 0) {
if ($logmsgs{$datetimeauthor}) {
$stuff = $logmsgs{$datetimeauthor};
$stuff =~ s/\n/\n\t$currentfile ($revision) ($plus $minus)\n/;
$logmsgs{$datetimeauthor} = $stuff;
} else {
$logmsgs{$datetimeauthor} = "Files:\t$currentfile ($revision) ($plus $minus)\n\n$body"
}
}
} # Other junk we ignore
}
@chlog = reverse sort keys %logmsgs;
foreach $_ (@chlog) {
($date, $time, $author) = split;
$date =~ s,/,-,g;
$msg = $logmsgs{$_};
print "$date $author\t$time\t$names{$author}\n\n";
$msg =~ s/^/\t/g;
$msg =~ s/\n/\n\t/g;
print "$msg\n";
}