<!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 <evab.u-szeged@partner.samsung.com> 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 <evab.u-szeged@partner.samsung.com>
+
+ [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 <mhodovan.u-szeged@partner.samsung.com>
</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"> "path/to/file",
</span><span class="cx"> "another/file",
</span><span class="cx"> ],
</span><del>- "bug_description": "Example description.",
</del><ins>+ "bug_description": "Example description of bug 50000.",
</ins><span class="cx"> }),
</span><ins>+ 963: CommitInfo(963, "eric@webkit.org", {
+ "bug_id": 50005,
+ "author_name": "Carol Szabo",
+ "author_email": "carol.szabo@nokia.com",
+ "author": committer_list.contributor_by_email("carol.szabo@nokia.com"),
+ "reviewer_text": "Darin Adler",
+ "reviewer": committer_list.committer_by_name("Darin Adler"),
+ "changed_files": [
+ "path/to/file",
+ "another/file",
+ ],
+ "bug_description": "Example description of bug 50005.",
+ }),
+ 987: CommitInfo(987, "eric@webkit.org", {
+ "bug_id": 50006,
+ "author_name": "Adam Barth",
+ "author_email": "abarth@webkit.org",
+ "author": committer_list.contributor_by_email("abarth@webkit.org"),
+ "reviewer_text": "Darin Adler",
+ "reviewer": committer_list.committer_by_name("Darin Adler"),
+ "changed_files": [
+ "path/to/file",
+ "another/file",
+ ],
+ "bug_description": "Example description of bug 50005.",
+ }),
</ins><span class="cx"> 3001: CommitInfo(3001, "tomz@codeaurora.org", {
</span><span class="cx"> "bug_id": 50004,
</span><span class="cx"> "author_name": "Tom Zakrajsek",
</span><span class="lines">@@ -66,7 +92,7 @@
</span><span class="cx"> "path/to/file",
</span><span class="cx"> "another/file",
</span><span class="cx"> ],
</span><del>- "bug_description": "Another example description.",
</del><ins>+ "bug_description": "Example description of bug 50004.",
</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 = {
+ "id": 50005,
+ "title": "1st resolved bug",
+ "reporter_email": _commit_queue_email,
+ "assigned_to_email": "foo@foo.com",
+ "cc_emails": [],
+ "attachments": [],
+ "bug_status": "RESOLVED",
+ "comments": [{"comment_date": datetime.datetime(2011, 6, 11, 9, 4, 3),
+ "comment_email": "bar@foo.com",
+ "text": "Committed r95: <http://trac.webkit.org/changeset/95>",
+ },
+ ],
+
+}
+
+
+_bug7 = {
+ "id": 50006,
+ "title": "2nd resolved bug",
+ "reporter_email": "eric@webkit.org",
+ "assigned_to_email": "foo@foo.com",
+ "cc_emails": ["abarth@webkit.org", ],
+ "attachments": [],
+ "bug_status": "RESOLVED",
+ "comments": [{"comment_date": datetime.datetime(2011, 6, 11, 9, 4, 3),
+ "comment_email": "bar@foo.com",
+ "text": "Message1.\nCommitted r105: <http://trac.webkit.org/changeset/105>",
+ },
+ ],
+}
+
+
</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 = "http://example.com"
</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"> """
</span><del>- self.maxDiff = None
</del><span class="cx"> self.assert_execute_outputs(CreateRollout(), ["855 852 854", "Reason"], 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 = """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 --
+"""
+ self.assert_execute_outputs(CreateRollout(), ["855 852 3001", "Reason"], options=self._default_options(), expected_logs=expected_logs)
+
</ins><span class="cx"> def test_create_rollout_resolved(self):
</span><span class="cx"> expected_logs = """Preparing rollout for bug 50004.
</span><span class="cx"> Updating working directory
</span><span class="lines">@@ -365,6 +390,34 @@
</span><span class="cx"> """
</span><span class="cx"> self.assert_execute_outputs(CreateRollout(), [3001, "Reason"], options=self._default_options(), expected_logs=expected_logs)
</span><span class="cx">
</span><ins>+ def test_create_rollout_multiple_resolved(self):
+ expected_logs = """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 --
+"""
+ self.assert_execute_outputs(CreateRollout(), ["987 3001 963", "Reason"], options=self._default_options(), expected_logs=expected_logs)
+
</ins><span class="cx"> def test_rollout(self):
</span><span class="cx"> expected_logs = """Preparing rollout for bug 50000.
</span><span class="cx"> Updating working directory
</span><span class="lines">@@ -380,3 +433,72 @@
</span><span class="cx"> """
</span><span class="cx"> self.assert_execute_outputs(Rollout(), [852, "Reason", "Description"], options=self._default_options(), expected_logs=expected_logs)
</span><span class="cx">
</span><ins>+ def test_rollout_two_revisions(self):
+ expected_logs = """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: <http://trac.webkit.org/changeset/49824>
+MOCK reopen_bug 50000 with comment 'Reverted r852 and r963 for reason:
+
+Reason
+
+Committed r49824: <http://trac.webkit.org/changeset/49824>'
+MOCK reopen_bug 50005 with comment 'Reverted r852 and r963 for reason:
+
+Reason
+
+Committed r49824: <http://trac.webkit.org/changeset/49824>'
+"""
+ self.assert_execute_outputs(Rollout(), ["852 963", "Reason", "Description"], options=self._default_options(), expected_logs=expected_logs)
+
+ def test_rollout_multiple_revisions(self):
+ expected_logs = """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: <http://trac.webkit.org/changeset/49824>
+MOCK reopen_bug 50000 with comment 'Reverted r852, r963, and r3001 for reason:
+
+Reason
+
+Committed r49824: <http://trac.webkit.org/changeset/49824>'
+MOCK reopen_bug 50005 with comment 'Reverted r852, r963, and r3001 for reason:
+
+Reason
+
+Committed r49824: <http://trac.webkit.org/changeset/49824>'
+MOCK reopen_bug 50004 with comment 'Reverted r852, r963, and r3001 for reason:
+
+Reason
+
+Committed r49824: <http://trac.webkit.org/changeset/49824>'
+"""
+ self.assert_execute_outputs(Rollout(), ["852 3001 963", "Reason", "Description"], options=self._default_options(), expected_logs=expected_logs)
+
+ def test_rollout_multiple_revisions_with_a_missing_bug_id(self):
+ expected_logs = """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: <http://trac.webkit.org/changeset/49824>
+MOCK reopen_bug 50000 with comment 'Reverted r852, r963, and r999 for reason:
+
+Reason
+
+Committed r49824: <http://trac.webkit.org/changeset/49824>'
+MOCK reopen_bug 50005 with comment 'Reverted r852, r963, and r999 for reason:
+
+Reason
+
+Committed r49824: <http://trac.webkit.org/changeset/49824>'
+"""
+ self.assert_execute_outputs(Rollout(), ["852 999 963", "Reason", "Description"], 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("bug_cc")
</span><del>- blocks = self._options.blocks
- if not blocks:
- blocks = state.get("bug_blocked")
</del><ins>+ if self._options.blocks:
+ blocked_bugs = [int(self._options.blocks)]
+ else:
+ blocked_bugs = state.get("bug_id_list", [])
+ blocks = ", ".join(str(bug) for bug in blocked_bugs if bug)
</ins><span class="cx"> state["bug_id"] = self._tool.bugs.create_bug(state["bug_title"], state["bug_description"], 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, "Re-opened since this is blocked by bug %s" % state["bug_id"])
</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, "Re-opened since this is blocked by bug %s" % state["bug_id"])
</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["commit_text"])
</span><del>- comment_text = "Reverted r%s for reason:\n\n%s\n\n%s" % (state["revision"], state["reason"], commit_comment)
-
- bug_id = state["bug_blocked"]
- if not bug_id:
</del><ins>+ revision_list = join_with_separators(['r' + str(revision) for revision in state["revision_list"]])
+ comment_text = "Reverted %s for reason:\n\n%s\n\n%s" % (revision_list, state["reason"], commit_comment)
+ bug_ids = state["bug_id_list"]
+ if not bug_ids:
</ins><span class="cx"> _log.info(comment_text)
</span><span class="cx"> _log.info("No bugs were updated.")
</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>