@@ -121,20 +121,39 @@ class CommitterListFromMailingList(object):
121121
122122class CommitterListFromGit (object ):
123123 login_to_email_address = {
124+ 'aboule' : 'aboule@apple.com' ,
125+ 'adachan' : 'adachan@apple.com' ,
126+ 'adele' : 'adele@apple.com' ,
124127 'aliceli1' : 'alice.liu@apple.com' ,
128+ 'alp' : 'alp@nuanti.com' ,
129+ 'andersca' : 'andersca@apple.com' ,
130+ 'antti' : 'koivisto@iki.fi' ,
131+ 'ap' : 'ap@webkit.org' ,
132+ 'aroben' : 'aroben@webkit.org' ,
133+ 'bdakin' : 'bdakin@apple.com' ,
125134 'bdash' : 'mrowe@apple.com' ,
126135 'bdibello' : 'bdibello@apple.com' , # Bruce DiBello, only 4 commits: r10023, r9548, r9538, r9535
136+ 'beidson' : 'beidson@apple.com' ,
127137 'cblu' : 'cblu@apple.com' ,
128138 'cpeterse' : 'cpetersen@apple.com' ,
139+ 'darin' : 'darin@apple.com' ,
140+ 'ddkilzer' : 'ddkilzer@webkit.org' ,
141+ 'dsmith' : 'catfish.man@gmail.com' ,
129142 'eseidel' : 'eric@webkit.org' ,
130143 'gdennis' : 'gdennis@webkit.org' ,
144+ 'ggaren' : 'ggaren@apple.com' ,
131145 'goldsmit' : 'goldsmit@apple.com' , # Debbie Goldsmith, only one commit r8839
132146 'gramps' : 'gramps@apple.com' ,
147+ 'harrison' : 'harrison@apple.com' ,
148+ 'hausmann' : 'hausmann@webkit.org' ,
133149 'honeycutt' : 'jhoneycutt@apple.com' ,
150+ 'hyatt' : 'hyatt@apple.com' ,
134151 'jdevalk' : 'joost@webkit.org' ,
135152 'jens' : 'jens@apple.com' ,
136153 'justing' : 'justin.garcia@apple.com' ,
137154 'kali' : 'kali@apple.com' , # Christy Warren, did BIDI work, 5 commits: r8815, r8802, r8801, r8791, r8773, r8603
155+ 'kdecker' : 'kdecker@apple.com' ,
156+ 'kevino' : 'kevino@theolliviers.com' ,
138157 'kjk' : 'kkowalczyk@gmail.com' ,
139158 'kmccullo' : 'kmccullough@apple.com' ,
140159 'kocienda' : 'kocienda@apple.com' ,
@@ -143,18 +162,30 @@ class CommitterListFromGit(object):
143162 'lweintraub' : 'lweintraub@apple.com' ,
144163 'lypanov' : 'lypanov@kde.org' ,
145164 'mhay' : 'mhay@apple.com' , # Mike Hay, 3 commits: r3813, r2552, r2548
165+ 'mitz' : 'mitz@webkit.org' ,
166+ 'mjs' : 'mjs@apple.com' ,
167+ 'oliver' : 'oliver@apple.com' ,
146168 'ouch' : 'ouch@apple.com' , # John Louch
169+ 'pewtermoose' : 'dev+webkit@mattlilek.com' ,
147170 'pyeh' : 'patti@apple.com' , # Patti Yeh, did VoiceOver work in WebKit
148171 'rjw' : 'rjw@apple.com' ,
172+ 'rwlbuis' : 'rwlbuis@gmail.com' ,
149173 'seangies' : 'seangies@apple.com' , # Sean Gies?, only 5 commits: r16600, r16592, r16511, r16489, r16484
174+ 'sfalken' : 'sfalken@apple.com' ,
150175 'sheridan' : 'sheridan@apple.com' , # Shelly Sheridan
176+ 'slewis' : 'slewis@apple.com' ,
177+ 'staikos' : 'staikos@kde.org' ,
178+ 'sullivan' : 'sullivan@apple.com' ,
151179 'thatcher' : 'timothy@apple.com' ,
152180 'tomernic' : 'timo@apple.com' ,
181+ 'treat' : 'manyoso@yahoo.com' ,
153182 'trey' : 'trey@usa.net' ,
154183 'tristan' : 'tristan@apple.com' ,
155184 'vicki' : 'vicki@apple.com' ,
156185 'voas' : 'voas@apple.com' , # Ed Voas, did some Carbon work in WebKit
186+ 'weinig' : 'sam@webkit.org' ,
157187 'zack' : 'zack@kde.org' ,
188+ 'zecke' : 'zecke@selfish.org' ,
158189 'zimmermann' : 'zimmermann@webkit.org' ,
159190 }
160191
@@ -303,24 +334,58 @@ class CommitterListBugzillaChecker(object):
303334 print_list_if_non_empty ("Committers with invalid bugzilla email:" , committers_with_invalid_bugzilla_email )
304335
305336
337+ def dump_mailmap (committer_list ):
338+ def format_email (email ):
339+ return "<{0}>" .format (email )
340+
341+ def format_email_with_gitsvn_uuid (email ):
342+ return "<{0}@268f45cc-cd09-0410-ab3c-d52691b4dbfc>" .format (email )
343+
344+ email_to_legacy_username = dict (map (reversed , CommitterListFromGit .login_to_email_address .items ()))
345+ def map_emails_to_legacy_username (emails ):
346+ legacy_username = None
347+ for email in emails :
348+ legacy_username = email_to_legacy_username .get (email )
349+ if legacy_username :
350+ break
351+ return legacy_username
352+
353+ for contributor in committer_list .contributors ():
354+ full_name = contributor .full_name .encode ("utf-8" )
355+ canonical_email = contributor .bugzilla_email ()
356+ other_emails = contributor .emails
357+ legacy_username = map_emails_to_legacy_username (contributor .emails )
358+ if legacy_username :
359+ other_emails .append (legacy_username )
360+
361+ for other_email in other_emails :
362+ print full_name , format_email (canonical_email ), format_email (other_email )
363+ print full_name , format_email (canonical_email ), format_email_with_uuid (other_email )
364+
365+
306366def main ():
307367 parser = OptionParser ()
308368 parser .add_option ("-b" , "--check-bugzilla-emails" , action = "store_true" , help = "Check the bugzilla_email for each committer against bugs.webkit.org" )
309369 parser .add_option ("-d" , "--dump" , action = "store_true" , help = "Dump the contributor list as JSON to stdout (suitable for saving to contributors.json)" )
370+ parser .add_option ("--dump-mailmap" , action = "store_true" , help = "Dump the contributor list as a Git Mailmap to stdout" )
310371 parser .add_option ("-c" , "--canonicalize" , action = "store_true" , help = "Canonicalize contributors.json, rewriting it in-place" )
311372
312373 (options , args ) = parser .parse_args ()
313374
314375 committer_list = CommitterList ()
315376 if options .dump :
316377 print committer_list .as_json ()
317- return 0 ;
378+ return 0
379+
380+ if options .dump_mailmap :
381+ dump_mailmap (committer_list )
382+ return 0
318383
319384 if options .canonicalize :
320385 print "Updating contributors.json in-place..."
321386 committer_list .reformat_in_place ()
322387 print "Done"
323- return 0 ;
388+ return 0
324389
325390 CommitterListFromMailingList ().check_for_emails_missing_from_list (committer_list )
326391
0 commit comments