[Blends-commit] r2622 - /blends/trunk/team_analysis_tools/create_bad_names.sql

tille at users.alioth.debian.org tille at users.alioth.debian.org
Wed Jan 26 11:01:46 UTC 2011


Author: tille
Date: Wed Jan 26 11:01:41 2011
New Revision: 2622

URL: http://svn.debian.org/wsvn/blends/?sc=1&rev=2622
Log:
Do not regard NMUs as team member uploads

Modified:
    blends/trunk/team_analysis_tools/create_bad_names.sql

Modified: blends/trunk/team_analysis_tools/create_bad_names.sql
URL: http://svn.debian.org/wsvn/blends/blends/trunk/team_analysis_tools/create_bad_names.sql?rev=2622&op=diff
==============================================================================
--- blends/trunk/team_analysis_tools/create_bad_names.sql (original)
+++ blends/trunk/team_analysis_tools/create_bad_names.sql Wed Jan 26 11:01:41 2011
@@ -698,21 +698,29 @@
 CREATE OR REPLACE FUNCTION active_uploader_ids_of_pkggroup(text,int) RETURNS SETOF RECORD AS $$
   SELECT ce.id
          , COUNT(*)::int
-    FROM (SELECT source, changed_by_email FROM upload_history) uh
+    FROM (SELECT source, changed_by_email, nmu FROM upload_history) uh
     JOIN carnivore_emails ce ON ce.email = uh.changed_by_email
    WHERE source IN (           -- source packages that are maintained by the team
        SELECT DISTINCT source FROM upload_history
         WHERE maintainer_email = $1
+          AND nmu = 'f'
       )
     AND changed_by_email IN ( -- email of uploaders who at least once uploaded on behalf of the team
        SELECT DISTINCT ce.email FROM upload_history uh
          JOIN carnivore_emails ce ON ce.email = uh.changed_by_email
         WHERE maintainer_email = $1
+          AND nmu = 'f'
    )
+     AND nmu = 'f'
    GROUP BY ce.id
    ORDER BY count DESC
    LIMIT $2
 $$ LANGUAGE 'SQL';
+
+/*
+SELECT * FROM active_uploader_ids_of_pkggroup('debian-med-packaging at lists.alioth.debian.org',50) AS (id int, count int);
+SELECT * FROM active_uploader_ids_of_pkggroup('debian-science-maintainers at lists.alioth.debian.org',50) AS (id int, count int);
+*/
 
 -- top 10 maintainers with acticity per year
 -- Remark: There is no need to transform carnivore IDs into names because the calling functions needs to
@@ -721,6 +729,7 @@
   SELECT cn.name, uh.year, COUNT(*)::int FROM
     (SELECT source, EXTRACT(year FROM date)::int AS year, changed_by_email
        FROM upload_history
+      WHERE nmu = 'f'
     ) uh
     JOIN carnivore_emails ce ON ce.email = uh.changed_by_email
     JOIN (SELECT * FROM carnivore_names
@@ -729,6 +738,7 @@
    WHERE source IN (           -- source packages that are maintained by the team
       SELECT DISTINCT source FROM upload_history
       WHERE maintainer_email = $1
+        AND nmu = 'f'
      )
      AND changed_by_email IN ( -- email of uploaders who at least once uploaded on behalf of the team
       SELECT DISTINCT ce.email FROM upload_history uh




More information about the Blends-commit mailing list