[openssl-commits] [tools] master update

Rich Salz rsalz at openssl.org
Mon Nov 6 17:56:37 UTC 2017


The branch master has been updated
       via  22a99d3c8611bc0fa48895197292cb652fe80ae2 (commit)
       via  4d6da42f5bb47a90173bbd0ff4d42df33abd66ee (commit)
      from  789508be793ffbe64186efc7348bccd0e61d9b03 (commit)


- Log -----------------------------------------------------------------
commit 22a99d3c8611bc0fa48895197292cb652fe80ae2
Author: Rich Salz <rsalz at openssl.org>
Date:   Mon Nov 6 12:56:34 2017 -0500

    Add -d flag

commit 4d6da42f5bb47a90173bbd0ff4d42df33abd66ee
Author: Rich Salz <rsalz at openssl.org>
Date:   Mon Nov 6 12:56:22 2017 -0500

    Use UPCASE for select keywords

-----------------------------------------------------------------------

Summary of changes:
 license/approved      |  2 +-
 license/get-followups | 34 +++++++++++++++++++++++++++-------
 2 files changed, 28 insertions(+), 8 deletions(-)

diff --git a/license/approved b/license/approved
index 6d84dab..0cc2847 100755
--- a/license/approved
+++ b/license/approved
@@ -38,7 +38,7 @@ for o,a in opts:
         print __doc__
         raise SystemExit
 
-q = 'select uid from users where email = %s'
+q = 'SELECT uid FROM users WHERE email = %s'
 update = ("UPDATE users SET date_replied=%s, reply=%s, comment=%s"
      " WHERE uid=%s")
 today = datetime.datetime.today().date()
diff --git a/license/get-followups b/license/get-followups
index ab3d4d7..11fafb3 100755
--- a/license/get-followups
+++ b/license/get-followups
@@ -1,5 +1,8 @@
 #! /usr/bin/env python
-"""get-followups
+"""get-followups [flags]
+
+Flags:
+    -d      List details (commits) per user
 
 Get list of users (in CSV format) who have not been reached.
 """
@@ -8,7 +11,6 @@ import mysql.connector
 import datetime, os, re, subprocess, sys, string, random
 import getopt
 
-urlbase = 'https://license.openssl.org/cgi-bin/lookup.py?uid='
 dbconfig = {
         'user': 'licensereader',
         'password': open('ropass.txt').read().strip(),
@@ -17,17 +19,35 @@ dbconfig = {
 conn = mysql.connector.connect(**dbconfig)
 cursor = conn.cursor()
 
-single = 0
-opts, args = getopt.getopt(sys.argv[1:], "")
+urlbase = 'https://license.openssl.org/cgi-bin/lookup.py?uid='
+fmtstring = urlbase + '%d, %s, %d, "%s"'
+
+details = 0
+opts, args = getopt.getopt(sys.argv[1:], "dh")
 for o,a in opts:
-    print __doc__
-    raise SystemExit
+    if o == '-d':
+        details = 1
+    else:
+        print __doc__
+        raise SystemExit
 
+rows = []
 q = ('SELECT users.uid,email,reply,name,count(log.uid) FROM users'
         ' LEFT JOIN log ON log.uid = users.uid'
         ' WHERE reply = "-" GROUP BY email ORDER BY count(log.uid)' )
 cursor.execute(q)
-fmtstring = urlbase + '%d, %s, %d, "%s"'
 for row in cursor:
     uid,email,reply,name,count = row
+    rows.append((uid, email, reply, name, count))
+
+q = ('SELECT commit,date,descrip FROM commits'
+        ' LEFT JOIN log ON log.cid=commits.cid WHERE log.uid=%s')
+for row in rows:
+    uid,email,reply,name,count = row
     print fmtstring % (uid, email, count, name)
+    if details and count > 0:
+        cursor.execute(q, (uid,))
+        for c in cursor:
+            commit,date,descrip = c
+            print "\t", commit[0:8],date,descrip
+        print


More information about the openssl-commits mailing list