[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-10851-g50815da
eric at webkit.org
eric at webkit.org
Wed Dec 22 18:32:24 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit f6ee423142011800732dfc20e0d0678e73223261
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Mon Dec 13 20:36:22 2010 +0000
2010-12-13 Eric Seidel <eric at webkit.org>
Unreviewed.
Teach webkit-patch how to search bugzilla
https://bugs.webkit.org/show_bug.cgi?id=50500
webkit-patch bug-search fails when there is only one result.
Turns out we needed a bit more logic in our result count parsing code.
* Scripts/webkitpy/common/net/bugzilla/bugzilla.py:
* Scripts/webkitpy/common/net/bugzilla/bugzilla_unittest.py:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@73950 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index da25330..fbd9d60 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,16 @@
+2010-12-13 Eric Seidel <eric at webkit.org>
+
+ Unreviewed.
+
+ Teach webkit-patch how to search bugzilla
+ https://bugs.webkit.org/show_bug.cgi?id=50500
+
+ webkit-patch bug-search fails when there is only one result.
+ Turns out we needed a bit more logic in our result count parsing code.
+
+ * Scripts/webkitpy/common/net/bugzilla/bugzilla.py:
+ * Scripts/webkitpy/common/net/bugzilla/bugzilla_unittest.py:
+
2010-12-13 Antti Koivisto <antti at apple.com>
Reviewed by Alexey Proskuryakov.
diff --git a/WebKitTools/Scripts/webkitpy/common/net/bugzilla/bugzilla.py b/WebKitTools/Scripts/webkitpy/common/net/bugzilla/bugzilla.py
index b370fc1..d2546b3 100644
--- a/WebKitTools/Scripts/webkitpy/common/net/bugzilla/bugzilla.py
+++ b/WebKitTools/Scripts/webkitpy/common/net/bugzilla/bugzilla.py
@@ -81,9 +81,11 @@ class BugzillaQueries(object):
# This is kinda a hack. There is probably a better way to get this information from bugzilla.
def _parse_result_count(self, results_page):
result_count_text = BeautifulSoup(results_page).find(attrs={'class': 'bz_result_count'}).string
- result_count_parts = result_count_text.split(" ")
+ result_count_parts = result_count_text.strip().split(" ")
if result_count_parts[0] == "Zarro":
return 0
+ if result_count_parts[0] == "One":
+ return 1
return int(result_count_parts[0])
# Note: _load_query, _fetch_bug and _fetch_bugs_from_advanced_query
diff --git a/WebKitTools/Scripts/webkitpy/common/net/bugzilla/bugzilla_unittest.py b/WebKitTools/Scripts/webkitpy/common/net/bugzilla/bugzilla_unittest.py
index 9c03596..2e73220 100644
--- a/WebKitTools/Scripts/webkitpy/common/net/bugzilla/bugzilla_unittest.py
+++ b/WebKitTools/Scripts/webkitpy/common/net/bugzilla/bugzilla_unittest.py
@@ -356,6 +356,7 @@ class BugzillaQueriesTest(unittest.TestCase):
# Pages with results, always list the count at least twice.
self._assert_result_count(queries, '<span class="bz_result_count">314 bugs found.</span><span class="bz_result_count">314 bugs found.</span>', 314)
self._assert_result_count(queries, '<span class="bz_result_count">Zarro Boogs found.</span>', 0)
+ self._assert_result_count(queries, '<span class="bz_result_count">\n \nOne bug found.</span>', 1)
self.assertRaises(Exception, queries._parse_result_count, ['Invalid'])
def test_request_page_parsing(self):
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list