Removed executable flag from COPYING
[nautilus.git] / check-THANKS.pl
blobd2389b33a08a075c7663091853c3bd3190857aba
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 "T???=82??=B5ivo Leedj???=A2??=82??=ACrv" => "Tõivo Leedjärv",
38 "Tõivo Leedjärv" => "Tõivo Leedjärv",
39 "Sanlig adral" => "Sanlig Badral",
40 "Rahul Balerao" => "Rahul Bhalerao",
41 "Richard Hestilow" => "Rachel Hestilow",
42 "Martin Norback" => "Martin Norbäck",
43 "Martin Norb??ck" => "Martin Norbäck",
44 "Josep Puigdemont" => "Josep Puigdemont Casamajó",
45 "Josep Puigdemont i Casamajó" => "Josep Puigdemont Casamajó",
46 "?smund Skj?veland" => "Åsmund Skjæveland",
47 "Alexander Larsson" => "Alex Larsson",
48 "?ygimantas Beru?ka" => "Žygimantas Beručka",
49 "Beru?ka" => "Beručka",
50 "Carlos Perell?? Mar??n" => "Carlos Perelló Marín",
51 "Carlos Perello Marin" => "Carlos Perelló Marín",
52 "Carlos Perelló Marín" => "Carlos Perelló Marín",
53 "Ch4ristian Rose" => "Christian Rose",
54 "Danilo ? egan" => "Danilo Šegan",
55 "Danilo ?egan" => "Danilo Šegan",
56 "Danilo Å egan" => "Danilo Šegan",
57 "Darin as Andy" => "Darin Adler",
58 "Diego Gonzalez Gonzalez" => "Diego Gonzalez",
59 "Diego González" => "Diego Gonzalez",
60 "Eskil Olsen" => "Eskil Heyn Olsen",
61 "Gustavo Giráldez" => "Gustavo Giráldez",
62 "I?aki Larra?aga" => "Inaki Larranaga Murgoitio",
63 "Inaki Laranaga Murgoitio" => "Inaki Larranaga Murgoitio",
64 "Inaki Larranaga" => "Inaki Larranaga Murgoitio",
65 "J. Shane Culpepper" => "J Shane Culpepper",
66 "Jesus Bravo Alvarez" => "Jesús Bravo Álvarez",
67 "M?tin ?mirov" => "Mətin Əmirov",
68 "Michael Engber" => "Mike Engber",
69 "Michael K. Fleming" => "Mike Fleming",
70 "Pavel Císler" => "Pavel Cisler",
71 "Pavel" => "Pavel Cisler",
72 "Rebecka Schulman" => "Rebecca Schulman",
73 "Robin Slomkowski" => "Robin * Slomkowski",
74 "Shane Culpepper" => "J Shane Culpepper",
75 "Szabolcs BAN" => "Szabolcs Ban",
76 "Takuo KITAME" => "Takuo Kitame",
77 "Matic Zgur" => "Matic Žgur",
78 "Nelson Benitez" => "Nelson Benítez",
79 "arik devens" => "Arik Devens",
80 "Samúel Jón Gunnarsson" => "Samuel Jan Gunnarsson",
81 "Sam?=BAel J?=B3n Gunnarsson" => "Samuel Jan Gunnarsson",
82 "Sam?el J?n Gunnarsson" => "Samuel Jan Gunnarsson",
83 "Soeren Sandmann Pedersen" => "Soeren Sandmann",
84 "Soren Sandmann" => "Soeren Sandmann",
85 "Takeshi AiHANA" => "Takeshi AIHANA",
86 "Miguel Rodríguez Pérez" => "Rodriguez Perez"
89 # Map from alternate email addresses of some users to canonical versions
91 my %email_map =
93 'uws+gnome@xs4all.nl' => 'wbolster@gnome.org',
94 'wbolster@cvs.gnome.org' => 'wbolster@gnome.org',
95 'wbolster@svn.gnome.org' => 'wbolster@gnome.org',
96 'randrianiriana@gmaial.com' => 'thierryr@svn.gnome.org',
97 'thierry@randrianiriana.org' => 'thierryr@svn.gnome.org',
98 'thierryR@svn.gnome.org' => 'thierryr@svn.gnome.org',
99 'aihana@gnome.gr.jp' => 'takeshi.aihana@gmail.com',
100 'takehsi.aihana@gmail.com' => 'takeshi.aihana@gmail.com',
101 'sunil@atc.tcs.com' => 'sunilmohan@fsf.org.in',
102 'sunil@atc.tcs.co.in' => 'sunilmohan@fsf.org.in',
103 'ssp@localhost.localdomain' => 'sandmann@redhat.com',
104 'rozobeh@sharif.edu' => 'roozbeh@farsiweb.info',
105 'runa@bengalinux.org' => 'runabh@gmail.com',
106 'rajeshkajha@yahoo.com' => 'rranjan@redhat.com',
107 'amd@store20.com' => 'plaes@svn.gnome.org',
108 'gforcada@svn.gnome.org' => 'gforcada@gnome.org',
109 'bpepple@fedoraproject.org' => 'bdpepple@gmail.com',
110 'yaihr@gmail.com' => 'yairhr@gmail.com',
111 'chyla@buy.pl' => 'chyla@gnome.pl',
112 'mail@zbigniew.chyla.pl' => 'chyla@gnome.pl',
113 'uid0@tuxfamily.org' => 'zygis@gnome.org',
114 'uid0@akl.lt' => 'zygis@gnome.org',
115 'sandmann@daimi.au.dk' => 'sandmann@redhat.com',
116 'badral@chinggis.com' => 'Badral@openmn.org',
117 'badral@users.sf.net' => 'Badral@openmn.org',
118 'badral@chinggis.com' => 'Badral@openmn.org',
119 'ptvirtan@cc.hut.fi' => 'pauli.virtanen@hut.fi',
120 'pauli.virtanen@saunalahti.fi' => 'pauli.virtanen@hut.fi',
121 'frolix68@yahoo.gr' => 'nikosx@gmail.com',
122 'mdamt@mnots.eu' => 'mdamt@gnome.org',
123 'mvd@mylinux.ua' => 'dziumanenko@gmail.com',
124 'martin.wehner@epost.de' => 'martin.wehner@gmail.com',
125 'josep@imatge-sintetica.com' => 'josep.puigdemont@gmail.com',
126 'laca@ireland.sun.com' => 'laca@sun.com',
127 'Louise.Miller@ireland.sun.com' => 'louise.miller@sun.com',
128 'dooteo@zundan.com' => 'dooteo@euskalgnu.org',
129 'doteo@euskalgnu.org' => 'dooteo@euskalgnu.org',
130 'ihar.hrachyshka@gmail.com' => 'booxter@lacinka.org',
131 'iharh@gnome.org' => 'booxter@lacinka.org',
132 'ifelix@svn.gnome.org' => 'ifelix25@gmail.com',
133 'hendi@gnome-de.org' => 'hendrikr@gnome.org',
134 'dave@ximian.com' => 'dave@novell.com',
135 'dcamp@novell.com' => 'dave@novell.com',
136 'davidz@redhat.com' => 'david@fubar.dk',
137 'dggonz@yahoo.com' => 'diego@pemas.net',
138 'cyphra@nano.tecknolabs.com' => 'serrador@openshine.com',
139 'dsegan@gmx.net' => 'danilo@gnome.org',
140 'cosimoc@svn.gnome.org' => 'cosimoc@gnome.org',
141 'chpe@cvs.gnome.org' => 'chpe@gnome.org',
142 'chpe@svn.gnome.org' => 'chpe@gnome.org',
143 'aflinta@svn.gnome.org' => 'aflinta@gmail.com',
144 'peter.ani@hotmail.com' => 'peter.ani@gmail.com',
145 'abel@oaka.org' => 'abelcheung@gmail.com',
146 'maddog@linux.org.hk' => 'abelcheung@gmail.com',
147 'alla@lysator.liu.se' => 'alexl@redhat.com',
148 'almer1@dds.nl' => 'almer@gnome.org',
149 'andersca@codefactory.se' => 'andersca@gnome.org',
150 'andersca@gnu.org' => 'andersca@gnome.org',
151 'andy@eazel.com' => 'andy@differnet.com',
152 'arik@gnome.org' => 'arik@eazel.com',
153 'at@ue-spacy.com' => 'tagoh@gnome.gr.jp',
154 'baulig@suse.de' => 'martin@home-of-linux.org',
155 'car0969@gamma2.uta.edu' => 'bratsche@gnome.org',
156 'carlos@gnome-db.org' => 'carlos@hispalinux.es',
157 'cgabriel@softwarelibero.org' => 'cgabriel@cgabriel.org',
158 'chief_wanker@eazel.com' => 'eskil@eazel.com',
159 'darin@eazel.com' => 'darin@bentspoon.com',
160 'dan@eazel.com' => 'd-mueth@uchicago.edu',
161 'hp@pobox.com' => 'hp@redhat.com',
162 'josh@eazel.com' => 'josh@whitecape.org',
163 'jrb@webwynk.net' => 'jrb@redhat.com',
164 'jsh@eazel.com' => 'jsh@pixelslut.com',
165 'kabalak@gmx.net' => 'kabalak@kabalak.net',
166 'kabalak@gtranslator.org' => 'kabalak@kabalak.net',
167 'kmaraas@gnu.org' => 'kmaraas@gnome.org',
168 'kmaraas@online.no' => 'kmaraas@gnome.org',
169 'linux@chrisime.de' => 'chrisime@gnome.org',
170 'linuxfan@ionet..net' => 'josh@whitecape.org',
171 'linuxfan@ionet.net' => 'josh@whitecape.org',
172 'mathieu@gnome.org' => 'mathieu@eazel.com',
173 'mathieu@gnu.org' => 'mathieu@eazel.com',
174 'mawa@iname.com' => 'mawarkus@gnome.org',
175 'mjs@eazel.com' => 'mjs@noisehavoc.org',
176 'ramiro@eazel.com' => 'ramiro@fateware.com',
177 'raph@gimp.org' => 'raph@acm.org',
178 'rslomkow@rslomkow.org' => 'rslomkow@eazel.com',
179 'seth@eazel.com' => 'snickell@stanford.edu',
180 'sopwith@eazel.com' => 'sopwith@redhat.com',
181 'yakk@yakk.net' => 'ian@eazel.com',
182 'yakk@yakk.net.au' => 'ian@eazel.com',
183 'alexl@cgf.boston.redhat.com' => 'alexl@redhat.com',
184 'alexl@redhat.co,' => 'alexl@redhat.com',
185 'alexl@redhat' => 'alexl@redhat.com'
189 # Some ChangeLog lines that carry no credit (incorrect changes that
190 # had to be reverted, changes done for someone else, etc.)
192 my %no_credit =
194 '2000-09-08 Daniel Egger <egger@suse.de>' => 1,
195 '2000-09-06 Daniel Egger <egger@suse.de>' => 1,
196 '2001-04-25 Changwoo Ryu <cwryu@debian.org>' => 1,
200 open CHANGELOGS, "cat `find . -name intl -prune -or -name 'ChangeLog*' -and \! -name '*~' -print`|" or die;
202 my @lines;
203 while (<CHANGELOGS>)
205 chomp;
207 if (/@/)
209 next if $no_credit{$_};
211 if (/^\d\d\d\d-\d\d-\d\d/)
213 # Normal style ChangeLog comment
214 s/^\d\d\d\d-\d\d-\d\d[ \t]*//;
216 elsif (/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun).*\d\d\d\d/)
218 # Old style ChangeLog comment
219 s/^.*20\d\d\s*//;
221 elsif (/^\s+Patch from.+<\S+\@\S+>/i)
223 # Body of comment says 'Patch from', followed by name and email.
224 s/^\s+Patch from:?\s+//i;
226 else
228 next; # ignore unknown lines for now
231 my $name = $_;
233 $name =~ s/[ \t]*<.*[\n\r]*$//;
235 $name = $name_map{$name} if $name_map{$name};
237 my $email = $_;
239 $email =~ s/^.*<//;
240 $email =~ s/>.*$//;
241 $email =~ s/[ \t\n\r]*$//;
242 $email =~ s/helixcode/ximian/;
244 $email = $email_map{$email} if $email_map{$email};
246 push @lines, "${name} <${email}>";
250 close CHANGELOGS;
252 my @changelog_people;
253 my $last_line = "";
254 foreach my $line (sort @lines)
256 push @changelog_people, $line unless $line eq $last_line;
257 $last_line = $line;
260 open AUTHORS, "AUTHORS" or die;
262 my @authors;
264 while (<AUTHORS>) {
265 chomp;
266 push @authors, $_;
269 close AUTHORS;
271 open THANKS, "THANKS" or die;
273 my @thanks_people;
274 my @non_translation_thanks_people;
275 my $in_translations = 0;
277 while (<THANKS>) {
278 chomp;
279 s/ - .*$//;
280 push @thanks_people, $_;
281 $in_translations = 1 if /contributed translations/;
282 push @non_translation_thanks_people, $_ if !$in_translations;
285 close THANKS;
287 my $found_about_authors = 0;
288 my @about_authors;
290 if (open ABOUT, "src/nautilus-window-menus.c")
292 while (<ABOUT>)
294 if (/const char \*authors/)
296 $found_about_authors = 1;
297 last;
301 if ($found_about_authors)
303 while (<ABOUT>)
305 last unless /^\s+\"(.*)\",\s*\n/;
306 push @about_authors, $1;
310 close ABOUT;
313 my @uncredited;
314 foreach my $person (@changelog_people)
316 if (! (grep {$_ eq $person} @thanks_people) &&
317 ! (grep {$_ eq $person} @authors))
319 push @uncredited, $person;
323 my @double_credited;
324 foreach my $person (@authors)
326 if (grep {$_ eq $person} @non_translation_thanks_people)
328 push @double_credited, $person;
332 my @author_names;
333 foreach my $person (@authors)
335 $person =~ s/\s*<.*//;
336 push @author_names, $person;
339 my @not_in_about;
340 foreach my $person (@author_names)
342 push @not_in_about, $person unless grep {$_ eq $person} @about_authors;
345 my @only_in_about;
346 foreach my $person (@about_authors)
348 push @only_in_about, $person unless grep {$_ eq $person} @author_names;
351 my $printed = 0;
353 if (@uncredited)
355 print "\nThe following people are in the ChangeLog but not credited in THANKS or AUTHORS:\n\n";
357 foreach my $person (@uncredited)
359 print "${person}\n";
362 $printed = 1;
365 if (@double_credited)
367 print "\nThe following people are listed in both THANKS and AUTHORS:\n\n";
369 foreach my $person (@double_credited)
371 print "${person}\n";
374 $printed = 1;
375 } else {
377 if (!$found_about_authors)
379 print "\nDidn't find authors section in nautilus-window-menus.c\n";
380 $printed = 1;
383 if (@not_in_about)
385 print "\nThe following people are in AUTHORS but not the about screen:\n\n";
387 foreach my $person (@not_in_about)
389 print "${person}\n";
392 $printed = 1;
395 if (@only_in_about)
397 print "\nThe following people are in the about screen but not AUTHORS:\n\n";
399 foreach my $person (@only_in_about)
401 print "${person}\n";
404 $printed = 1;
409 print "\n" if $printed;