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

abarth at webkit.org abarth at webkit.org
Thu Apr 8 00:47:30 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit 16a07a53128744ddcdacb5c875defbfb5defa231
Author: abarth at webkit.org <abarth at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Dec 23 08:00:52 2009 +0000

    2009-12-22  Adam Barth  <abarth at webkit.org>
    
            Reviewed by Maciej Stachowiak.
    
            [bzt] Don't call create-patch twice during post-diff
            https://bugs.webkit.org/show_bug.cgi?id=32893
    
            If we call create-patch to get the bug number, cache the diff in the
            state so we don't need to call it again.
    
            * Scripts/modules/buildsteps.py:
            * Scripts/modules/commands/upload.py:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@52523 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index c24596a..179001d 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,16 @@
+2009-12-22  Adam Barth  <abarth at webkit.org>
+
+        Reviewed by Maciej Stachowiak.
+
+        [bzt] Don't call create-patch twice during post-diff
+        https://bugs.webkit.org/show_bug.cgi?id=32893
+
+        If we call create-patch to get the bug number, cache the diff in the
+        state so we don't need to call it again.
+
+        * Scripts/modules/buildsteps.py:
+        * Scripts/modules/commands/upload.py:
+
 2009-12-22  Daniel Bates  <dbates at rim.com>
 
         Reviewed by Eric Seidel.
diff --git a/WebKitTools/Scripts/modules/buildsteps.py b/WebKitTools/Scripts/modules/buildsteps.py
index f8a35d1..6e1f9df 100644
--- a/WebKitTools/Scripts/modules/buildsteps.py
+++ b/WebKitTools/Scripts/modules/buildsteps.py
@@ -160,7 +160,7 @@ class PostDiffToBugStep(AbstractStep):
         ]
 
     def run(self, state):
-        diff = self._tool.scm().create_patch()
+        diff = state.get("diff") or self._tool.scm().create_patch()
         diff_file = StringIO.StringIO(diff) # add_patch_to_bug expects a file-like object
         description = self._options.description or "Patch"
         self._tool.bugs.add_patch_to_bug(state["bug_id"], diff_file, description, mark_for_review=self._options.review, mark_for_commit_queue=self._options.request_commit)
diff --git a/WebKitTools/Scripts/modules/commands/upload.py b/WebKitTools/Scripts/modules/commands/upload.py
index 8f93130..d8de19a 100644
--- a/WebKitTools/Scripts/modules/commands/upload.py
+++ b/WebKitTools/Scripts/modules/commands/upload.py
@@ -78,10 +78,15 @@ class PostDiff(AbstractSequencedCommmand):
 
     def _prepare_state(self, options, args, tool):
         # Perfer a bug id passed as an argument over a bug url in the diff (i.e. ChangeLogs).
-        bug_id = (args and args[0]) or parse_bug_id(tool.scm().create_patch())
+        state = {}
+        bug_id = args and args[0]
+        if not bug_id:
+            state["diff"] = tool.scm().create_patch()
+            bug_id = parse_bug_id(state["diff"])
         if not bug_id:
             error("No bug id passed and no bug url found in diff, can't post.")
-        return { "bug_id" : bug_id }
+        state["bug_id"] = bug_id
+        return state
 
 
 class SubmitPatch(AbstractSequencedCommmand):

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list