lkml.org 
[lkml]   [2013]   [Mar]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: Linux 3.9-rc1
From
On Sun, Mar 3, 2013 at 5:42 PM, Linus Torvalds
<torvalds@linux-foundation.org> wrote:
>
> git log v3.8.. --author=Torvalds --merges |
> egrep '^ ((Merge)|(Pull)) .* from '
>
> and then some nasty sed+sort crud, followed by some manual fixup. It's
> the kind of thing perl is perfect for, but I'm not much of a perl
> person, so I have never written a *good* script to just do this right.

Ok, this is still not good, but this at least makes my manual editing
minimal. There's a few extra lines that match the pattern that need
manual fixup, and some people with two different names (Ted vs
Theodore) but other than that it looks ok.

So do the above git long + egrep pipeline, and then pipe it to the
perl script below. I feel a git alias coming up in my future..

Real perl people may want to avert their eyes..

Linus

---
#!/usr/bin/perl -w
use strict;

my (%map);

sub add_entry($$) {
my ($key,$desc) = @_;

if (exists $map{$key}) {
my $obj = $map{$key};
push(@$obj, $desc);
} else {
my @arr = ($desc);
$map{$key} = \@arr;
}
}

sub input {
while (<>) {
my ($type,$desc,$key) = (/^ *(\S*) *(.*) from *(.*)/);
chomp($key = $3);
chomp($desc = $2);
chop $key if ($key =~ /(:|\.)$/);
add_entry($key, $desc);
}
}

sub by_name($$) {
my ($a, $b) = @_;
uc($a) cmp uc($b);
}

sub output {
my ($key);

foreach $key (sort by_name keys %map) {
my ($obj, $desc);

$obj = $map{$key};
printf "%s: (%d)\n", $key, scalar(@$obj);
print "\t$_\n" foreach @$obj;
print "\n";
}
}

input;
output;
exit(0)


\
 
 \ /
  Last update: 2013-03-04 05:01    [W:0.058 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site