<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[168968] trunk/Tools</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/168968">168968</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2014-05-16 07:35:47 -0700 (Fri, 16 May 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>[webkitpy] In case of multiple bug rollout, all bugs should be reopened, not only the oldest one
https://bugs.webkit.org/show_bug.cgi?id=131363

Patch by Eva Balazsfalvi &lt;evab.u-szeged@partner.samsung.com&gt; on 2014-05-16
Reviewed by Csaba Osztrogonác.

* Scripts/webkitpy/common/checkout/checkout_mock.py:
* Scripts/webkitpy/common/net/bugzilla/bugzilla_mock.py:
(MockBugzilla):
* Scripts/webkitpy/tool/commands/download_unittest.py:
(test_create_rollout_multiple_revision_with_one_resolved):
(test_create_rollout_multiple_resolved):
(test_rollout_two_revisions):
(test_rollout_multiple_revisions):
(test_rollout_multiple_revisions_with_a_missing_bug_id):
* Scripts/webkitpy/tool/steps/createbug.py:
(CreateBug.run):
* Scripts/webkitpy/tool/steps/reopenbugafterrollout.py:
(ReopenBugAfterRollout.run):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkToolsChangeLog">trunk/Tools/ChangeLog</a></li>
<li><a href="#trunkToolsScriptswebkitpycommoncheckoutcheckout_mockpy">trunk/Tools/Scripts/webkitpy/common/checkout/checkout_mock.py</a></li>
<li><a href="#trunkToolsScriptswebkitpycommonnetbugzillabugzilla_mockpy">trunk/Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla_mock.py</a></li>
<li><a href="#trunkToolsScriptswebkitpytoolcommandsdownload_unittestpy">trunk/Tools/Scripts/webkitpy/tool/commands/download_unittest.py</a></li>
<li><a href="#trunkToolsScriptswebkitpytoolstepscreatebugpy">trunk/Tools/Scripts/webkitpy/tool/steps/createbug.py</a></li>
<li><a href="#trunkToolsScriptswebkitpytoolstepsreopenbugafterrolloutpy">trunk/Tools/Scripts/webkitpy/tool/steps/reopenbugafterrollout.py</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Tools/ChangeLog (168967 => 168968)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog        2014-05-16 13:22:00 UTC (rev 168967)
+++ trunk/Tools/ChangeLog        2014-05-16 14:35:47 UTC (rev 168968)
</span><span class="lines">@@ -1,3 +1,24 @@
</span><ins>+2014-05-16  Eva Balazsfalvi  &lt;evab.u-szeged@partner.samsung.com&gt;
+
+        [webkitpy] In case of multiple bug rollout, all bugs should be reopened, not only the oldest one
+        https://bugs.webkit.org/show_bug.cgi?id=131363
+
+        Reviewed by Csaba Osztrogonác.
+
+        * Scripts/webkitpy/common/checkout/checkout_mock.py:
+        * Scripts/webkitpy/common/net/bugzilla/bugzilla_mock.py:
+        (MockBugzilla):
+        * Scripts/webkitpy/tool/commands/download_unittest.py:
+        (test_create_rollout_multiple_revision_with_one_resolved):
+        (test_create_rollout_multiple_resolved):
+        (test_rollout_two_revisions):
+        (test_rollout_multiple_revisions):
+        (test_rollout_multiple_revisions_with_a_missing_bug_id):
+        * Scripts/webkitpy/tool/steps/createbug.py:
+        (CreateBug.run):
+        * Scripts/webkitpy/tool/steps/reopenbugafterrollout.py:
+        (ReopenBugAfterRollout.run):
+
</ins><span class="cx"> 2014-05-16  Martin Hodovan  &lt;mhodovan.u-szeged@partner.samsung.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [WK2] Change the remaining framework includes from WebKit2 to WebKit
</span></span></pre></div>
<a id="trunkToolsScriptswebkitpycommoncheckoutcheckout_mockpy"></a>
<div class="modfile"><h4>Modified: trunk/Tools/Scripts/webkitpy/common/checkout/checkout_mock.py (168967 => 168968)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/Scripts/webkitpy/common/checkout/checkout_mock.py        2014-05-16 13:22:00 UTC (rev 168967)
+++ trunk/Tools/Scripts/webkitpy/common/checkout/checkout_mock.py        2014-05-16 14:35:47 UTC (rev 168968)
</span><span class="lines">@@ -53,8 +53,34 @@
</span><span class="cx">             &quot;path/to/file&quot;,
</span><span class="cx">             &quot;another/file&quot;,
</span><span class="cx">         ],
</span><del>-        &quot;bug_description&quot;: &quot;Example description.&quot;,
</del><ins>+        &quot;bug_description&quot;: &quot;Example description of bug 50000.&quot;,
</ins><span class="cx">     }),
</span><ins>+    963: CommitInfo(963, &quot;eric@webkit.org&quot;, {
+        &quot;bug_id&quot;: 50005,
+        &quot;author_name&quot;: &quot;Carol Szabo&quot;,
+        &quot;author_email&quot;: &quot;carol.szabo@nokia.com&quot;,
+        &quot;author&quot;: committer_list.contributor_by_email(&quot;carol.szabo@nokia.com&quot;),
+        &quot;reviewer_text&quot;: &quot;Darin Adler&quot;,
+        &quot;reviewer&quot;: committer_list.committer_by_name(&quot;Darin Adler&quot;),
+        &quot;changed_files&quot;: [
+            &quot;path/to/file&quot;,
+            &quot;another/file&quot;,
+        ],
+        &quot;bug_description&quot;: &quot;Example description of bug 50005.&quot;,
+    }),
+    987: CommitInfo(987, &quot;eric@webkit.org&quot;, {
+        &quot;bug_id&quot;: 50006,
+        &quot;author_name&quot;: &quot;Adam Barth&quot;,
+        &quot;author_email&quot;: &quot;abarth@webkit.org&quot;,
+        &quot;author&quot;: committer_list.contributor_by_email(&quot;abarth@webkit.org&quot;),
+        &quot;reviewer_text&quot;: &quot;Darin Adler&quot;,
+        &quot;reviewer&quot;: committer_list.committer_by_name(&quot;Darin Adler&quot;),
+        &quot;changed_files&quot;: [
+            &quot;path/to/file&quot;,
+            &quot;another/file&quot;,
+        ],
+        &quot;bug_description&quot;: &quot;Example description of bug 50005.&quot;,
+    }),
</ins><span class="cx">     3001: CommitInfo(3001, &quot;tomz@codeaurora.org&quot;, {
</span><span class="cx">         &quot;bug_id&quot;: 50004,
</span><span class="cx">         &quot;author_name&quot;: &quot;Tom Zakrajsek&quot;,
</span><span class="lines">@@ -66,7 +92,7 @@
</span><span class="cx">             &quot;path/to/file&quot;,
</span><span class="cx">             &quot;another/file&quot;,
</span><span class="cx">         ],
</span><del>-        &quot;bug_description&quot;: &quot;Another example description.&quot;,
</del><ins>+        &quot;bug_description&quot;: &quot;Example description of bug 50004.&quot;,
</ins><span class="cx">     })
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkToolsScriptswebkitpycommonnetbugzillabugzilla_mockpy"></a>
<div class="modfile"><h4>Modified: trunk/Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla_mock.py (168967 => 168968)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla_mock.py        2014-05-16 13:22:00 UTC (rev 168967)
+++ trunk/Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla_mock.py        2014-05-16 14:35:47 UTC (rev 168968)
</span><span class="lines">@@ -236,6 +236,39 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> 
</span><ins>+_bug6 = {
+    &quot;id&quot;: 50005,
+    &quot;title&quot;: &quot;1st resolved bug&quot;,
+    &quot;reporter_email&quot;: _commit_queue_email,
+    &quot;assigned_to_email&quot;: &quot;foo@foo.com&quot;,
+    &quot;cc_emails&quot;: [],
+    &quot;attachments&quot;: [],
+    &quot;bug_status&quot;: &quot;RESOLVED&quot;,
+    &quot;comments&quot;: [{&quot;comment_date&quot;:  datetime.datetime(2011, 6, 11, 9, 4, 3),
+                  &quot;comment_email&quot;: &quot;bar@foo.com&quot;,
+                  &quot;text&quot;: &quot;Committed r95: &lt;http://trac.webkit.org/changeset/95&gt;&quot;,
+                  },
+                 ],
+
+}
+
+
+_bug7 = {
+    &quot;id&quot;: 50006,
+    &quot;title&quot;: &quot;2nd resolved bug&quot;,
+    &quot;reporter_email&quot;: &quot;eric@webkit.org&quot;,
+    &quot;assigned_to_email&quot;: &quot;foo@foo.com&quot;,
+    &quot;cc_emails&quot;: [&quot;abarth@webkit.org&quot;, ],
+    &quot;attachments&quot;: [],
+    &quot;bug_status&quot;: &quot;RESOLVED&quot;,
+    &quot;comments&quot;: [{&quot;comment_date&quot;:  datetime.datetime(2011, 6, 11, 9, 4, 3),
+                  &quot;comment_email&quot;: &quot;bar@foo.com&quot;,
+                  &quot;text&quot;: &quot;Message1.\nCommitted r105: &lt;http://trac.webkit.org/changeset/105&gt;&quot;,
+                  },
+                 ],
+}
+
+
</ins><span class="cx"> class MockBugzillaQueries(object):
</span><span class="cx"> 
</span><span class="cx">     def __init__(self, bugzilla):
</span><span class="lines">@@ -302,7 +335,7 @@
</span><span class="cx"> 
</span><span class="cx">     bug_server_url = &quot;http://example.com&quot;
</span><span class="cx"> 
</span><del>-    bug_cache = _id_to_object_dictionary(_bug1, _bug2, _bug3, _bug4, _bug5)
</del><ins>+    bug_cache = _id_to_object_dictionary(_bug1, _bug2, _bug3, _bug4, _bug5, _bug6, _bug7)
</ins><span class="cx"> 
</span><span class="cx">     attachment_cache = _id_to_object_dictionary(_patch1,
</span><span class="cx">                                                 _patch2,
</span></span></pre></div>
<a id="trunkToolsScriptswebkitpytoolcommandsdownload_unittestpy"></a>
<div class="modfile"><h4>Modified: trunk/Tools/Scripts/webkitpy/tool/commands/download_unittest.py (168967 => 168968)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/Scripts/webkitpy/tool/commands/download_unittest.py        2014-05-16 13:22:00 UTC (rev 168967)
+++ trunk/Tools/Scripts/webkitpy/tool/commands/download_unittest.py        2014-05-16 14:35:47 UTC (rev 168968)
</span><span class="lines">@@ -326,7 +326,7 @@
</span><span class="cx"> Reason
</span><span class="cx"> component: MOCK component
</span><span class="cx"> cc: MOCK cc
</span><del>-blocked: 50000
</del><ins>+blocked: 50000, 50000
</ins><span class="cx"> MOCK add_patch_to_bug: bug_id=60001, description=ROLLOUT of r852, mark_for_review=False, mark_for_commit_queue=True, mark_for_landing=False
</span><span class="cx"> -- Begin comment --
</span><span class="cx"> Any committer can land this patch automatically by marking it commit-queue+.  The commit-queue will build and test the patch before landing to ensure that the rollout will be successful.  This process takes approximately 15 minutes.
</span><span class="lines">@@ -338,9 +338,34 @@
</span><span class="cx"> where ATTACHMENT_ID is the ID of this attachment.
</span><span class="cx"> -- End comment --
</span><span class="cx"> &quot;&quot;&quot;
</span><del>-        self.maxDiff = None
</del><span class="cx">         self.assert_execute_outputs(CreateRollout(), [&quot;855 852 854&quot;, &quot;Reason&quot;], options=self._default_options(), expected_logs=expected_logs)
</span><span class="cx"> 
</span><ins>+    def test_create_rollout_multiple_revision_with_one_resolved(self):
+        expected_logs = &quot;&quot;&quot;Preparing rollout for bug 50000.
+Unable to parse bug number from diff.
+Preparing rollout for bug 50004.
+Updating working directory
+MOCK create_bug
+bug_title: REGRESSION(r852): Reason
+bug_description: http://trac.webkit.org/changeset/852 broke the build:
+Reason
+component: MOCK component
+cc: MOCK cc
+blocked: 50000, 50004
+MOCK reopen_bug 50004 with comment 'Re-opened since this is blocked by bug 60001'
+MOCK add_patch_to_bug: bug_id=60001, description=ROLLOUT of r852, mark_for_review=False, mark_for_commit_queue=True, mark_for_landing=False
+-- Begin comment --
+Any committer can land this patch automatically by marking it commit-queue+.  The commit-queue will build and test the patch before landing to ensure that the rollout will be successful.  This process takes approximately 15 minutes.
+
+If you would like to land the rollout faster, you can use the following command:
+
+  webkit-patch land-attachment ATTACHMENT_ID
+
+where ATTACHMENT_ID is the ID of this attachment.
+-- End comment --
+&quot;&quot;&quot;
+        self.assert_execute_outputs(CreateRollout(), [&quot;855 852 3001&quot;, &quot;Reason&quot;], options=self._default_options(), expected_logs=expected_logs)
+
</ins><span class="cx">     def test_create_rollout_resolved(self):
</span><span class="cx">         expected_logs = &quot;&quot;&quot;Preparing rollout for bug 50004.
</span><span class="cx"> Updating working directory
</span><span class="lines">@@ -365,6 +390,34 @@
</span><span class="cx"> &quot;&quot;&quot;
</span><span class="cx">         self.assert_execute_outputs(CreateRollout(), [3001, &quot;Reason&quot;], options=self._default_options(), expected_logs=expected_logs)
</span><span class="cx"> 
</span><ins>+    def test_create_rollout_multiple_resolved(self):
+        expected_logs = &quot;&quot;&quot;Preparing rollout for bug 50005.
+Preparing rollout for bug 50006.
+Preparing rollout for bug 50004.
+Updating working directory
+MOCK create_bug
+bug_title: REGRESSION(r963): Reason
+bug_description: http://trac.webkit.org/changeset/963 broke the build:
+Reason
+component: MOCK component
+cc: MOCK cc
+blocked: 50005, 50006, 50004
+MOCK reopen_bug 50005 with comment 'Re-opened since this is blocked by bug 60001'
+MOCK reopen_bug 50006 with comment 'Re-opened since this is blocked by bug 60001'
+MOCK reopen_bug 50004 with comment 'Re-opened since this is blocked by bug 60001'
+MOCK add_patch_to_bug: bug_id=60001, description=ROLLOUT of r963, mark_for_review=False, mark_for_commit_queue=True, mark_for_landing=False
+-- Begin comment --
+Any committer can land this patch automatically by marking it commit-queue+.  The commit-queue will build and test the patch before landing to ensure that the rollout will be successful.  This process takes approximately 15 minutes.
+
+If you would like to land the rollout faster, you can use the following command:
+
+  webkit-patch land-attachment ATTACHMENT_ID
+
+where ATTACHMENT_ID is the ID of this attachment.
+-- End comment --
+&quot;&quot;&quot;
+        self.assert_execute_outputs(CreateRollout(), [&quot;987 3001 963&quot;, &quot;Reason&quot;], options=self._default_options(), expected_logs=expected_logs)
+
</ins><span class="cx">     def test_rollout(self):
</span><span class="cx">         expected_logs = &quot;&quot;&quot;Preparing rollout for bug 50000.
</span><span class="cx"> Updating working directory
</span><span class="lines">@@ -380,3 +433,72 @@
</span><span class="cx"> &quot;&quot;&quot;
</span><span class="cx">         self.assert_execute_outputs(Rollout(), [852, &quot;Reason&quot;, &quot;Description&quot;], options=self._default_options(), expected_logs=expected_logs)
</span><span class="cx"> 
</span><ins>+    def test_rollout_two_revisions(self):
+        expected_logs = &quot;&quot;&quot;Preparing rollout for bug 50000.
+Preparing rollout for bug 50005.
+Updating working directory
+MOCK: user.open_url: file://...
+Was that diff correct?
+Building WebKit
+Committed r49824: &lt;http://trac.webkit.org/changeset/49824&gt;
+MOCK reopen_bug 50000 with comment 'Reverted r852 and r963 for reason:
+
+Reason
+
+Committed r49824: &lt;http://trac.webkit.org/changeset/49824&gt;'
+MOCK reopen_bug 50005 with comment 'Reverted r852 and r963 for reason:
+
+Reason
+
+Committed r49824: &lt;http://trac.webkit.org/changeset/49824&gt;'
+&quot;&quot;&quot;
+        self.assert_execute_outputs(Rollout(), [&quot;852 963&quot;, &quot;Reason&quot;, &quot;Description&quot;], options=self._default_options(), expected_logs=expected_logs)
+
+    def test_rollout_multiple_revisions(self):
+        expected_logs = &quot;&quot;&quot;Preparing rollout for bug 50000.
+Preparing rollout for bug 50005.
+Preparing rollout for bug 50004.
+Updating working directory
+MOCK: user.open_url: file://...
+Was that diff correct?
+Building WebKit
+Committed r49824: &lt;http://trac.webkit.org/changeset/49824&gt;
+MOCK reopen_bug 50000 with comment 'Reverted r852, r963, and r3001 for reason:
+
+Reason
+
+Committed r49824: &lt;http://trac.webkit.org/changeset/49824&gt;'
+MOCK reopen_bug 50005 with comment 'Reverted r852, r963, and r3001 for reason:
+
+Reason
+
+Committed r49824: &lt;http://trac.webkit.org/changeset/49824&gt;'
+MOCK reopen_bug 50004 with comment 'Reverted r852, r963, and r3001 for reason:
+
+Reason
+
+Committed r49824: &lt;http://trac.webkit.org/changeset/49824&gt;'
+&quot;&quot;&quot;
+        self.assert_execute_outputs(Rollout(), [&quot;852 3001 963&quot;, &quot;Reason&quot;, &quot;Description&quot;], options=self._default_options(), expected_logs=expected_logs)
+
+    def test_rollout_multiple_revisions_with_a_missing_bug_id(self):
+        expected_logs = &quot;&quot;&quot;Preparing rollout for bug 50000.
+Preparing rollout for bug 50005.
+Unable to parse bug number from diff.
+Updating working directory
+MOCK: user.open_url: file://...
+Was that diff correct?
+Building WebKit
+Committed r49824: &lt;http://trac.webkit.org/changeset/49824&gt;
+MOCK reopen_bug 50000 with comment 'Reverted r852, r963, and r999 for reason:
+
+Reason
+
+Committed r49824: &lt;http://trac.webkit.org/changeset/49824&gt;'
+MOCK reopen_bug 50005 with comment 'Reverted r852, r963, and r999 for reason:
+
+Reason
+
+Committed r49824: &lt;http://trac.webkit.org/changeset/49824&gt;'
+&quot;&quot;&quot;
+        self.assert_execute_outputs(Rollout(), [&quot;852 999 963&quot;, &quot;Reason&quot;, &quot;Description&quot;], options=self._default_options(), expected_logs=expected_logs)
</ins></span></pre></div>
<a id="trunkToolsScriptswebkitpytoolstepscreatebugpy"></a>
<div class="modfile"><h4>Modified: trunk/Tools/Scripts/webkitpy/tool/steps/createbug.py (168967 => 168968)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/Scripts/webkitpy/tool/steps/createbug.py        2014-05-16 13:22:00 UTC (rev 168967)
+++ trunk/Tools/Scripts/webkitpy/tool/steps/createbug.py        2014-05-16 14:35:47 UTC (rev 168968)
</span><span class="lines">@@ -46,11 +46,14 @@
</span><span class="cx">         cc = self._options.cc
</span><span class="cx">         if not cc:
</span><span class="cx">             cc = state.get(&quot;bug_cc&quot;)
</span><del>-        blocks = self._options.blocks
-        if not blocks:
-            blocks = state.get(&quot;bug_blocked&quot;)
</del><ins>+        if self._options.blocks:
+            blocked_bugs = [int(self._options.blocks)]
+        else:
+            blocked_bugs = state.get(&quot;bug_id_list&quot;, [])
+        blocks = &quot;, &quot;.join(str(bug) for bug in blocked_bugs if bug)
</ins><span class="cx">         state[&quot;bug_id&quot;] = self._tool.bugs.create_bug(state[&quot;bug_title&quot;], state[&quot;bug_description&quot;], blocked=blocks, component=self._options.component, cc=cc)
</span><del>-        if blocks:
-            status = self._tool.bugs.fetch_bug(blocks).status()
-            if status == 'RESOLVED':
-                self._tool.bugs.reopen_bug(blocks, &quot;Re-opened since this is blocked by bug %s&quot; % state[&quot;bug_id&quot;])
</del><ins>+        for blocked_bug in blocked_bugs:
+            if blocked_bug:
+                status = self._tool.bugs.fetch_bug(blocked_bug).status()
+                if status == 'RESOLVED':
+                    self._tool.bugs.reopen_bug(blocked_bug, &quot;Re-opened since this is blocked by bug %s&quot; % state[&quot;bug_id&quot;])
</ins></span></pre></div>
<a id="trunkToolsScriptswebkitpytoolstepsreopenbugafterrolloutpy"></a>
<div class="modfile"><h4>Modified: trunk/Tools/Scripts/webkitpy/tool/steps/reopenbugafterrollout.py (168967 => 168968)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/Scripts/webkitpy/tool/steps/reopenbugafterrollout.py        2014-05-16 13:22:00 UTC (rev 168967)
+++ trunk/Tools/Scripts/webkitpy/tool/steps/reopenbugafterrollout.py        2014-05-16 14:35:47 UTC (rev 168968)
</span><span class="lines">@@ -29,6 +29,7 @@
</span><span class="cx"> import logging
</span><span class="cx"> 
</span><span class="cx"> from webkitpy.tool.comments import bug_comment_from_commit_text
</span><ins>+from webkitpy.tool.grammar import join_with_separators
</ins><span class="cx"> from webkitpy.tool.steps.abstractstep import AbstractStep
</span><span class="cx"> 
</span><span class="cx"> _log = logging.getLogger(__name__)
</span><span class="lines">@@ -37,11 +38,13 @@
</span><span class="cx"> class ReopenBugAfterRollout(AbstractStep):
</span><span class="cx">     def run(self, state):
</span><span class="cx">         commit_comment = bug_comment_from_commit_text(self._tool.scm(), state[&quot;commit_text&quot;])
</span><del>-        comment_text = &quot;Reverted r%s for reason:\n\n%s\n\n%s&quot; % (state[&quot;revision&quot;], state[&quot;reason&quot;], commit_comment)
-
-        bug_id = state[&quot;bug_blocked&quot;]
-        if not bug_id:
</del><ins>+        revision_list = join_with_separators(['r' + str(revision) for revision in state[&quot;revision_list&quot;]])
+        comment_text = &quot;Reverted %s for reason:\n\n%s\n\n%s&quot; % (revision_list, state[&quot;reason&quot;], commit_comment)
+        bug_ids = state[&quot;bug_id_list&quot;]
+        if not bug_ids:
</ins><span class="cx">             _log.info(comment_text)
</span><span class="cx">             _log.info(&quot;No bugs were updated.&quot;)
</span><span class="cx">             return
</span><del>-        self._tool.bugs.reopen_bug(bug_id, comment_text)
</del><ins>+        for bug_id in bug_ids:
+            if bug_id:
+                self._tool.bugs.reopen_bug(bug_id, comment_text)
</ins></span></pre>
</div>
</div>

</body>
</html>