linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matthias Andree <matthias.andree@gmx.de>
To: torvalds@transmeta.com
Cc: linux-kernel@vger.kernel.org, matthias.andree@gmx.de, samel@mail.cz
Subject: BK-kernel-tools/shortlog update
Date: Wed, 26 Mar 2003 22:21:21 +0100 (CET)	[thread overview]
Message-ID: <20030326212121.DB7C458C49@merlin.emma.line.org> (raw)

Hello Linus,

you can either use bk receive to patch this mail, you can pull from
bk://krusty.dt.e-technik.uni-dortmund.de  (NOTE: no trailing slash)
or you can apply the patch below.

Patch description:
  Update to upstream version 0.88:
  * Add regexp support for address -> name resolution. (0.86)
  * Add selftest mode to figure addresses that can be removed because they
    are also matched by regexps (0.88).

Matthias
##### DIFFSTAT #####
# shortlog |   77 ++++++++++++++++++++++++++++++++++++++++++++++++++++++---------
# 1 files changed, 66 insertions(+), 11 deletions(-)

##### GNUPATCH #####
# This is a BitKeeper generated patch for the following project:
# Project Name: BK kernel tools
# This patch format is intended for GNU patch command version 2.5 or higher.
# This patch includes the following deltas:
#	           ChangeSet	1.43    -> 1.44   
#	            shortlog	1.19    -> 1.20   
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 03/03/26	matthias.andree@gmx.de	1.44
# Update to upstream version 0.88:
# * Add regexp support for address -> name resolution. (0.86)
# * Add selftest mode to figure addresses that can be removed because they
#   are also matched by regexps (0.88).
# --------------------------------------------
#
diff -Nru a/shortlog b/shortlog
--- a/shortlog	Wed Mar 26 22:21:21 2003
+++ b/shortlog	Wed Mar 26 22:21:21 2003
@@ -8,7 +8,7 @@
 #			Tomas Szepe <szepe@pinerecords.com>
 #			Vitezslav Samel <samel@mail.cz>
 #
-# $Id: lk-changelog.pl,v 0.85 2003/03/26 08:22:11 vita Exp $
+# $Id: lk-changelog.pl,v 0.88 2003/03/26 21:12:23 emma Exp $
 # ----------------------------------------------------------------------
 # Distribution of this script is permitted under the terms of the
 # GNU General Public License (GNU GPL) v2.
@@ -53,6 +53,8 @@
 use Text::Tabs;
 use Text::Wrap;
 
+sub selftest();
+
 # --------------------------------------------------------------------
 # customize the following line to change the indentation of the change
 # lines, $indent1 is used for the first line of an entry, $indent for
@@ -63,6 +65,11 @@
 my $debug = 0;
 # --------------------------------------------------------------------
 
+# Perl syntax magic here, "=>" is equivalent to ","
+my @addrregexps = (
+[ 'alan@.*\.swansea\.linux\.org\.uk' => 'Alan Cox', ],
+[ '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~' => '~~~~~~~~' ]);
+
 # the key is the email address in ALL LOWER CAPS!
 # the value is the real name of the person
 #
@@ -101,8 +108,6 @@
 'akpm@digeo.com' => 'Andrew Morton',
 'akpm@zip.com.au' => 'Andrew Morton',
 'akropel1@rochester.rr.com' => 'Adam Kropelin', # lbdb
-'alan@hraefn.swansea.linux.org.uk' => 'Alan Cox',
-'alan@irongate.swansea.linux.org.uk' => 'Alan Cox',
 'alan@lxorguk.ukuu.org.uk' => 'Alan Cox',
 'alan@redhat.com' => 'Alan Cox',
 'alex@ssi.bg' => 'Alexander Atanasov',
@@ -889,12 +894,27 @@
 
 my %address_unknown;
 
-# get name associated to an email address
-sub rmap_address {
-  my @o = map {defined $addresses{$_} ? $addresses{$_} :
-		 scalar (($address_unknown{$_} = 1), $_); }
-          map { lc; } @_;
-  return wantarray ? @o : $o[0];
+# get name associated with an "email address" formatted
+# BK_USER,BK_HOST tuple
+sub rmap_address($) {
+    my $in = shift;
+    my $key = lc $in;
+    # try hash lookup first, return result if any
+    if (defined $addresses{$key}) {
+	return $addresses{$key};
+    }
+    # try matching against all regexps in listed order
+    # return result if any
+    foreach my $ar (@addrregexps) {
+	if ($in =~ m/$ar->[0]/) {
+	    return $ar->[1];
+	}
+    }
+    # when the address is unknown, return the unchanged input
+    # and mark the address as unknown (so it can be printed in --warn
+    # mode).
+    $address_unknown{$key} = 1;
+    return $in;
 }
 
 # case insensitive string comparison
@@ -1274,12 +1294,26 @@
   return print $opt{width} ? expand(wrap("", "", ($a))) : $a, "\n";
 }
 
+sub selftest() {
+    my $rc = 0;
+    foreach my $address (keys %addresses) {
+	foreach my $ar (@addrregexps) {
+	    if ($address =~ m/$ar->[0]/) {
+		print STDERR "Warning: address '$address'\n";
+		print STDERR "  shadows regexp '$ar->[0]'\n";
+		$rc = 1;
+	    }
+	}
+    }
+    return $rc;
+}
+
 # === MAIN PROGRAM ===============================================
 # Command line arguments
 # What options do we support?
 my @opts = ("help|?|h", "man", "mode=s", "compress!", "count!", "width:i",
 	    "swap!", "merge!", "warn!", "multi!", "abbreviate-names!",
-	    "by-surname!");
+	    "by-surname!", "selftest");
 #	    "bitkeeper|bk!");
 
 # How do we parse them?
@@ -1311,7 +1345,8 @@
   unless defined $table{$opt{mode}};
 pod2usage(-verbose => 0,
 	  -message => "$0: No files given, refusing to read from a TTY.")
-  if (not $opt{bitkeeper} and (@ARGV == 0) and (-t STDIN));
+  if (not $opt{selftest} and not $opt{bitkeeper}
+	  and (@ARGV == 0) and (-t STDIN));
 pod2usage(-verbose => 0,
 	  -message => "$0: Must have one or two arguments in --bitkeeper mode.")
   if ($opt{bitkeeper} && (@ARGV < 1 || @ARGV > 2));
@@ -1358,6 +1393,10 @@
   foreach (@ARGV) { print STDERR "DEBUG:   '$_'\n"; }
 }
 
+if ($opt{selftest}) {
+    exit selftest;
+}
+
 # Main program
 my @prolog;
 my %log;
@@ -1406,6 +1445,18 @@
 __END__
 # --------------------------------------------------------------------
 # $Log: lk-changelog.pl,v $
+# Revision 0.88  2003/03/26 21:12:23  emma
+# Add selftest mode check:
+# * check all addresses against all regexps to find addresses shadowing
+#   regular expressions.
+#
+# Revision 0.87  2003/03/26 21:02:53  emma
+# Fix broken regexp for Alan's swansea.linux.org.uk addresses. Add some comments.
+#
+# Revision 0.86  2003/03/26 20:57:49  emma
+# Support regexp queries (but try hash lookups first for efficiency).
+# Requested by Linus Torvalds.
+#
 # Revision 0.85  2003/03/26 08:22:11  vita
 # Added 6 names for new addresses.
 #
@@ -1737,6 +1788,8 @@
      --width[=WIDTH] specify the line length, if omitted: $COLUMNS or 80.
                      text lines will not exceed this length.
 
+     --selftest      perform some self tests (for developers of this script)
+
 Warning: Neither --compress nor --count are currently functional with
 --mode=full.
 
@@ -1825,6 +1878,8 @@
 =head1 TODO
 
 =over
+
+=item * OBFUSCATE ADDRESSES (requested by Solar Designer)
 
 =item * --compress-me-harder
 

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


begin 600 bkpatch306
M'XL(`-$9@CX``^U7VW+:2!!]1E_1B[T%)):L$8B;"Y<O.`F5U"8%]N[#VI4:
M2P.HT"TS(QLJ.-^^/2,DC.UL]O:X,@723'=/]^G3W?(>7`G&^Y6(2CD/J+!H
M['/&C#UXEPC9K\RBI>6KQW&2X..AR`0[7#`>L_#P[#U^S/S!E$D2"@,%/U'I
MS>&.<=&O$*M9KLA5ROJ5\<7;JP^G8\,8#.!\3N,9FS`)@X$A$WY'0U^<I"R>
M94%L24YC$3%)+2^)UJ7LVK%M!_^(T[3;;F_M]-JNNV8.<UVO1>AMI]MAGF,\
MB><DCV/73--N.FUBVVW'7KLNZ76-(1"KU0*[>8@?IPV.TR>]?JOYVB9]VX:7
MC<)K`J9MG,%_',*YX<%5ZE/)T#)DJ9"<T4@C&R0QV%:WVT>15W#J^\#9C"U3
M$%F:)ES"-.%`?712"#"/(:810Q&1A)E$70OJJ-UNE-J"A5/)A(0H\?5ITV"6
M<5:88`+DG$KP:`RWRE"4W#$?;SV*=,`]MD)3`%2IA")10'ES);':.";TB=V&
M9;P'U\70C4_;]!OFW[P,PZ:V<;P%?)Y$[`G:8HXXA,DL!]LE7;O3ZI#NNDDZ
M/7<]93TZ]3IVC]K,I[?^=U*[8T73Q2&DUW+63K?=;&L2%Q(['/[7_GR/O\_\
M4?0EO77+Z:$_BKZ._8R^S@_HVVZ#2<C_!/ZK!,Z3_Q%,?K]4'W.);"XR\P_(
M/"0$B#'2WWNP/_+[$"Y,3Z.-%JTT/+C3:('*>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".?&"\>W=X^W^VZGW^J5QT\V`W]S]I>,\0#CK-]F
M\FE#%7E'U?ZQZ33P`A9[*ZQC=2`JZAZ'$_L#.BO@<O,RHSP:D4ZSIUF%EVF6
M>=$7TD=-B#P.M05J#UU0Y_CL#F<PB@A(<&..S4IX/$AE0S.CZ^`\PKM!(%F$
MB?UX]N9J<GYZ>0&GP^'X8C*YF$"=/W9NDJB$#9D(9C'CC>U_3)H3(HL&+=?N
.V=VN;?P!I3`%1)P-````
`
end


             reply	other threads:[~2003-03-26 21:10 UTC|newest]

Thread overview: 124+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-03-26 21:21 Matthias Andree [this message]
  -- strict thread matches above, loose matches on Subject: below --
2005-03-14  9:49 BK-kernel-tools/shortlog update 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-12  9:06 Matthias Andree
2004-07-12  9:21 ` 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 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=20030326212121.DB7C458C49@merlin.emma.line.org \
    --to=matthias.andree@gmx.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=samel@mail.cz \
    --cc=torvalds@transmeta.com \
    /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).