[Blends-commit] r2736 - /blends/trunk/team_analysis_tools/maintain_bad_names.py

tille at users.alioth.debian.org tille at users.alioth.debian.org
Wed Apr 6 19:13:21 UTC 2011


Author: tille
Date: Wed Apr  6 19:13:13 2011
New Revision: 2736

URL: http://svn.debian.org/wsvn/blends/?sc=1&rev=2736
Log:
Check whether one name is a full part of the other name and choose the longer one as prefered name; Added some names to whitelist

Modified:
    blends/trunk/team_analysis_tools/maintain_bad_names.py

Modified: blends/trunk/team_analysis_tools/maintain_bad_names.py
URL: http://svn.debian.org/wsvn/blends/blends/trunk/team_analysis_tools/maintain_bad_names.py?rev=2736&op=diff
==============================================================================
--- blends/trunk/team_analysis_tools/maintain_bad_names.py (original)
+++ blends/trunk/team_analysis_tools/maintain_bad_names.py Wed Apr  6 19:13:13 2011
@@ -37,6 +37,10 @@
              'Debian FreeSmartphone.Org Team',
              'Chao-Ming',
              'Nicolas François',
+             'Javier Fernández-Sanguino Peña',
+             'Günter Milde',
+             'W. Martin Borgert',
+             'Jeremy Lainé',
             )
 
 has_quotes_re = re.compile('".*"')
@@ -155,6 +159,20 @@
                                     if debug:
                                         print "Second frequent name has second name initial %s" % usednames[1][0]
                                     prefered = 1
+                            if prefered < 0:
+                                # check whether one name is a full part of the other name and choose the longer one as prefered name
+                                if usednames[1][0].startswith(usednames[0][0]) or \
+                                   usednames[1][0].endswith(usednames[0][0]):
+                                    if debug:
+                                        print "Second name '%s' completely contains first '%s' - use longer name" % \
+                                            ( usednames[1][0], usednames[0][0])
+                                    prefered = 1
+                                if usednames[0][0].startswith(usednames[1][0]) or \
+                                   usednames[0][0].endswith(usednames[1][0]):
+                                    if debug:
+                                        print "First name '%s' completely contains second '%s' - use longer name" % \
+                                            ( usednames[0][0], usednames[1][0])
+                                    prefered = 0
                         # check whitelist of names
                         i = -1
                         for u in usednames:




More information about the Blends-commit mailing list