Title: [149630] trunk/Tools
- Revision
- 149630
- Author
- ddkil...@apple.com
- Date
- 2013-05-06 12:49:08 -0700 (Mon, 06 May 2013)
Log Message
webkit-patch: fix 'upload' command with Bugzilla 4.2.5
<http://webkit.org/b/115667>
Reviewed by Dirk Pranke.
* Scripts/webkitpy/common/net/bugzilla/bugzilla.py:
(Bugzilla._check_create_bug_response): Update regex to work with
Bugzilla 3.2.3 and 4.2.5.
* Scripts/webkitpy/common/net/bugzilla/bugzilla_unittest.py:
(test__check_create_bug_response): Add new test that covers both
old and new <title> variations.
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (149629 => 149630)
--- trunk/Tools/ChangeLog 2013-05-06 19:38:10 UTC (rev 149629)
+++ trunk/Tools/ChangeLog 2013-05-06 19:49:08 UTC (rev 149630)
@@ -1,3 +1,17 @@
+2013-05-06 David Kilzer <ddkil...@apple.com>
+
+ webkit-patch: fix 'upload' command with Bugzilla 4.2.5
+ <http://webkit.org/b/115667>
+
+ Reviewed by Dirk Pranke.
+
+ * Scripts/webkitpy/common/net/bugzilla/bugzilla.py:
+ (Bugzilla._check_create_bug_response): Update regex to work with
+ Bugzilla 3.2.3 and 4.2.5.
+ * Scripts/webkitpy/common/net/bugzilla/bugzilla_unittest.py:
+ (test__check_create_bug_response): Add new test that covers both
+ old and new <title> variations.
+
2013-05-06 Zan Dobersek <zdober...@igalia.com>
[Flakiness Dashboard] Stop decoding SnowLeopard builder names into platforms
Modified: trunk/Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla.py (149629 => 149630)
--- trunk/Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla.py 2013-05-06 19:38:10 UTC (rev 149629)
+++ trunk/Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla.py 2013-05-06 19:49:08 UTC (rev 149630)
@@ -629,7 +629,7 @@
# FIXME: There has to be a more concise way to write this method.
def _check_create_bug_response(self, response_html):
- match = re.search("<title>Bug (?P<bug_id>\d+) Submitted</title>",
+ match = re.search("<title>Bug (?P<bug_id>\d+) Submitted[^<]*</title>",
response_html)
if match:
return match.group('bug_id')
Modified: trunk/Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla_unittest.py (149629 => 149630)
--- trunk/Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla_unittest.py 2013-05-06 19:38:10 UTC (rev 149629)
+++ trunk/Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla_unittest.py 2013-05-06 19:49:08 UTC (rev 149630)
@@ -336,7 +336,16 @@
assert_commit_queue_flag(mark_for_landing=True, mark_for_commit_queue=False, expected='+', username='revie...@webkit.org')
assert_commit_queue_flag(mark_for_landing=True, mark_for_commit_queue=True, expected='+', username='revie...@webkit.org')
+ def test__check_create_bug_response(self):
+ bugzilla = Bugzilla()
+ title_html_bugzilla_323 = "<title>Bug 101640 Submitted</title>"
+ self.assertEqual(bugzilla._check_create_bug_response(title_html_bugzilla_323), '101640')
+
+ title_html_bugzilla_425 = "<title>Bug 101640 Submitted – Testing webkit-patch again</title>"
+ self.assertEqual(bugzilla._check_create_bug_response(title_html_bugzilla_425), '101640')
+
+
class BugzillaQueriesTest(unittest.TestCase):
_sample_request_page = """
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes