linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matthias Andree <matthias.andree@gmx.de>
To: torvalds@osdl.org, marcelo.tosatti@cyclades.com.br
Cc: linux-kernel@vger.kernel.org, matthias.andree@gmx.de, samel@mail.cz
Subject: BK-kernel-tools/shortlog update
Date: Mon, 12 Jul 2004 11:06:07 +0200 (CEST)	[thread overview]
Message-ID: <20040712090607.DFCFAC3662@merlin.emma.line.org> (raw)

Hello Linus,

you can either use "bk receive" to patch with this mail,
or you can
Pull from: bk://krusty.dt.e-technik.uni-dortmund.de/BK-kernel-tools
or in cases of dire need, you can apply the patch below.

BK: Parent repository is http://bktools.bkbits.net/bktools

Patch description:
ChangeSet@1.201, 2004-07-12 11:04:45+02:00, matthias.andree@gmx.de
  * Implement address precedence logic
  * If the LINUXKERNEL_BK_FMT_DEBUG environment variable is non-empty, enter debug mode.

Matthias

------------------------------------------------------------------------

##### DIFFSTAT #####
# shortlog |  105 ++++++++++++++++++++++++++++++-------------
# 1 files changed, 74 insertions(+), 31 deletions(-)

##### GNUPATCH #####
# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
#   2004/07/12 11:04:45+02:00 matthias.andree@gmx.de 
#   * Implement address precedence logic
#   * If the LINUXKERNEL_BK_FMT_DEBUG environment variable is non-empty, enter debug mode.
# 
# shortlog
#   2004/07/12 11:04:44+02:00 matthias.andree@gmx.de +74 -31
#   * Implement address precedence logic ($namepref), priority:
#   2 (highest) - From:
#   1 - Signed-off-by: (the first one found in a block)
#   0 - BK information on ChangeSet author
#   * Consolidate From: and Signed-off-by: parsing into a common function, treat_address($$)
#   * Check LINUXKERNEL_BK_FMT_DEBUG environment variable, if nonzero, enter debug mode.
#   * Kill some trailing whitespace.
# 
diff -Nru a/shortlog b/shortlog
--- a/shortlog	2004-07-12 11:06:07 +02:00
+++ b/shortlog	2004-07-12 11:06:07 +02:00
@@ -8,7 +8,7 @@
 #			Tomas Szepe <szepe@pinerecords.com>
 #			Vitezslav Samel <samel@mail.cz>
 #
-# $Id: lk-changelog.pl,v 0.307 2004/07/02 08:59:44 vita Exp $
+# $Id: lk-changelog.pl,v 0.309 2004/07/12 09:00:05 emma Exp $
 # ----------------------------------------------------------------------
 # Distribution of this script is permitted under the terms of the
 # GNU General Public License (GNU GPL) v2.
@@ -68,6 +68,11 @@
 my $debug = 0;
 # --------------------------------------------------------------------
 
+if (defined $ENV{LINUXKERNEL_BK_FMT_DEBUG}
+	and $ENV{LINUXKERNEL_BK_FMT_DEBUG}) {
+    $debug = 1;
+}
+
 # Perl syntax magic here, "=>" is equivalent to ","
 my @addrregexps = (
 [ 'alan@[^.]+\.swansea\.linux\.org\.uk' => 'Alan Cox', ],
@@ -2107,7 +2112,7 @@
 # * $author can be the email address or Joe N. Sixpack II <joe6@example.com>
 #   (ready formatted to print)
 # * $name is the name (Joe N. Sixpack II) or the mail address
-#   (<joe6@example.com>) 
+#   (<joe6@example.com>)
 
 sub get_name()   { return $name; }
 sub get_author() { return $author; }
@@ -2180,7 +2185,7 @@
   croak "do not call removedups() in scalar context" unless wantarray;
   my @u = grep (!$t{lc $_}++, @_);
   return map {
-    $t{lc $_} > 1 ? sprintf("%d x ", $t{lc $_}) . $_ : $_; 
+    $t{lc $_} > 1 ? sprintf("%d x ", $t{lc $_}) . $_ : $_;
   } @u;
 }
 
@@ -2298,7 +2303,7 @@
 		   compress(map { $_->[0]; } @{$log->{$_}})), "\n"
 		     or write_error();
       } else {
-	print join("\n", map { "$indent1$_ ($a)" } 
+	print join("\n", map { "$indent1$_ ($a)" }
 		   compress(map { $_->[0]; } @{$log->{$_}})), "\n"
 		     or write_error();
       }
@@ -2478,6 +2483,28 @@
     return $author;
 }
 
+# Treat address
+# INPUT: Tuple of Name, Address scalars
+# OUTPUT: Tuple of Name, Address, Author scalars in an array
+sub treat_address($$) {
+    my $n = shift;
+    my $a = lc shift;
+    my $au;
+    my $tmp;
+
+    if (($tmp = rmap_address($a, 0)) eq $a) {
+	if ($n =~ /\s+/) {
+	    # not found, but only add if two words or more in name.
+	    $address_found_in_from{$a} = sprintf "'%s' => '%s',",
+	    obfuscate $a, $n; # FIXME: has this any effect?
+	}
+    } else {
+	$n = $tmp;
+    }
+    $au = treat_addr_name($a, $n);
+    return ($n, $a, $au);
+}
+
 # Read a file and parse it into the %log hash.
 sub parse_file(\%$$ ) {
 # arguments: %log hash
@@ -2494,8 +2521,18 @@
   my @cur = ();
   my $first = 0;
   my $firstpar = 0;
+  my $namepref = 0; # where address is from
+  # 0 - BK; 1 - Signed-off-by; 2 - From
   undef $address;
 
+  ###############################################################
+  # Linus' intended logic is:
+  # - preference is given to From: (namepref 2)
+  # - lacking From:, use the first Signed-off-by: we encounter
+  #   (namepref 1)
+  # - lacking that information, use BK user info (namepref 0)
+  ###############################################################
+
   # now go!
 
   # NOTE: the first @cur item can consist of multiple lines in the
@@ -2531,41 +2568,30 @@
       $address =~ s/\[[^]]+\]$//;
       $name = rmap_address($address, 1);
       $author = treat_addr_name($address, $name);
-      print STDERR "AUTHOR $author\n" if $debug;
       $first = 1;
       $firstpar = 1;
+      print STDERR " BK-CHANGESET $author\n" if $debug;
+      $namepref = 0;
     } elsif (/^\s+From:?\s*"?([^"]*)"?\s+\<(.*)\>\s*$/) {
-      my $tmp;
-      $name = $1;
-      $address = lc $2;
-      if (($tmp = rmap_address($address, 0)) eq $address) {
-	if ($name =~ /\s+/) {
-	  # not found, but only add if two words or more in name.
-	  $address_found_in_from{$address} = sprintf "'%s' => '%s',",
-	  obfuscate $address, $name;
-	}
+      my @nameauthor = treat_address($1, $2);
+      if ($namepref < 2) {
+	  ($name, $address, $author) = @nameauthor;
+	  $namepref = 2;
+	  print STDERR " FROM  $author\n" if $debug;
       } else {
-	$name = $tmp;
+	  print STDERR " SKIPPED FROM  $author\n" if $debug;
       }
-      $author = treat_addr_name($address, $name);
-      print STDERR " FROM  $author\n" if $debug;
     } elsif (/^\s+Signed-off-by:\s*"?([^"]*)"?\s+\<(.*)\>\s*$/i) {
-      my $tmp;
-      $name = $1;
-      $address = lc $2;
-      if (($tmp = rmap_address($address, 0)) eq $address) {
-	if ($name =~ /\s+/) {
-	  # not found, but only add if two words or more in name.
-	  $address_found_in_from{$address} = sprintf "'%s' => '%s',",
-	  obfuscate $address, $name;
-	}
+      my @nameauthor = treat_address($1, $2);
+      if ($namepref < 1) {
+	  ($name, $address, $author) = @nameauthor;
+	  $namepref = 1;
+	  print STDERR " SIGNED-OFF-BY  $author\n" if $debug;
       } else {
-	$name = $tmp;
+	  print STDERR " SKIPPED SIGNED-OFF-BY  $author\n" if $debug;
       }
-      $author = treat_addr_name($address, $name);
-      print STDERR " SIGNED-OFF-BY  $author\n" if $debug;
     } elsif ($first) {
-      # we have a "first" line after an address, take it, 
+      # we have a "first" line after an address, take it,
       # strip common redundant tags
 
       # kill "PATCH" tag
@@ -2599,7 +2625,7 @@
       # store header before a changelog
       push @prolog, $_;
     }
-  }
+  } # while more lines in file
 
   if ($fh -> error) {
     die "Error while reading from \"$fn\": $!";
@@ -2862,6 +2888,18 @@
 
 Summarizes or reformats BitKeeper ChangeLogs for Linux Kernel 2.X.
 
+Addresses of patch authors are determined with the following precedence:
+
+=over
+
+=item 1. From: line
+
+=item 2. Signed-off-by
+
+=item 3. BK user/host
+
+=back
+
 --mode options are:
 
 =over
@@ -2900,6 +2938,11 @@
 set in this variable on the command line. B<Example:> If you put
 --swap here and --noswap on your command line, --noswap takes
 precedence.
+
+=item LINUXKERNEL_BK_FMT_DEBUG
+
+If this evaluates to "true" when used as Perl expression, i. e. it is a
+nonempty string or a number other than 0, enable debugging.
 
 =back
 

##### BKPATCH #####
This BitKeeper patch contains the following changesets:
1.201
## Wrapped with gzip_uu ##


M'XL( ']4\D   \57^V_;-A#^.?HK#HZ'V:OM4++DY])'&J<STJ9!'L,&%#!H
MB;*U2*0G47DLR?[VW9%VG$?3/5I@LF%:U-WQ[N/==]0FG!8B'VQD7.MYPHL6
MEU$NA+,)/ZE"#S9FV64KHMLCI?!VJR@+L74F<BG2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2^TA!#%?1>2DJQ-62[$> K>10Y"F(RP6%;A@H:8%H(9#$C=S!4Z%Y
MT8)"YQ0GIBH'66931%\A!#EQF 1&QT;S=F:V=8:BK?5[=4A'TJ+,MH-I[';=
,]M3Y"R"5FU/"#P  
 


             reply	other threads:[~2004-07-12  9:06 UTC|newest]

Thread overview: 124+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-12  9:06 Matthias Andree [this message]
2004-07-12  9:21 ` BK-kernel-tools/shortlog update Matthias Andree
  -- strict thread matches above, loose matches on Subject: below --
2005-03-14  9:49 Matthias Andree
2005-03-11 10:21 Matthias Andree
2005-03-09  9:39 Matthias Andree
2005-03-07 13:50 Matthias Andree
2005-03-03 12:19 Matthias Andree
2005-02-23 14:43 Matthias Andree
2005-02-09  9:23 Matthias Andree
2005-02-07 12:45 Matthias Andree
2005-02-04 11:35 Matthias Andree
2005-01-21 14:30 Matthias Andree
2005-01-20  9:27 Matthias Andree
2005-01-20 12:51 ` Adrian Bunk
2005-01-20 13:13   ` Matthias Andree
2005-01-10 18:22 Matthias Andree
2005-01-08  1:38 Matthias Andree
2005-01-05 11:58 Matthias Andree
2005-01-05 12:07 ` Matthias Andree
2004-12-23 10:52 Matthias Andree
2004-12-20  9:53 Matthias Andree
2004-12-16 10:18 Matthias Andree
2004-11-12 10:10 Matthias Andree
2004-11-09  8:42 Matthias Andree
2004-11-09 10:06 ` Måns Rullgård
2004-10-21 22:38 Matthias Andree
2004-10-19  1:56 Matthias Andree
2004-10-19  1:43 Matthias Andree
2004-10-14  7:02 Matthias Andree
2004-10-06 10:48 Matthias Andree
2004-09-24 10:09 Matthias Andree
2004-08-25 16:10 Matthias Andree
2004-08-24 14:18 Matthias Andree
2004-08-23 10:43 Matthias Andree
2004-08-16 11:18 Matthias Andree
2004-08-10 12:24 Matthias Andree
2004-08-04  9:00 Matthias Andree
2004-07-16 13:51 Matthias Andree
2004-07-02 10:40 Matthias Andree
2004-06-07 11:36 Matthias Andree
2004-06-03  8:00 Matthias Andree
2004-05-14 20:08 Matthias Andree
2004-05-03  9:23 Matthias Andree
2004-04-26  8:40 Matthias Andree
2004-04-20 11:14 Matthias Andree
2004-04-15 16:10 Matthias Andree
2004-04-01 21:48 Matthias Andree
2004-03-30 14:05 Matthias Andree
2004-03-30  1:17 Matthias Andree
2004-03-23 11:51 Matthias Andree
2004-03-15 17:12 Matthias Andree
2004-03-09  0:16 Matthias Andree
2004-03-04 17:09 Matthias Andree
2004-03-04 17:09 Matthias Andree
2004-01-27 14:46 Matthias Andree
2004-01-19 17:01 Matthias Andree
2004-01-16 14:41 Matthias Andree
2004-01-07 11:29 Matthias Andree
2003-12-30  2:16 Matthias Andree
2003-12-30  2:16 Matthias Andree
2003-12-22  1:18 Matthias Andree
2003-12-21  3:19 Matthias Andree
2003-12-20 23:36 Matthias Andree
2003-12-20 23:36 Matthias Andree
2003-12-20 23:36 Matthias Andree
2003-12-20 23:39 ` Matthias Andree
2003-12-06 16:41 Matthias Andree
2003-11-27 11:03 Matthias Andree
2003-11-25  3:21 Matthias Andree
2003-11-22 15:05 Matthias Andree
2003-11-19 16:11 Matthias Andree
2003-10-27 12:09 Matthias Andree
2003-10-16 14:26 Matthias Andree
2003-10-08 21:59 Matthias Andree
2003-09-22 14:54 Matthias Andree
2003-09-11  9:18 Matthias Andree
2003-09-04 20:57 Matthias Andree
2003-09-03 23:33 Matthias Andree
2003-09-04 16:05 ` Dave Jones
2003-09-04 16:09   ` Matthias Andree
2003-09-04 16:17     ` Dave Jones
2003-09-04 16:33     ` Linus Torvalds
2003-09-04 17:42       ` Matthias Andree
2003-09-04 19:49         ` Greg KH
2003-09-04 20:54           ` Matthias Andree
2003-09-04 20:32         ` Dave Dillow
2003-08-31 14:16 Matthias Andree
2003-08-29 13:00 Matthias Andree
2003-08-28 16:29 Matthias Andree
2003-08-24 11:02 Matthias Andree
2003-08-08 22:51 Matthias Andree
2003-07-30  8:38 Matthias Andree
2003-07-21  9:30 John Bradford
2003-07-21  9:17 Matthias Andree
2003-07-21  9:17 Matthias Andree
2003-07-15 13:20 Matthias Andree
2003-07-11 12:12 Matthias Andree
2003-07-06 21:44 Matthias Andree
2003-06-30  8:32 Matthias Andree
2003-06-24 11:00 Matthias Andree
2003-06-20 23:06 Matthias Andree
2003-06-17 14:57 Matthias Andree
2003-06-17 14:57 Matthias Andree
2003-06-17 14:54 Matthias Andree
2003-06-09 10:26 Matthias Andree
2003-06-09 10:24 Matthias Andree
2003-06-04 19:04 Matthias Andree
2003-05-29 11:26 Matthias Andree
2003-05-15 14:11 Matthias Andree
2003-04-28 23:08 Matthias Andree
2003-04-27 13:24 Matthias Andree
2003-04-13 10:50 Matthias Andree
2003-03-28 11:00 Matthias Andree
2003-03-26 21:21 Matthias Andree
2003-03-26 10:33 Matthias Andree
2003-03-26 10:30 Matthias Andree
2003-03-26 17:21 ` Linus Torvalds
2003-03-26 19:25   ` Olaf Dietsche
2003-03-26 20:10   ` Matthias Andree
2003-03-26 21:15     ` Jeff Garzik
2003-03-26 21:33       ` Jauder Ho
2003-03-27  0:46         ` jw schultz
2003-03-26 21:08   ` Matti Aarnio
2003-03-26 21:14   ` Matthias Andree

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040712090607.DFCFAC3662@merlin.emma.line.org \
    --to=matthias.andree@gmx.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcelo.tosatti@cyclades.com.br \
    --cc=samel@mail.cz \
    --cc=torvalds@osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).