Fix a typo in libnautilus-private/apps_nautilus_preferences.schemas.in.
[nautilus.git] / check-THANKS.pl
blob2eb1b9696a792403b09fda2a26dfd8327233344c
1 #!/usr/bin/perl -w
2 # -*- Mode: perl; indent-tabs-mode: nil -*-
5 # Nautilus
7 # Copyright (C) 2000, 2001 Eazel, Inc.
9 # This library is free software; you can redistribute it and/or
10 # modify it under the terms of the GNU General Public License as
11 # published by the Free Software Foundation; either version 2 of the
12 # License, or (at your option) any later version.
14 # This library is distributed in the hope that it will be useful,
15 # but WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 # General Public License for more details.
19 # You should have received a copy of the GNU General Public License
20 # along with this library; if not, write to the Free Software
21 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
23 # Author: Maciej Stachowiak <mjs@eazel.com>
26 # check-THANKS.pl: Checks for users mentioned in one of the ChangeLogs
27 # but not in THANKS or AUTHORS; ensure that THANKS and AUTHORS do not
28 # overlap.
30 use diagnostics;
31 use strict;
33 # Map from alternate names of some users to canonical versions
35 my %name_map =
37 "Alexander Larsson" => "Alex Larsson",
38 "Darin as Andy" => "Darin Adler",
39 "Eskil Olsen" => "Eskil Heyn Olsen",
40 "J. Shane Culpepper" => "J Shane Culpepper",
41 "Jesus Bravo Alvarez" => "Jesús Bravo Álvarez",
42 "Michael Engber" => "Mike Engber",
43 "Michael K. Fleming" => "Mike Fleming",
44 "Pavel Císler" => "Pavel Cisler",
45 "Pavel" => "Pavel Cisler",
46 "Rebecka Schulman" => "Rebecca Schulman",
47 "Robin Slomkowski" => "Robin * Slomkowski",
48 "Shane Culpepper" => "J Shane Culpepper",
49 "Szabolcs BAN" => "Szabolcs Ban",
50 "Takuo KITAME" => "Takuo Kitame",
51 "arik devens" => "Arik Devens",
54 # Map from alternate email addresses of some users to canonical versions
56 my %email_map =
58 'alla@lysator.liu.se' => 'alexl@redhat.com',
59 'almer1@dds.nl' => 'almer@gnome.org',
60 'andersca@codefactory.se' => 'andersca@gnome.org',
61 'andersca@gnu.org' => 'andersca@gnome.org',
62 'andy@eazel.com' => 'andy@differnet.com',
63 'arik@gnome.org' => 'arik@eazel.com',
64 'at@ue-spacy.com' => 'tagoh@gnome.gr.jp',
65 'baulig@suse.de' => 'martin@home-of-linux.org',
66 'car0969@gamma2.uta.edu' => 'bratsche@gnome.org',
67 'carlos@gnome-db.org' => 'carlos@hispalinux.es',
68 'cgabriel@softwarelibero.org' => 'cgabriel@cgabriel.org',
69 'chief_wanker@eazel.com' => 'eskil@eazel.com',
70 'darin@eazel.com' => 'darin@bentspoon.com',
71 'dan@eazel.com' => 'd-mueth@uchicago.edu',
72 'hp@pobox.com' => 'hp@redhat.com',
73 'josh@eazel.com' => 'josh@whitecape.org',
74 'jrb@webwynk.net' => 'jrb@redhat.com',
75 'jsh@eazel.com' => 'jsh@pixelslut.com',
76 'kabalak@gmx.net' => 'kabalak@kabalak.net',
77 'kabalak@gtranslator.org' => 'kabalak@kabalak.net',
78 'kmaraas@gnu.org' => 'kmaraas@gnome.org',
79 'kmaraas@online.no' => 'kmaraas@gnome.org',
80 'linux@chrisime.de' => 'chrisime@gnome.org',
81 'linuxfan@ionet..net' => 'josh@whitecape.org',
82 'linuxfan@ionet.net' => 'josh@whitecape.org',
83 'mathieu@gnome.org' => 'mathieu@eazel.com',
84 'mathieu@gnu.org' => 'mathieu@eazel.com',
85 'mawa@iname.com' => 'mawarkus@gnome.org',
86 'mjs@eazel.com' => 'mjs@noisehavoc.org',
87 'ramiro@eazel.com' => 'ramiro@fateware.com',
88 'raph@gimp.org' => 'raph@acm.org',
89 'rslomkow@rslomkow.org' => 'rslomkow@eazel.com',
90 'seth@eazel.com' => 'snickell@stanford.edu',
91 'sopwith@eazel.com' => 'sopwith@redhat.com',
92 'yakk@yakk.net' => 'ian@eazel.com',
93 'yakk@yakk.net.au' => 'ian@eazel.com',
97 # Some ChangeLog lines that carry no credit (incorrect changes that
98 # had to be reverted, changes done for someone else, etc.)
100 my %no_credit =
102 '2000-09-08 Daniel Egger <egger@suse.de>' => 1,
103 '2000-09-06 Daniel Egger <egger@suse.de>' => 1,
104 '2001-04-25 Changwoo Ryu <cwryu@debian.org>' => 1,
108 open CHANGELOGS, "cat `find . -name intl -prune -or -name 'ChangeLog*' -and \! -name '*~' -print`|" or die;
110 my @lines;
111 while (<CHANGELOGS>)
113 chomp;
115 if (/@/)
117 next if $no_credit{$_};
119 if (/^\d\d\d\d-\d\d-\d\d/)
121 # Normal style ChangeLog comment
122 s/^\d\d\d\d-\d\d-\d\d[ \t]*//;
124 elsif (/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun).*\d\d\d\d/)
126 # Old style ChangeLog comment
127 s/^.*20\d\d\s*//;
129 elsif (/^\s+Patch from.+<\S+\@\S+>/i)
131 # Body of comment says 'Patch from', followed by name and email.
132 s/^\s+Patch from:?\s+//i;
134 else
136 next; # ignore unknown lines for now
139 my $name = $_;
141 $name =~ s/[ \t]*<.*[\n\r]*$//;
143 $name = $name_map{$name} if $name_map{$name};
145 my $email = $_;
147 $email =~ s/^.*<//;
148 $email =~ s/>.*$//;
149 $email =~ s/[ \t\n\r]*$//;
150 $email =~ s/helixcode/ximian/;
152 $email = $email_map{$email} if $email_map{$email};
154 push @lines, "${name} <${email}>";
158 close CHANGELOGS;
160 my @changelog_people;
161 my $last_line = "";
162 foreach my $line (sort @lines)
164 push @changelog_people, $line unless $line eq $last_line;
165 $last_line = $line;
168 open AUTHORS, "AUTHORS" or die;
170 my @authors;
172 while (<AUTHORS>) {
173 chomp;
174 push @authors, $_;
177 close AUTHORS;
179 open THANKS, "THANKS" or die;
181 my @thanks_people;
182 my @non_translation_thanks_people;
183 my $in_translations = 0;
185 while (<THANKS>) {
186 chomp;
187 s/ - .*$//;
188 push @thanks_people, $_;
189 $in_translations = 1 if /contributed translations/;
190 push @non_translation_thanks_people, $_ if !$in_translations;
193 close THANKS;
195 my $found_about_authors = 0;
196 my @about_authors;
198 if (open ABOUT, "src/nautilus-window-menus.c")
200 while (<ABOUT>)
202 if (/const char \*authors/)
204 $found_about_authors = 1;
205 last;
209 if ($found_about_authors)
211 while (<ABOUT>)
213 last unless /^\s+\"(.*)\",\s*\n/;
214 push @about_authors, $1;
218 close ABOUT;
221 my @uncredited;
222 foreach my $person (@changelog_people)
224 if (! (grep {$_ eq $person} @thanks_people) &&
225 ! (grep {$_ eq $person} @authors))
227 push @uncredited, $person;
231 my @double_credited;
232 foreach my $person (@authors)
234 if (grep {$_ eq $person} @non_translation_thanks_people)
236 push @double_credited, $person;
240 my @author_names;
241 foreach my $person (@authors)
243 $person =~ s/\s*<.*//;
244 push @author_names, $person;
247 my @not_in_about;
248 foreach my $person (@author_names)
250 push @not_in_about, $person unless grep {$_ eq $person} @about_authors;
253 my @only_in_about;
254 foreach my $person (@about_authors)
256 push @only_in_about, $person unless grep {$_ eq $person} @author_names;
259 my $printed = 0;
261 if (@uncredited)
263 print "\nThe following people are in the ChangeLog but not credited in THANKS or AUTHORS:\n\n";
265 foreach my $person (@uncredited)
267 print "${person}\n";
270 $printed = 1;
273 if (@double_credited)
275 print "\nThe following people are listed in both THANKS and AUTHORS:\n\n";
277 foreach my $person (@double_credited)
279 print "${person}\n";
282 $printed = 1;
283 } else {
285 if (!$found_about_authors)
287 print "\nDidn't find authors section in nautilus-window-menus.c\n";
288 $printed = 1;
291 if (@not_in_about)
293 print "\nThe following people are in AUTHORS but not the about screen:\n\n";
295 foreach my $person (@not_in_about)
297 print "${person}\n";
300 $printed = 1;
303 if (@only_in_about)
305 print "\nThe following people are in the about screen but not AUTHORS:\n\n";
307 foreach my $person (@only_in_about)
309 print "${person}\n";
312 $printed = 1;
317 print "\n" if $printed;