[oe-commits] org.oe.dev contrib/qa/bugzilla.py: Extract all bug reports, even the ones from bugs.openembedded.org
freyther commit
openembedded-commits at lists.openembedded.org
Fri Mar 16 21:11:23 UTC 2007
contrib/qa/bugzilla.py: Extract all bug reports, even the ones from bugs.openembedded.org
Abuse the class attribute even further and check for severities. We are
able to find all 2006 bugs of OpenEmbedded and all 282 bugs of OpenMoko
Author: freyther at openembedded.org
Branch: org.openembedded.dev
Revision: 2a553ef001450b9076d93d67102518bb6c34bcf7
ViewMTN: http://monotone.openembedded.org/revision.psp?id=2a553ef001450b9076d93d67102518bb6c34bcf7
Files:
1
contrib/qa/bugzilla.py
Diffs:
#
# mt diff -rb9293118c194a01c44b71ffff72e461a3fe86807 -r2a553ef001450b9076d93d67102518bb6c34bcf7
#
#
#
# patch "contrib/qa/bugzilla.py"
# from [9e2793fb6ab56eae55995f015b0e84647b928bc6]
# to [9bf749e3495c7360334ab2743f1aeee6896d6a22]
#
============================================================
--- contrib/qa/bugzilla.py 9e2793fb6ab56eae55995f015b0e84647b928bc6
+++ contrib/qa/bugzilla.py 9bf749e3495c7360334ab2743f1aeee6896d6a22
@@ -25,11 +25,16 @@ class BugQueryExtractor(HTMLParser):
def __init__(self):
HTMLParser.__init__(self)
self.state = self.STATE_NONE
+ self.bug = None
self.bugs = []
def handle_starttag(self, tag, attr):
if self.state == self.STATE_NONE and tag.lower() == "tr":
- if len(attr) == 1 and attr[0] == ('class', 'bz_normal bz_P2 '):
+ # check for bz_normal and bz_P2 as indicator in buglist.cgi
+ # use 'all' and 'map' on python2.5
+ if len(attr) == 1 and attr[0][0] == 'class' and \
+ ('bz_normal' in attr[0][1] or 'bz_blocker' in attr[0][1] or 'bz_enhancement' in attr[0][1] or 'bz_major' in attr[0][1] or 'bz_minor' in attr[0][1] or 'bz_trivial' in attr[0][1] or 'bz_critical' in attr[0][1] or 'bz_wishlist' in attr[0][1]) \
+ and 'bz_P' in attr[0][1]:
print "Found tr %s %s" % (tag, attr)
self.state = self.STATE_FOUND_TR
elif self.state == self.STATE_FOUND_TR and tag.lower() == "td":
@@ -41,6 +46,7 @@ class BugQueryExtractor(HTMLParser):
if self.state != self.STATE_NONE:
self.bugs.append( (self.bug,self.status) )
self.state = self.STATE_NONE
+ self.bug = None
if self.state > 1 and tag.lower() == "td":
print "Next TD"
self.state += 1
@@ -51,11 +57,17 @@ class BugQueryExtractor(HTMLParser):
# skip garbage
if len(data) == 0:
return
-
+
if self.state == self.STATE_FOUND_NUMBER:
+ """
+ #1995 in bugs.oe.org has [SEC] additionally to the number and we want to ignore it
+ """
print "Bug Number '%s'" % data.strip()
+ if self.bug:
+ print "Ignoring bug data"
+ return
self.bug = data
-
+
elif self.state == self.STATE_FOUND_STATUS:
print "Status Name '%s'" % data.strip()
self.status = data
@@ -65,7 +77,7 @@ class BugQueryExtractor(HTMLParser):
return self.bugs
#
-site = """<!-- 1.0 at bugzilla.org -->
+bugs_openmoko = """<!-- 1.0 at bugzilla.org -->
@@ -108,266 +120,6 @@ site = """<!-- 1.0 at bugzilla.org -->
- <div id="header">
- <a href="http://bugzilla.openmoko.org/cgi-bin/bugzilla/" id="site_logo"><img src="/style/images/openmoko_logo.png" alt="openmoko.org" /></a>
-
- <div id="main_navigation">
- <ul>
- <li><a href="http://www.openmoko.org/" class="nav_home"><span>Home</span></a></li>
- <li><a href="http://wiki.openmoko.org/" class="nav_wiki"><span>Wiki</span></a></li>
- <li><a href="http://bugzilla.openmoko.org/" class="nav_bugzilla selected"><span>Bugzilla</span></a></li>
- <li><a href="http://planet.openmoko.org/" class="nav_planet"><span>Planet</span></a></li>
- <li><a href="http://projects.openmoko.org/" class="nav_projects"><span>Projects</span></a></li>
- <li><a href="http://lists.openmoko.org/" class="nav_lists"><span>Lists</span></a></li>
- </ul>
- </div>
- </div>
-
- <div class="page_title">
- <strong>Bug List</strong>
- </div>
-
- <div class="container">
-
-<div align="center">
- <b>Tue Mar 6 19:01:13 CET 2007</b><br>
-
-
- <a href="quips.cgi"><i>Free your problems
-</i></a>
-
-</div>
-
-
-<hr>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-<!-- 1.0 at bugzilla.org -->
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- <table class="bz_buglist" cellspacing="0" cellpadding="4" width="100%">
- <colgroup>
- <col class="bz_id_column">
- <col class="bz_severity_column">
- <col class="bz_priority_column">
- <col class="bz_platform_column">
- <col class="bz_owner_column">
- <col class="bz_status_column">
- <col class="bz_resolution_column">
- <col class="bz_summary_column">
- </colgroup>
-
- <tr align="left">
- <th colspan="1">
- <a href="buglist.cgi?short_desc_type=substring&short_desc=manual+test+bug&product=OpenMoko&component=autobuilds&order=bugs.bug_id">ID</a>
- </th>
-
-<th colspan="1">
- <a href="buglist.cgi?short_desc_type=substring&short_desc=manual+test+bug&product=OpenMoko&component=autobuilds&order=bugs.bug_severity,bugs.bug_id">Sev</a>
- </th><th colspan="1">
- <a href="buglist.cgi?short_desc_type=substring&short_desc=manual+test+bug&product=OpenMoko&component=autobuilds&order=bugs.priority,bugs.bug_id">Pri</a>
- </th><th colspan="1">
- <a href="buglist.cgi?short_desc_type=substring&short_desc=manual+test+bug&product=OpenMoko&component=autobuilds&order=bugs.rep_platform,bugs.bug_id">Plt</a>
- </th><th colspan="1">
- <a href="buglist.cgi?short_desc_type=substring&short_desc=manual+test+bug&product=OpenMoko&component=autobuilds&order=map_assigned_to.login_name,bugs.bug_id">Owner</a>
- </th><th colspan="1">
- <a href="buglist.cgi?short_desc_type=substring&short_desc=manual+test+bug&product=OpenMoko&component=autobuilds&order=bugs.bug_status,bugs.bug_id">State</a>
- </th><th colspan="1">
- <a href="buglist.cgi?short_desc_type=substring&short_desc=manual+test+bug&product=OpenMoko&component=autobuilds&order=bugs.resolution,bugs.bug_id">Result</a>
- </th><th colspan="1">
- <a href="buglist.cgi?short_desc_type=substring&short_desc=manual+test+bug&product=OpenMoko&component=autobuilds&order=bugs.short_desc,bugs.bug_id">Summary</a>
- </th>
-
-
- </tr>
-
- <tr class="bz_normal bz_P2 ">
-
- <td>
- <a href="show_bug.cgi?id=238">238</a>
- </td>
-
- <td><nobr>nor</nobr>
- </td>
- <td><nobr>P2</nobr>
- </td>
- <td><nobr>Mac</nobr>
- </td>
- <td><nobr>mickey at vanille-media.de</nobr>
- </td>
- <td><nobr>NEW</nobr>
- </td>
- <td><nobr></nobr>
- </td>
- <td>manual test bug
- </td>
-
- </tr>
-
-
- </table>
-
-
-
-
-
- One bug found.
-
-
-<br>
-
-
-
-
-
-
-
-
-
-
-
-
- <form method="post" action="long_list.cgi">
- <input type="hidden" name="buglist" value="238">
- <input type="submit" value="Long Format">
-
- <a href="query.cgi">Query Page</a>
- <a href="enter_bug.cgi">Enter New Bug</a>
- <a href="colchange.cgi?short_desc_type=substring&short_desc=manual+test+bug&product=OpenMoko&component=autobuilds">Change Columns</a>
-
-
-
- <a href="query.cgi?short_desc_type=substring&short_desc=manual+test+bug&product=OpenMoko&component=autobuilds">Edit this Query</a>
-
- </form>
-
-
-
-
-
-
-<!-- 1.0 at bugzilla.org -->
-
-
-
-
-
-
-</div>
-
-<div class="footer">
- <div class="group">This is <b>Bugzilla</b>: the Mozilla bug system. For more information about what Bugzilla is and what it can do, see <a href="http://www.bugzilla.org/">bugzilla.org</a>.</div>
- <!-- 1.0 at bugzilla.org -->
-
-
-
-
-
-
-<form method="get" action="show_bug.cgi">
- <div class="group">
- <a href="enter_bug.cgi">New</a> | <a href="query.cgi">Query</a> | <input type="submit" value="Find"> bug # <input name="id" size="6"> | <a href="reports.cgi">Reports</a> | <a href="votes.cgi?action=show_user">My Votes</a>
- </div>
-
- <div class="group">
- Edit <a href="userprefs.cgi">prefs</a>
- | <a href="relogin.cgi">Log out</a> freyther at yahoo.com
- </div>
-
-
-
-
- <div class="group">
- Preset Queries:
-
- <a href="buglist.cgi?bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&email1=freyther%40yahoo.com&emailtype1=exact&emailassigned_to1=1&emailreporter1=1">My Bugs</a>
-
- </div>
-</form>
-</div>
-
-</body>
-</html>
-"""
-
-all_bugs = """<!-- 1.0 at bugzilla.org -->
-
-
-
-
-
-
-
-
-
-
-
-<!-- 1.0 at bugzilla.org -->
-
-
-
-
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <title>Bug List</title>
-
-
-
-
-
- <link href="/style/style.css" rel="stylesheet" type="text/css" />
-
- <link href="/bugzilla/css/buglist.css" rel="stylesheet" type="text/css">
-
- </head>
-
-
-
- <body bgcolor="#FFFFFF" onload="">
-
-
-<!-- 1.0 at bugzilla.org -->
-
-
-
-
<div id="header">
<a href="http://bugzilla.openmoko.org/cgi-bin/bugzilla/" id="site_logo"><img src="/style/images/openmoko_logo.png" alt="openmoko.org" /></a>
@@ -390,10 +142,10 @@ all_bugs = """<!-- 1.0 at bugzilla.org -->
<div class="container">
<div align="center">
- <b>Tue Mar 6 20:23:16 CET 2007</b><br>
+ <b>Fri Mar 16 20:51:52 CET 2007</b><br>
- <a href="quips.cgi"><i>Free your problems
+ <a href="quips.cgi"><i>It was a time of great struggle and heroic deeds
</i></a>
</div>
@@ -405,7 +157,7 @@ all_bugs = """<!-- 1.0 at bugzilla.org -->
-228 bugs found.
+282 bugs found.
@@ -454,23 +206,23 @@ 228 bugs found.
<tr align="left">
<th colspan="1">
- <a href="buglist.cgi?product=OpenMoko&order=bugs.bug_id">ID</a>
+ <a href="buglist.cgi?short_desc_type=allwordssubstr&short_desc=&long_desc_type=allwordssubstr&long_desc=&bug_file_loc_type=allwordssubstr&bug_file_loc=&bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bug_status=RESOLVED&bug_status=VERIFIED&bug_status=CLOSED&emailassigned_to1=1&emailtype1=substring&email1=&emailassigned_to2=1&emailreporter2=1&emailcc2=1&emailtype2=substring&email2=&bugidtype=include&bug_id=&votes=&changedin=&chfieldfrom=&chfieldto=Now&chfieldvalue=&field0-0-0=noop&type0-0-0=noop&value0-0-0=&order=bugs.bug_id">ID</a>
</th>
<th colspan="1">
- <a href="buglist.cgi?product=OpenMoko&order=bugs.bug_severity,bugs.bug_id">Sev</a>
+ <a href="buglist.cgi?short_desc_type=allwordssubstr&short_desc=&long_desc_type=allwordssubstr&long_desc=&bug_file_loc_type=allwordssubstr&bug_file_loc=&bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bug_status=RESOLVED&bug_status=VERIFIED&bug_status=CLOSED&emailassigned_to1=1&emailtype1=substring&email1=&emailassigned_to2=1&emailreporter2=1&emailcc2=1&emailtype2=substring&email2=&bugidtype=include&bug_id=&votes=&changedin=&chfieldfrom=&chfieldto=Now&chfieldvalue=&field0-0-0=noop&type0-0-0=noop&value0-0-0=&order=bugs.bug_severity,bugs.bug_id">Sev</a>
</th><th colspan="1">
- <a href="buglist.cgi?product=OpenMoko&order=bugs.priority,bugs.bug_id">Pri</a>
+ <a href="buglist.cgi?short_desc_type=allwordssubstr&short_desc=&long_desc_type=allwordssubstr&long_desc=&bug_file_loc_type=allwordssubstr&bug_file_loc=&bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bug_status=RESOLVED&bug_status=VERIFIED&bug_status=CLOSED&emailassigned_to1=1&emailtype1=substring&email1=&emailassigned_to2=1&emailreporter2=1&emailcc2=1&emailtype2=substring&email2=&bugidtype=include&bug_id=&votes=&changedin=&chfieldfrom=&chfieldto=Now&chfieldvalue=&field0-0-0=noop&type0-0-0=noop&value0-0-0=&order=bugs.priority,bugs.bug_id">Pri</a>
</th><th colspan="1">
- <a href="buglist.cgi?product=OpenMoko&order=bugs.rep_platform,bugs.bug_id">Plt</a>
+ <a href="buglist.cgi?short_desc_type=allwordssubstr&short_desc=&long_desc_type=allwordssubstr&long_desc=&bug_file_loc_type=allwordssubstr&bug_file_loc=&bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bug_status=RESOLVED&bug_status=VERIFIED&bug_status=CLOSED&emailassigned_to1=1&emailtype1=substring&email1=&emailassigned_to2=1&emailreporter2=1&emailcc2=1&emailtype2=substring&email2=&bugidtype=include&bug_id=&votes=&changedin=&chfieldfrom=&chfieldto=Now&chfieldvalue=&field0-0-0=noop&type0-0-0=noop&value0-0-0=&order=bugs.rep_platform,bugs.bug_id">Plt</a>
</th><th colspan="1">
- <a href="buglist.cgi?product=OpenMoko&order=map_assigned_to.login_name,bugs.bug_id">Owner</a>
+ <a href="buglist.cgi?short_desc_type=allwordssubstr&short_desc=&long_desc_type=allwordssubstr&long_desc=&bug_file_loc_type=allwordssubstr&bug_file_loc=&bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bug_status=RESOLVED&bug_status=VERIFIED&bug_status=CLOSED&emailassigned_to1=1&emailtype1=substring&email1=&emailassigned_to2=1&emailreporter2=1&emailcc2=1&emailtype2=substring&email2=&bugidtype=include&bug_id=&votes=&changedin=&chfieldfrom=&chfieldto=Now&chfieldvalue=&field0-0-0=noop&type0-0-0=noop&value0-0-0=&order=map_assigned_to.login_name,bugs.bug_id">Owner</a>
</th><th colspan="1">
- <a href="buglist.cgi?product=OpenMoko&order=bugs.bug_status,bugs.bug_id">State</a>
+ <a href="buglist.cgi?short_desc_type=allwordssubstr&short_desc=&long_desc_type=allwordssubstr&long_desc=&bug_file_loc_type=allwordssubstr&bug_file_loc=&bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bug_status=RESOLVED&bug_status=VERIFIED&bug_status=CLOSED&emailassigned_to1=1&emailtype1=substring&email1=&emailassigned_to2=1&emailreporter2=1&emailcc2=1&emailtype2=substring&email2=&bugidtype=include&bug_id=&votes=&changedin=&chfieldfrom=&chfieldto=Now&chfieldvalue=&field0-0-0=noop&type0-0-0=noop&value0-0-0=&order=bugs.bug_status,bugs.bug_id">State</a>
</th><th colspan="1">
- <a href="buglist.cgi?product=OpenMoko&order=bugs.resolution,bugs.bug_id">Result</a>
+ <a href="buglist.cgi?short_desc_type=allwordssubstr&short_desc=&long_desc_type=allwordssubstr&long_desc=&bug_file_loc_type=allwordssubstr&bug_file_loc=&bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bug_status=RESOLVED&bug_status=VERIFIED&bug_status=CLOSED&emailassigned_to1=1&emailtype1=substring&email1=&emailassigned_to2=1&emailreporter2=1&emailcc2=1&emailtype2=substring&email2=&bugidtype=include&bug_id=&votes=&changedin=&chfieldfrom=&chfieldto=Now&chfieldvalue=&field0-0-0=noop&type0-0-0=noop&value0-0-0=&order=bugs.resolution,bugs.bug_id">Result</a>
</th><th colspan="1">
- <a href="buglist.cgi?product=OpenMoko&order=bugs.short_desc,bugs.bug_id">Summary</a>
+ <a href="buglist.cgi?short_desc_type=allwordssubstr&short_desc=&long_desc_type=allwordssubstr&long_desc=&bug_file_loc_type=allwordssubstr&bug_file_loc=&bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bug_status=RESOLVED&bug_status=VERIFIED&bug_status=CLOSED&emailassigned_to1=1&emailtype1=substring&email1=&emailassigned_to2=1&emailreporter2=1&emailcc2=1&emailtype2=substring&email2=&bugidtype=include&bug_id=&votes=&changedin=&chfieldfrom=&chfieldto=Now&chfieldvalue=&field0-0-0=noop&type0-0-0=noop&value0-0-0=&order=bugs.short_desc,bugs.bug_id">%s
>>> DIFF TRUNCATED @ 16K
More information about the Openembedded-commits
mailing list