[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373

eric at webkit.org eric at webkit.org
Thu Apr 8 00:51:53 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit 107186b5f783a082f9448402f8186e3ebe5046fc
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Dec 30 04:19:58 2009 +0000

    2009-12-29  Adam Barth  <abarth at webkit.org>
    
            Reviewed by Eric Seidel.
    
            [bzt] Don't crash if user types a number during PromptForBugOrTitleStep
            https://bugs.webkit.org/show_bug.cgi?id=33038
    
            Simple fix with test.
    
            * Scripts/modules/buildsteps.py:
            * Scripts/modules/buildsteps_unittest.py:
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@52640 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index 0112508..682f33f 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -2,6 +2,18 @@
 
         Reviewed by Eric Seidel.
 
+        [bzt] Don't crash if user types a number during PromptForBugOrTitleStep
+        https://bugs.webkit.org/show_bug.cgi?id=33038
+
+        Simple fix with test.
+
+        * Scripts/modules/buildsteps.py:
+        * Scripts/modules/buildsteps_unittest.py:
+
+2009-12-29  Adam Barth  <abarth at webkit.org>
+
+        Reviewed by Eric Seidel.
+
         [bzt] post-diff requires reading to the end
         https://bugs.webkit.org/show_bug.cgi?id=33036
 
diff --git a/WebKitTools/Scripts/modules/buildsteps.py b/WebKitTools/Scripts/modules/buildsteps.py
index dfa6323..e815370 100644
--- a/WebKitTools/Scripts/modules/buildsteps.py
+++ b/WebKitTools/Scripts/modules/buildsteps.py
@@ -149,7 +149,6 @@ class PromptForBugOrTitleStep(AbstractStep):
         # Otherwise we assume it's a bug subject.
         try:
             state["bug_id"] = int(user_response)
-            return int_value
         except ValueError, TypeError:
             state["bug_title"] = user_response
             # FIXME: This is kind of a lame description.
diff --git a/WebKitTools/Scripts/modules/buildsteps_unittest.py b/WebKitTools/Scripts/modules/buildsteps_unittest.py
index 5c6c1fc..2f69d6d 100644
--- a/WebKitTools/Scripts/modules/buildsteps_unittest.py
+++ b/WebKitTools/Scripts/modules/buildsteps_unittest.py
@@ -28,7 +28,7 @@
 
 import unittest
 
-from modules.buildsteps import UpdateChangeLogsWithReviewerStep, UpdateStep
+from modules.buildsteps import UpdateChangeLogsWithReviewerStep, UpdateStep, PromptForBugOrTitleStep
 from modules.mock_bugzillatool import MockBugzillaTool
 from modules.outputcapture import OutputCapture
 from modules.mock import Mock
@@ -43,12 +43,21 @@ class UpdateChangeLogsWithReviewerStepTest(unittest.TestCase):
 
 
 class StepsTest(unittest.TestCase):
-    def _run_step(self, step, options, state=None):
+    def _run_step(self, step, tool=None, options=None, state=None):
+        if not tool:
+            tool = MockBugzillaTool()
+        if not options:
+            options = Mock()
         if not state:
             state = {}
-        step(MockBugzillaTool(), options).run(state)
+        step(tool, options).run(state)
 
     def test_update_step(self):
         options = Mock()
         options.update = True
         self._run_step(UpdateStep, options)
+
+    def test_prompt_for_bug_or_title_step(self):
+        tool = MockBugzillaTool()
+        tool.user.prompt = lambda message: 42
+        self._run_step(PromptForBugOrTitleStep, tool=tool)

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list