[Collab-qa-commits] r644 - / rc-scanner
lucas at alioth.debian.org
lucas at alioth.debian.org
Wed Jan 16 09:59:08 UTC 2008
Author: lucas
Date: 2008-01-16 09:59:08 +0000 (Wed, 16 Jan 2008)
New Revision: 644
Added:
rc-scanner/
rc-scanner/Makefile
rc-scanner/rc-scanner.rb
Log:
added script to find RC bugs based on some criterias
Added: rc-scanner/Makefile
===================================================================
--- rc-scanner/Makefile (rev 0)
+++ rc-scanner/Makefile 2008-01-16 09:59:08 UTC (rev 644)
@@ -0,0 +1,7 @@
+bts2ldap-fullindex:
+ wget -O bts2ldap-fullindex http://qa.debian.org/data/bts2ldap/fullindex
+
+clean:
+ rm -f bts2ldap-fullindex
+
+.PHONY: clean
Added: rc-scanner/rc-scanner.rb
===================================================================
--- rc-scanner/rc-scanner.rb (rev 0)
+++ rc-scanner/rc-scanner.rb 2008-01-16 09:59:08 UTC (rev 644)
@@ -0,0 +1,96 @@
+#!/usr/bin/ruby -w
+
+bugid = nil
+bugsrcpkg = nil
+bugseverity = nil
+bugtitle = nil
+bugstate = nil
+bugdone = false
+bugtags = []
+bugaffect = []
+bugmerged = []
+
+tu_done = File::new('testing-unstable-done.txt', 'w')
+tu_patch = File::new('testing-unstable-patch.txt', 'w')
+tu_nopatch = File::new('testing-unstable-nopatch.txt', 'w')
+
+t_done = File::new('testing-done.txt', 'w')
+t_patch = File::new('testing-patch.txt', 'w')
+t_nopatch = File::new('testing-nopatch.txt', 'w')
+
+u_done = File::new('unstable-done.txt', 'w')
+u_patch = File::new('unstable-patch.txt', 'w')
+u_nopatch = File::new('unstable-nopatch.txt', 'w')
+
+sta = File::new('stable.txt', 'w')
+
+IO::read('bts2ldap-fullindex').each_line do |l|
+ l.chomp!
+ key, val = l.split(' ', 2)
+ if key == 'dn:' and bugid != nil
+ obugtags = bugtags
+ obugaffect = bugaffect
+ obugmerged = bugmerged
+ obugdone = bugdone
+
+ bugdone = false
+ bugtags = []
+ bugaffect = []
+ bugmerged = []
+ # where we classify bugs.
+ next if not ['serious', 'grave', 'critical'].include?(bugseverity)
+ next if not obugmerged.empty?
+
+ f = nil
+ if obugaffect.include?('testing') and obugaffect.include?('unstable')
+ if obugdone
+ f = tu_done
+ elsif obugtags.include?('patch')
+ f = tu_patch
+ else
+ f = tu_nopatch
+ end
+ elsif obugaffect.include?('testing')
+ if obugdone
+ f = t_done
+ elsif obugtags.include?('patch')
+ f = t_patch
+ else
+ f = t_nopatch
+ end
+ elsif obugaffect.include?('unstable')
+ if obugdone
+ f = u_done
+ elsif obugtags.include?('patch')
+ f = u_patch
+ else
+ f = u_nopatch
+ end
+ end
+ if f != nil
+ f.puts "#{bugid} #{bugsrcpkg} #{bugtitle}"
+ end
+ if obugaffect.include?('stable')
+ sta.puts "#{bugid} #{bugsrcpkg} #{bugtitle}"
+ end
+
+ elsif key == 'debbugsID:'
+ bugid = val
+ elsif key == 'debbugsPackage:'
+ bugsrcpkg = val
+ elsif key == 'debbugsDone:'
+ bugdone = true
+ elsif key == 'debbugsSeverity:'
+ bugseverity = val
+ elsif key == 'debbugsTag:'
+ bugtags << val
+ elsif key == 'debbugsState:'
+ bugstate = val
+ elsif key == 'debbugsTitle:'
+ bugtitle = val
+ elsif key == 'debbugsAffected:'
+ bugaffect << val
+ elsif key == 'debbugsMergedWith:'
+ bugmerged << val
+ end
+end
Property changes on: rc-scanner/rc-scanner.rb
___________________________________________________________________
Name: svn:executable
+ *
More information about the Collab-qa-commits
mailing list