lkml.org 
[lkml]   [2002]   [May]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: Changelogs on kernel.org
    In mailing-lists.linux-kernel, you wrote:
    >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?

    [snip]
    Basically the same, this treats each patch separately:

    #!/usr/bin/perl

    use strict;

    my %people = ();
    my $addr = "";
    my @cur = ();

    sub append_item() {
    if (!$addr) { return; }
    if (!$people{$addr}) { @{$people{$addr}} = (); }
    push @{$people{$addr}}, [@cur];

    @cur = ();
    }

    while (<>) {
    # Match address
    if (/^<(.+)>/) {
    # Add old item (if any) before beginning new
    append_item();
    $addr = $1;
    } elsif ($addr) {
    # Add line to patch
    push @cur, $_;
    } else {
    # Header information
    print
    }
    }


    sub print_items($) {
    my @items = @{$people{$_[0]}};
    # Vain attempt to sort patches from one address
    @items = sort @items;
    while ($_ = shift @items) {
    # Item separator
    print " --------------------------------------------------------------\n";
    print @$_;
    }
    }

    append_item();
    foreach $addr (sort keys %people) {
    print "<$addr>\n";
    print_items($addr);
    print "\n";
    }


    Output:


    Summary of changes from v2.5.14 to v2.5.15
    ============================================

    <acme@brinquedo.oo.ps>
    --------------------------------------------------------------
    - remove spurious spaces and tabs at end of lines
    - make sure if, while, for, switch has a space before the opening '('
    - make sure no line has more than 80 chars
    - move initializations to the declaration line where possible
    - bitwise, logical and arithmetic operators have spaces before and after,
    improving readability of complex expressions
    - remove uneeded () in returns
    - other minor cleanups


    <acme@conectiva.com.br>
    --------------------------------------------------------------
    net/ipv4/arp.c:
    - htons cleanups
    - remove duplicated code
    - apply CodingStyle

    ...
    ...
    <davej@suse.de>
    --------------------------------------------------------------
    [PATCH] capabilities for mtrr driver.


    --------------------------------------------------------------
    [PATCH] region handling cleanup

    Done by William Stinson.
    Adds error handling to request_region() calls,
    and converts some old check_region() calls too.

    --------------------------------------------------------------
    [PATCH] region handling cleanup

    Done by William Stinson.
    Adds error handling to request_region() calls,
    and converts some old check_region() calls too.
    ...
    ...




    --
    Marcus Alanen
    maalanen@abo.fi
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-03-22 13:26    [W:0.025 / U:30.912 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site