Re: Changelogs on kernel.org

Florian Weimer
2002-05-12T21:18:14Z

torvalds@transmeta.com (Linus Torvalds) writes:

> Perl is the obvious choice for doing transformations like these. Is
> anybody willing to write a perl script that does the "sort by author"
> thing?

#!/usr/bin/perl -w
# Reformat 2.4 ChangeLog

use strict;

my %authors = ();
my $current;

while (<>) {
chomp;
if (/^</) {
if (exists $authors{$_}) {
$current = $authors{$_};
} else {
$current = $authors{$_} = [];
}
} else {
die "illegal format" unless defined $current;
push @$current, $_;
}
}

my $author;
foreach $author (sort keys %authors) {
print "$author\n";
$_ = join "\n", @{$authors{$author}};
# Add empty line before next author.
s/\n*$/\n\n/;
print;
}

For your example, the result is:

<jsimmons@heisenberg.transvirtual.com>
A bunch of fixes.

Pmac updates

Some more small fixes.

<rmk@arm.linux.org.uk>
[PATCH] 2.5.13: vmalloc link failure

The following patch fixes this, and also fixes the similar problem in
scsi_debug.c:

<trond.myklebust@fys.uio.no>
[PATCH] in_ntoa link failure

Nothing serious. Whoever it was that did that global replacemissed a
spot is all...

<viro@math.psu.edu>
[PATCH] change_floppy() fix

Needed both in 2.4 and 2.5

IMHO, it doesn't make much sense.

--
Florian Weimer Weimer@CERT.Uni-Stuttgart.DE
University of Stuttgart http://CERT.Uni-Stuttgart.DE/people/fw/
RUS-CERT +49-711-685-5973/fax +49-711-685-5898