Changeset View
Changeset View
Standalone View
Standalone View
relicensecheck.pl
Show First 20 Lines • Show All 406 Lines • ▼ Show 20 Line(s) | 381 | my %secondary_mail_addresses = ( | |||
---|---|---|---|---|---|
407 | 'thb@net-bembel.de' => 'tbaumgart', | 407 | 'thb@net-bembel.de' => 'tbaumgart', | ||
408 | 'trev@adblockplus.org' => 'palant', | 408 | 'trev@adblockplus.org' => 'palant', | ||
409 | 'tsdgeos@terra.es' => 'aacid', | 409 | 'tsdgeos@terra.es' => 'aacid', | ||
410 | ); | 410 | ); | ||
411 | 411 | | |||
412 | my %ruletable; | 412 | my %ruletable; | ||
413 | my %blacklist; | 413 | my %blacklist; | ||
414 | my %whitelist; | 414 | my %whitelist; | ||
415 | my %unknown_authors; | ||||
svuorela: This is a map. shouldn't an array (@unknown_authors) be used here? | |||||
415 | my @blacklist_revs; | 416 | my @blacklist_revs; | ||
416 | 417 | | |||
417 | foreach my $who (keys %old_license_table) { | 418 | foreach my $who (keys %old_license_table) { | ||
418 | die "$who in both tables" if defined $license_table{$who}; | 419 | die "$who in both tables" if defined $license_table{$who}; | ||
419 | $license_table{$who} = $old_license_table{$who}; | 420 | $license_table{$who} = $old_license_table{$who}; | ||
420 | } | 421 | } | ||
421 | 422 | | |||
422 | foreach my $who (keys %old_license_table_2) { | 423 | foreach my $who (keys %old_license_table_2) { | ||
▲ Show 20 Lines • Show All 57 Lines • ▼ Show 20 Line(s) | |||||
480 | sub resolveEmail($) { | 481 | sub resolveEmail($) { | ||
481 | my ($email) = @_; | 482 | my ($email) = @_; | ||
482 | 483 | | |||
483 | my $resolved = $authors{$email}; | 484 | my $resolved = $authors{$email}; | ||
484 | if (not defined $resolved) { | 485 | if (not defined $resolved) { | ||
485 | $resolved = $secondary_mail_addresses{$email}; | 486 | $resolved = $secondary_mail_addresses{$email}; | ||
486 | } | 487 | } | ||
487 | if (not defined $resolved) { | 488 | if (not defined $resolved) { | ||
488 | die "Could not find $email in $accountfile\n"; | 489 | $unknown_authors{$email} = 1; | ||
svuorela: push (@unknown_authors, $email) | |||||
489 | return $email; | 490 | return $email; | ||
490 | } | 491 | } | ||
491 | return $resolved; | 492 | return $resolved; | ||
492 | } | 493 | } | ||
493 | 494 | | |||
494 | sub skipCommitByAuthor($) { | 495 | sub skipCommitByAuthor($) { | ||
495 | my ($author) = @_; | 496 | my ($author) = @_; | ||
496 | return ($author eq "scripty" or | 497 | return ($author eq "scripty" or | ||
▲ Show 20 Lines • Show All 134 Lines • ▼ Show 20 Line(s) | 624 | while(<IN>) { | |||
631 | } else { | 632 | } else { | ||
632 | print STDERR "Parse error on git blame output: $_"; | 633 | print STDERR "Parse error on git blame output: $_"; | ||
633 | } | 634 | } | ||
634 | } | 635 | } | ||
635 | close(IN); | 636 | close(IN); | ||
636 | } | 637 | } | ||
637 | } | 638 | } | ||
638 | 639 | | |||
640 | if (%unknown_authors) { | ||||
641 | print "The following emails do not appear in the accounts file:\n\n"; | ||||
642 | foreach my $who(keys %unknown_authors) { | ||||
svuorela: foreach my $who (@unknown_authors) | |||||
643 | print "$who\n"; | ||||
644 | } | ||||
645 | print "\n"; | ||||
646 | } | ||||
647 | | ||||
639 | if (defined (keys %blacklist)) { | 648 | if (defined (keys %blacklist)) { | ||
640 | print "Need permission for licensing:\n\n"; | 649 | print "Need permission for licensing:\n\n"; | ||
641 | 650 | | |||
642 | my %stat; | 651 | my %stat; | ||
643 | 652 | | |||
644 | foreach my $license(keys %blacklist) { | 653 | foreach my $license(keys %blacklist) { | ||
645 | print "- $license: ". join(' ', (keys %{$blacklist{$license}})) . "\n"; | 654 | print "- $license: ". join(' ', (keys %{$blacklist{$license}})) . "\n"; | ||
646 | foreach my $who(keys %{$blacklist{$license}}) { | 655 | foreach my $who(keys %{$blacklist{$license}}) { | ||
Show All 29 Lines |
This is a map. shouldn't an array (@unknown_authors) be used here?