Commits

anatoly techtonik committed 76595b4

Show number of issues with confirmed patches

Comments (0)

Files changed (1)

     cached = True
   return (filename, cached)
 
+issue_files = {}    # 'number' => []
 issue_patches = {}  # 'number' => []
 for issue in open_issues:
   print(issue)
-  issue_patches[issue] = bpo.display('issue'+issue, 'files')['files']
-  for filen in issue_patches[issue]:
+  issue_files[issue] = bpo.display('issue'+issue, 'files')['files']
+  for filen in issue_files[issue]:
     files_attached += 1
     stdout.write('  ' + filen)
     # get file
     if cached:
       stdout.write(' (cached)')
     # check if it is a patch
-    if patch.fromfile(path):
+    patchset = patch.fromfile(path)
+    if patchset:
       files_patches += 1
+      if issue not in issue_patches:
+        issue_patches[issue] = []
+      issue_patches[issue].append(path)
     else:
       stdout.write(' (not a patch)')
     stdout.write('\n')
 
 print('')
 print('Open issues with patch keyword: %s' % len(open_issues))
+print('Issues with confirmed patches: %s' % len(issue_patches))
 print('')
 print('Files attached: %s' % files_attached)
 print('Patches: %s' % files_patches)
 print('')
-print('Finished in %s' % (datetime.now() - START)[:-4])
+print('Finished in ' + str(datetime.now() - START)[:-4])