-
-
Notifications
You must be signed in to change notification settings - Fork 61
/
mkchlog
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 <[email protected]>
# 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 <[email protected]>';
$names{"andi"} = 'Andreas Shimokawa <[email protected]>';
$names{"neo"} = 'Sven Neumann <[email protected]>';
$names{"mitch"} = 'Michael Natterer <[email protected]>';
$names{"holger"} = 'Holger Waechtler <[email protected]>';
$names{"count"} = 'Andreas Kotes <[email protected]>';
$names{"mm"} = 'Martin Mueller <[email protected]>';
$names{"syrjala"} = 'Ville Syrjala <[email protected]>';
$names{"andros"} = 'Andreas Robinson <andro134+student.liu.se>';
$names{"klan"} = 'Claudio Ciccani <[email protected]>';
$names{"obi"} = 'Andreas Oberritter <[email protected]>';
$names{"adaplas"} = 'Antonino Daplas <[email protected]>';
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";
}