Merge pull request #1984 from jsquyres/pr/auto-generate-AUTHORS
Be able to auto-generate AUTHORS and preserve org affiliations
Этот коммит содержится в:
Коммит
17ca44b25e
82
.mailmap
82
.mailmap
@ -1,8 +1,19 @@
|
||||
# This file exists to help map usernames to proper names and email addresses
|
||||
# in the Open MPI github mirror of the canonical SVN repository. The github
|
||||
# mirror can be found here:
|
||||
# This file exists to help consolidate names and email addresses
|
||||
# (e.g., when people accidentally commit with an incorrect or local
|
||||
# email address). Two common use cases:
|
||||
#
|
||||
# https://github.com/open-mpi/ompi-svn-mirror
|
||||
# 1. Consolidate multiple email addresses from a single person.
|
||||
# Example: one commit from John Smith is from
|
||||
# <john.smith@his.work.com> and another is from
|
||||
# <jsmith@workstation.his.work.com>, and a third is from
|
||||
# <rocketman9982@users.noreply.github.com>. But they're all from
|
||||
# the same John Smith person.
|
||||
#
|
||||
# 2. Consolidate misspellings / altername names from a single person.
|
||||
# Example: one commit is from "John Smith" and another is from
|
||||
# "John Smith, CONTRACTOR", and third is from "RocketMan 9982". But
|
||||
# these are all really the same person, who can be listed once in
|
||||
# AUTHORS as "John Smith".
|
||||
#
|
||||
# The format of this file is documented in git-shortlog(1). Specifically,
|
||||
# a line like this:
|
||||
@ -12,46 +23,79 @@
|
||||
# means that when git sees "commit@email.xx" it will display
|
||||
# "Proper Name <proper@email.xx>" instead in certain circumstances. Those
|
||||
# circumstances include:
|
||||
#
|
||||
# - git shortlog
|
||||
# - git blame
|
||||
# - git log --format=tformat:"%aN <%aE>" (and similar)
|
||||
#
|
||||
# A copy of this file should be present on each branch in SVN which is being
|
||||
# tracked in the Git mirror.
|
||||
|
||||
# Jeff accidentally stomped on his $HOME/.gitconfig for a short while:
|
||||
Jeff Squyres <jsquyres@cisco.com> --quiet <--quiet>
|
||||
|
||||
# Commits from people with protected Github account address
|
||||
Jeff Squyres <jsquyres@cisco.com> <jsquyres@users.noreply.github.com>
|
||||
Jeff Squyres <jsquyres@cisco.com> --quiet <--quiet>
|
||||
Jeff Squyres <no-author@open-mpi.org>
|
||||
|
||||
George Bosilca <bosilca@icl.utk.edu> <bosilca@users.noreply.github.com>
|
||||
|
||||
Howard Pritchard <howardp@lanl.gov> <hppritcha@users.noreply.github.com>
|
||||
Howard Pritchard <howardp@lanl.gov> <howardp@lanl.gov>
|
||||
|
||||
Andrew Friedley <andrew.friedley@intel.com> <afriedle-intel@users.noreply.github.com>
|
||||
|
||||
Devendar Bureddy <devendar@mellanox.com> <bureddy@users.noreply.github.com>
|
||||
|
||||
Edgar Gabriel <egabriel@central.uh.edu> <edgargabriel@users.noreply.github.com>
|
||||
Edgar Gabriel <gabriel@cs.uh.edu> <gabriel@Peggys-MacBook-Air.local>
|
||||
|
||||
Gilles Gouaillardet <gilles@rist.or.jp> <ggouaillardet@users.noreply.github.com>
|
||||
|
||||
Matias A Cabral <matias.a.cabral@intel.com> <matcabral@users.noreply.github.com>
|
||||
Matias A Cabral <matias.a.cabral@intel.com> <matias.a.cabral@intel.com>
|
||||
|
||||
Pavel Shamis <shamisp@ornl.gov> <shamisp@ornl.gov>
|
||||
Pavel Shamis <shamisp@ornl.gov> <shamisp@users.noreply.github.com>
|
||||
Todd Kordenbrock <thkgcode@gmail.com> <tkordenbrock@users.noreply.github.com>
|
||||
Yohann Burette <yohann.burette@intel.com> <yburette@users.noreply.github.com>
|
||||
Pavel Shamis <pasharesearch@gmail.com> <pasharesearch@gmail.com>
|
||||
|
||||
Todd Kordenbrock <thkgcode@gmail.com> <tkordenbrock@users.noreply.github.com>
|
||||
|
||||
Yohann Burette <yohann.burette@intel.com> <yburette@users.noreply.github.com>
|
||||
Yohann Burette <yohann.burette@intel.com> <yohann.burette@intel.com>
|
||||
|
||||
MPI Team (bot) <mpiteam@open-mpi.org> <mpiteam@open-mpi.org>
|
||||
|
||||
# Fix what look like accidental name mispellings / common-name-isms
|
||||
Yossi Itigin <yosefe@mellanox.com> <yosefe@mellanox.com>
|
||||
|
||||
Josh Hursey <jjhursey@open-mpi.org> <jjhursey@open-mpi.org>
|
||||
Josh Hursey <jhursey@us.ibm.com> <jhursey@us.ibm.com>
|
||||
|
||||
Adrian Reber <adrian@lisas.de> <adrian@lisas.de>
|
||||
Elena <elena.elkina@itseez.com> <elena.elkina89@gmail.com>
|
||||
Howard Pritchard <howardp@lanl.gov> <howardp@lanl.gov>
|
||||
|
||||
Elena Elkina <elena.elkina@itseez.com> <elena.elkina@itseez.com>
|
||||
Elena Elkina <elena.elkina@itseez.com> <elena.elkina89@gmail.com>
|
||||
|
||||
Igor Ivanov <igor.ivanov.va@gmail.com> <igor.ivanov.va@gmail.com>
|
||||
Igor Ivanov <Igor.Ivanov@itseez.com> <Igor.Ivanov@itseez.com>
|
||||
Matias A Cabral <matias.a.cabral@intel.com> <matias.a.cabral@intel.com>
|
||||
|
||||
Mangala Jyothi Bhaskar <mjbhaskar@uh.edu> <mjbhaskar@uh.edu>
|
||||
Mangala Jyothi Bhaskar <mjbhaskar@uh.edu> <mjbhaskar@crill.cs.uh.edu>
|
||||
|
||||
Ralph Castain <rhc@open-mpi.org> <rhc@open-mpi.org>
|
||||
Ralph Castain <rhc@open-mpi.org> <rhc@odin.cs.indiana.edu>
|
||||
|
||||
Rolf vandeVaart <rvandevaart@nvidia.com> <rvandevaart@nvidia.com>
|
||||
Yohann Burette <yohann.burette@intel.com> <yohann.burette@intel.com>
|
||||
|
||||
Karol Mroz <mroz.karol@gmail.com> <mroz.karol@gmail.com>
|
||||
|
||||
Nadezhda Kogteva <nadezhda.kogteva@itseez.com> <nadezhda@mngx-orion-01.dmz.e2e.mlnx>
|
||||
Nysal Jan <jnysal@in.ibm.com> <jnysal@in.ibm.com>
|
||||
Nysal Jan <jnysal@in.ibm.com> <jnysal@gmail.com>
|
||||
|
||||
Thananon Patinyasakdikul <apatinya@cisco.com> <apatinya@savbu-usnic-a.cisco.com>
|
||||
|
||||
Nysal Jan K A <jnysal@in.ibm.com> <jnysal@in.ibm.com>
|
||||
Nysal Jan K A <jnysal@in.ibm.com> <jnysal@gmail.com>
|
||||
|
||||
Zhi Ming Wang <wangzm@cn.ibm.com> <wangzm@cn.ibm.com>
|
||||
|
||||
Annapurna Dasari <annapurna.dasari@intel.com> <annapurna.dasari@intel.com>
|
||||
|
||||
L. R. Rajeshnarayanan <l.r.rajeshnarayanan@intel.com> <l.r.rajeshnarayanan@intel.com>
|
||||
|
||||
Aurщlien Bouteiller <bouteill@icl.utk.edu> <bouteill@icl.utk.edu>
|
||||
Aurщlien Bouteiller <bouteill@icl.utk.edu> <darter4.nics.utk.edu>
|
||||
|
35
AUTHORS
35
AUTHORS
@ -8,6 +8,8 @@ Github.com pull request). Note that these email addresses are not
|
||||
guaranteed to be current; they are simply a unique indicator of the
|
||||
individual who committed them.
|
||||
|
||||
-----
|
||||
|
||||
Abhishek Joshi, Broadcom
|
||||
abhishek.joshi@broadcom.com
|
||||
Abhishek Kulkarni, Indiana University
|
||||
@ -31,7 +33,6 @@ Anandhi S Jayakumar, Intel
|
||||
Andreas Knüpfer, Technische Universitaet Dresden
|
||||
andreas.knuepfer@tu-dresden.de
|
||||
Andrew Friedley, Indiana University, Sandia National Laboratory, Intel
|
||||
afriedle-intel@users.noreply.github.com
|
||||
afriedle@osl.iu.edu
|
||||
andrew.friedley@intel.com
|
||||
Andrew Lumsdaine, Indiana University
|
||||
@ -42,7 +43,7 @@ Anya Tatashina, Sun
|
||||
anya.tatashina@sun.com
|
||||
Artem Polyakov, Individual, Mellanox
|
||||
artpol84@gmail.com
|
||||
Aurélien Bouteiller, University of Tennessee-Knoxville
|
||||
Aurщlien Bouteiller, University of Tennessee-Knoxville
|
||||
bouteill@icl.utk.edu
|
||||
darter4.nics.utk.edu
|
||||
Avneesh Pant, QLogic
|
||||
@ -51,6 +52,8 @@ Bert Wesarg, Technische Universitaet Dresden
|
||||
bert.wesarg@tu-dresden.de
|
||||
Bill D'Amico, Cisco
|
||||
bdamico@cisco.com
|
||||
Boris Karasev, Mellanox
|
||||
karasev.b@gmail.com
|
||||
Brad Benton, IBM, AMD
|
||||
brad.benton@us.ibm.com
|
||||
Brad Penoff, University of British Columbia
|
||||
@ -58,7 +61,7 @@ Brad Penoff, University of British Columbia
|
||||
Brian Barrett, Indiana University, Los Alamos National Laboratory, Sandia National Laboratory
|
||||
brbarret@open-mpi.org
|
||||
Brice Goglin, INRIA
|
||||
Brice.Goglin@inria.fr
|
||||
brice.goglin@inria.fr
|
||||
Camille Coti, University of Tennessee-Knoxville, INRIA
|
||||
ccoti@icl.utk.edu
|
||||
Christian Bell, QLogic
|
||||
@ -79,7 +82,6 @@ David Daniel, Los Alamos National Laboratory
|
||||
Denis Dimick, Los Alamos National Laboratory
|
||||
dgdimick@lnal.gov
|
||||
Devendar Bureddy, Mellanox
|
||||
bureddy@users.noreply.github.com
|
||||
devendar@mellanox.com
|
||||
Dimitar Pashov, Individual
|
||||
d.pashov@gmail.com
|
||||
@ -87,13 +89,11 @@ Donald Kerr, Sun, Oracle
|
||||
donald.kerr@oracle.com
|
||||
Doron Shoham, Mellanox
|
||||
dorons@mellanox.com
|
||||
Edagr Gabriel, High Performance Computing Center, Stuttgart, University of Tennessee-Knoxville, University of Houston
|
||||
gabriel@Peggys-MacBook-Air.local
|
||||
edgargabriel@users.noreply.github.com
|
||||
Edgar Gabriel, High Performance Computing Center, Stuttgart, University of Tennessee-Knoxville, University of Houston
|
||||
gabriel@cs.uh.edu
|
||||
Elena Elkina, Mellanox
|
||||
elena.elkina@itseez.com
|
||||
elena.elkina89@gmail.com
|
||||
elena.elkina@itseez.com
|
||||
Ethan Mallove, Sun, Oracle
|
||||
ethan.mallove@oracle.com
|
||||
Eugene Loh, Sun, Oracle
|
||||
@ -112,9 +112,7 @@ Geoffrey Paulsen, IBM
|
||||
George Bosilca, University of Tennessee-Knoxville
|
||||
bosilca@eecs.utk.edu
|
||||
bosilca@icl.utk.edu
|
||||
bosilca@users.noreply.github.com
|
||||
Gilles Gouaillardet, Research Organization for Information Science and Technology
|
||||
ggouaillardet@users.noreply.github.com
|
||||
gilles.gouaillardet@iferc.org
|
||||
gilles@rist.or.jp
|
||||
Ginger Young, Los Alamos National Laboratory
|
||||
@ -136,7 +134,6 @@ Hadi Montakhabi, University of Houston
|
||||
Howard Pritchard, Los Alamos National Laboratory
|
||||
howardp@lanl.gov
|
||||
hppritcha@gmail.com
|
||||
hppritcha@users.noreply.github.com
|
||||
Iain Bason, Sun, Oracle
|
||||
iain.bason@oracle.com
|
||||
Igor Ivanov, Mellanox
|
||||
@ -147,7 +144,6 @@ Igor Usarov, Mellanox
|
||||
Jeff Squyres, University of Indiana, Cisco
|
||||
jeff@squyres.com
|
||||
jsquyres@cisco.com
|
||||
jsquyres@users.noreply.github.com
|
||||
Jelena Pjesivac-Grbovic, University of Tennessee-Knoxville
|
||||
pjesa@icl.iu.edu
|
||||
Jithin Jose, Intel
|
||||
@ -174,6 +170,8 @@ Kenneth Matney, Oak Ridge National Laboratory
|
||||
matneykdsr@ornl.gov
|
||||
L. R. Rajeshnarayanan, Intel
|
||||
l.r.rajeshnarayanan@intel.com
|
||||
LANL OMPI Bot, Los Alamos National Laboratory
|
||||
openmpihpp@gmail.com
|
||||
Laura Casswell, Los Alamos National Laboratory
|
||||
lcasswell@lanl.gov
|
||||
Lenny Verkhovsky, Volataine
|
||||
@ -197,7 +195,6 @@ Mark Taylor, Los Alamos National Laboratory
|
||||
mt@lanl.gov
|
||||
Matias A Cabral, Intel
|
||||
matias.a.cabral@intel.com
|
||||
matcabral@users.noreply.github.com
|
||||
Matthias Jurenz, Technische Universitaet Dresden
|
||||
matthias.jurenz@tu-dresden.de
|
||||
Maximilien Levesque, Individual
|
||||
@ -209,10 +206,10 @@ Mitch Sukalski, Sandia National Laboratory
|
||||
Mohamad Chaarawi, University of Houston
|
||||
mschaara@cs.uh.edu
|
||||
Nadezhda Kogteva, Mellanox
|
||||
nadezhda@mngx-orion-01.dmz.e2e.mlnx
|
||||
nadezhda.kogteva@itseez.com
|
||||
nadezhda@mngx-orion-01.dmz.e2e.mlnx
|
||||
Nadia Derbey, Bull
|
||||
Nadia.Derbey@bull.net
|
||||
nadia.derbey@bull.net
|
||||
Nathan Hjelm, Los Alamos National Laboratory
|
||||
hjelmn@cs.unm.edu
|
||||
hjelmn@lanl.gov
|
||||
@ -222,6 +219,8 @@ Nathaniel Graham, Los Alamos National Laboratory
|
||||
nrgraham23@gmail.com
|
||||
Nick Papior Andersen, Individual
|
||||
nickpapior@gmail.com
|
||||
Nicolas Chevalier, Bull
|
||||
nicolas.chevalier@bull.net
|
||||
Nysal Jan K A, IBM
|
||||
jnysal@gmail.com
|
||||
jnysal@in.ibm.com
|
||||
@ -231,11 +230,12 @@ Oscar Vega-Gisbert, Universitat Politecnica de Valencia
|
||||
ovega@dsic.upv.es
|
||||
Pak Lui, Sun
|
||||
pak.lui@sun.com
|
||||
Pascal Deveze, Bull
|
||||
pascal.deveze@atos.net
|
||||
Patrick Geoffray, Myricom
|
||||
patrick@myri.com
|
||||
Pavel Shamis, Mellanox, Oak Ridge National Laboratory
|
||||
shamisp@ornl.gov
|
||||
shamisp@users.noreply.github.com
|
||||
Pierre Lemarinier, University of Tennessee-Knoxville
|
||||
lemarini@icl.utk.edu
|
||||
Piotr Lesnicki, Bull
|
||||
@ -248,7 +248,6 @@ Rainer Keller, High Performance Computing Center, Stuttgart, Oak Ridge National
|
||||
rainer.keller@hft-stuttgart.de
|
||||
rainer.keller@hlrs.de
|
||||
Ralph Castain, Los Alamos National Laboratory, Cisco, Greenplum, Intel
|
||||
rhc@odin.cs.indiana.edu
|
||||
rhc@open-mpi.org
|
||||
Reese Faucette, Cisco
|
||||
rfaucett@cisco.com
|
||||
@ -307,7 +306,6 @@ Tim Woodall, Los Alamos National Laboratory
|
||||
Todd Kordenbrock, Sandia National Laboratory
|
||||
thkgcode@gmail.com
|
||||
thkorde@sandia.gov
|
||||
tkordenbrock@users.noreply.github.com
|
||||
Tom Naughton, Oak Ridge National Laboratory
|
||||
naughtont@ornl.gov
|
||||
Tomislav Janjusic, Mellanox
|
||||
@ -333,7 +331,6 @@ Yael Dayan, Mellanox
|
||||
Yevgeny Kliteynik, Mellanox
|
||||
kliteyn@mellanox.co.il
|
||||
Yohann Burette, Intel
|
||||
yburette@users.noreply.github.com
|
||||
yohann.burette@intel.com
|
||||
Yossi Itigin, Mellanox
|
||||
yosefe@mellanox.com
|
||||
|
259
contrib/dist/make-authors.pl
поставляемый
259
contrib/dist/make-authors.pl
поставляемый
@ -1,9 +1,10 @@
|
||||
#!/usr/bin/env perl
|
||||
#
|
||||
# Copyright (c) 2008 Cisco Systems, Inc. All rights reserved.
|
||||
# Copyright (c) 2008-2016 Cisco Systems, Inc. All rights reserved.
|
||||
#
|
||||
|
||||
use strict;
|
||||
|
||||
use Data::Dumper;
|
||||
|
||||
# Ensure that we're in the root of a writeable Git clone
|
||||
@ -14,149 +15,213 @@ $in_git_clone = 0
|
||||
|
||||
######################################################################
|
||||
|
||||
my $header_sep = "-----";
|
||||
my $unknown_org = "********* NO ORGANIZATION SET ********";
|
||||
|
||||
my $people;
|
||||
|
||||
######################################################################
|
||||
|
||||
# Run git log to get a list of committers
|
||||
|
||||
my $committers;
|
||||
open (GIT, "git log --pretty=format:%ae|") || die "Can't run 'git log'.";
|
||||
open (GIT, "git log --format=tformat:'%aN <%aE>'|") || die "Can't run 'git log'.";
|
||||
while (<GIT>) {
|
||||
chomp;
|
||||
m/^\s*([\S]+)\s*$/;
|
||||
m/^\s*(.+)\s+<(.+)>\s*$/;
|
||||
|
||||
if (!exists($committers->{$1})) {
|
||||
$committers->{$1} = { };
|
||||
print "Found Git commit email: $1\n";
|
||||
if (!exists($people->{$1})) {
|
||||
# The person doesn't exist, so save a new entry
|
||||
$people->{$1} = {
|
||||
name => $1,
|
||||
org => $unknown_org,
|
||||
emails => {
|
||||
lc($2) => 1,
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
print "Found Git committer: $1 <$2>\n";
|
||||
} else {
|
||||
# The person already exists, so just add (or overwrite) this
|
||||
# email address
|
||||
$people->{$1}->{emails}->{$2} = 1;
|
||||
}
|
||||
}
|
||||
close(GIT);
|
||||
|
||||
# Read the existing AUTHORS file to get the header, footer, and Git
|
||||
# email ID -> (gecos, affiliation) mappings.
|
||||
######################################################################
|
||||
|
||||
# Read the existing AUTHORS file
|
||||
|
||||
my $header;
|
||||
my $footer;
|
||||
|
||||
print "Matching Git emails to existing names/affiliations...\n";
|
||||
|
||||
sub save {
|
||||
my $current = shift;
|
||||
|
||||
print "Saving person from AUTHORS: $current->{name}\n";
|
||||
|
||||
# We may overwrite an entry written from the git log, but that's
|
||||
# ok
|
||||
$people->{$current->{name}} = $current;
|
||||
}
|
||||
|
||||
open (AUTHORS, "AUTHORS") || die "Can't open AUTHORS file";
|
||||
my $in_header = 1;
|
||||
my $in_footer = 0;
|
||||
my $current = undef;
|
||||
while (<AUTHORS>) {
|
||||
chomp;
|
||||
my $line = $_;
|
||||
|
||||
# Slurp down header lines until we hit a line that begins with an
|
||||
# Git email
|
||||
# Slurp down header lines until we hit a line that begins with
|
||||
# $header_sep
|
||||
if ($in_header) {
|
||||
foreach my $git_email (keys(%{$committers})) {
|
||||
if ($line =~ /$git_email\s+/) {
|
||||
$in_header = 0;
|
||||
}
|
||||
}
|
||||
if ($in_header) {
|
||||
$header .= "$_\n";
|
||||
$header .= "$line\n";
|
||||
|
||||
if ($_ =~ /^$header_sep/) {
|
||||
$in_header = 0;
|
||||
|
||||
# There should be a blank line after this, too
|
||||
$header .= "\n";
|
||||
}
|
||||
next;
|
||||
}
|
||||
|
||||
# If we're in the body, parse to get the existing Git emails, gecos,
|
||||
# and affiliations
|
||||
if (!$in_header && !$in_footer) {
|
||||
# Skip blank lines
|
||||
next
|
||||
if ($line =~ /^\s*$/);
|
||||
|
||||
# Make sure we have a line that begins with an Git email;
|
||||
# otherwise, fall through to the footer.
|
||||
my $found = undef;
|
||||
my $git_email;
|
||||
foreach $git_email (keys(%{$committers})) {
|
||||
if ($line =~ /$git_email\s+/) {
|
||||
$found = $git_email;
|
||||
last;
|
||||
}
|
||||
}
|
||||
if (!$found) {
|
||||
$in_footer = 1;
|
||||
# Format of body:
|
||||
#
|
||||
# NAME, Affiliation 1[, Affiliation 2[...]]
|
||||
# Email address 1
|
||||
# [Email address 2]
|
||||
# [...]
|
||||
# NAME, Affiliation 1[, Affiliation 2[...]]
|
||||
# Email address 1
|
||||
# [Email address 2]
|
||||
# [...]
|
||||
|
||||
# Found a new email address for an existing person
|
||||
if ($line =~ /^ /) {
|
||||
m/^ (.+)$/;
|
||||
$current->{emails}->{lc($1)} = 1;
|
||||
|
||||
next;
|
||||
} else {
|
||||
# Found a new person; save the old entry
|
||||
save($current)
|
||||
if (defined($current));
|
||||
|
||||
$current = undef;
|
||||
$current->{org} = $unknown_org;
|
||||
if ($line =~ m/^(.+?),\s+(.+)$/) {
|
||||
$current->{name} = $1;
|
||||
$current->{org} = $2;
|
||||
} else {
|
||||
$line =~ m/^$found\s+(.+?)\s{2,}(.+)$/;
|
||||
my $gecos = $1;
|
||||
my $aff = $2;
|
||||
|
||||
if ($gecos =~ /^\s+$/) {
|
||||
$gecos = "<UNKNOWN>";
|
||||
} else {
|
||||
$committers->{$found}->{gecos} = $gecos;
|
||||
}
|
||||
if ($aff =~ /^\s+$/) {
|
||||
$aff = "<UNKNOWN>";
|
||||
} else {
|
||||
$committers->{$found}->{affiliation} = $aff;
|
||||
}
|
||||
print "Git email $found matches: $gecos / $aff\n";
|
||||
$current->{name} = $line;
|
||||
}
|
||||
}
|
||||
|
||||
# If we're in the footer, just save all the lines
|
||||
if ($in_footer) {
|
||||
$footer .= "$_\n";
|
||||
next;
|
||||
}
|
||||
}
|
||||
|
||||
save($current)
|
||||
if (defined($current));
|
||||
|
||||
close(AUTHORS);
|
||||
|
||||
# Figure out the 3 column widths. The last line of the header
|
||||
# contains -'s for each of the columns.
|
||||
######################################################################
|
||||
|
||||
$header =~ m/\n([\-\s]+?)$/m;
|
||||
my $div_line = $1;
|
||||
my @divs = split(/ /, $div_line);
|
||||
my $id_col = length($divs[0]);
|
||||
my $gecos_col = length($divs[1]);
|
||||
my $aff_col = length($divs[2]);
|
||||
# Output a new AUTHORS file
|
||||
|
||||
# Print out a new AUTHORS file
|
||||
open (AUTHORS, ">AUTHORS.new") || die "Can't write to AUTHORS file";
|
||||
|
||||
print AUTHORS $header;
|
||||
my $i;
|
||||
my $have_unknowns = 0;
|
||||
foreach my $git_email (sort(keys(%${committers}))) {
|
||||
# Skip the automated accounts
|
||||
next
|
||||
if ($git_email eq "no-author\@open-mpi.org" ||
|
||||
$git_email eq "mpiteam\@open-mpi.org");
|
||||
|
||||
print AUTHORS $git_email;
|
||||
$i = length($git_email);
|
||||
while ($i <= $id_col) {
|
||||
print AUTHORS ' ';
|
||||
++$i;
|
||||
}
|
||||
my @people_with_unknown_orgs;
|
||||
my $email_dups;
|
||||
|
||||
# if we have gecos/affiliation, print them. Otherwise, just end
|
||||
# the line here
|
||||
if ((exists($committers->{$git_email}->{gecos}) &&
|
||||
$committers->{$git_email}->{gecos} !~ /^\s+$/) ||
|
||||
(exists($committers->{$git_email}->{affiliation}) &&
|
||||
$committers->{$git_email}->{affiliation} !~ /^\s+$/)) {
|
||||
print AUTHORS $committers->{$git_email}->{gecos};
|
||||
$i = length($committers->{$git_email}->{gecos});
|
||||
while ($i <= $gecos_col) {
|
||||
print AUTHORS ' ';
|
||||
++$i;
|
||||
}
|
||||
my @sorted_people = sort(keys(%{$people}));
|
||||
foreach my $p (@sorted_people) {
|
||||
print AUTHORS $p;
|
||||
if (exists($people->{$p}->{org})) {
|
||||
print AUTHORS ", $people->{$p}->{org}";
|
||||
|
||||
print AUTHORS $committers->{$git_email}->{affiliation}
|
||||
if (exists($committers->{$git_email}->{affiliation}));
|
||||
} else {
|
||||
$have_unknowns = 1;
|
||||
# Record this so that we can warn about it
|
||||
push(@people_with_unknown_orgs, $p)
|
||||
if ($people->{$p}->{org} eq $unknown_org);
|
||||
}
|
||||
print AUTHORS "\n";
|
||||
|
||||
foreach my $e (sort(keys(%{$people->{$p}->{emails}}))) {
|
||||
# Sanity check: make sure this email address does not show up
|
||||
# with any other person/name
|
||||
my $dup;
|
||||
foreach my $p2 (@sorted_people) {
|
||||
next
|
||||
if ($p eq $p2);
|
||||
|
||||
foreach my $e2 (keys(%{$people->{$p2}->{emails}})) {
|
||||
if ($e eq $e2) {
|
||||
$dup = $p2;
|
||||
|
||||
# Record this so that we can warn about it
|
||||
if ($p le $p2) {
|
||||
$email_dups->{$p} = $p2;
|
||||
} else {
|
||||
$email_dups->{$p2} = $p;
|
||||
}
|
||||
last;
|
||||
}
|
||||
}
|
||||
|
||||
last
|
||||
if (defined($dup));
|
||||
}
|
||||
|
||||
print AUTHORS " $e";
|
||||
print AUTHORS " (**** DUPLICATE EMAIL ADDRESS WITH $dup ***)"
|
||||
if (defined($dup));
|
||||
print AUTHORS "\n";
|
||||
}
|
||||
}
|
||||
print AUTHORS $footer;
|
||||
close(AUTHORS);
|
||||
|
||||
# We have a new AUTHORS file! Replace the old one.
|
||||
unlink("AUTHORS");
|
||||
rename("AUTHORS.new", "AUTHORS");
|
||||
|
||||
print "New AUTHORS file written.\n";
|
||||
if ($have_unknowns) {
|
||||
print "*** WARNING: There were Git committers with unknown real names and/or\n*** affiliations. You *MUST* edit the AUTHORS file to fill them in!\n";
|
||||
} else {
|
||||
print "All Git emails were matched! No need to hand-edit the AUTHORS file.\n";
|
||||
|
||||
######################################################################
|
||||
|
||||
# Output any relevant warnings
|
||||
|
||||
my $warned = 0;
|
||||
if ($#people_with_unknown_orgs >= 0) {
|
||||
$warned = 1;
|
||||
print "\n*** WARNING: The following people have unspecified organiations:\n";
|
||||
foreach my $p (@people_with_unknown_orgs) {
|
||||
print "*** $p\n";
|
||||
}
|
||||
}
|
||||
|
||||
my @k = sort(keys(%{$email_dups}));
|
||||
if ($#k >= 0) {
|
||||
$warned = 1;
|
||||
print "\n*** WARNING: The following people had the same email address:\n";
|
||||
foreach my $p (@k) {
|
||||
print "*** $p, $email_dups->{$p}\n";
|
||||
}
|
||||
}
|
||||
|
||||
if ($warned) {
|
||||
print "
|
||||
*******************************************************************************
|
||||
*** YOU SHOULD EDIT THE .mailmap AND/OR AUTHORS FILE TO RESOLVE THESE WARNINGS!
|
||||
*******************************************************************************\n";
|
||||
}
|
||||
|
||||
exit($warned);
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user