<!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>[165447] 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/165447">165447</a></dd>
<dt>Author</dt> <dd>ossy@webkit.org</dd>
<dt>Date</dt> <dd>2014-03-11 04:23:27 -0700 (Tue, 11 Mar 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>webkitbot rollout ChangeLogs should be nicer
https://bugs.webkit.org/show_bug.cgi?id=122654

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

Added bug urls and descriptions of rolled out patches to the rollout changelog
if they are present in the original changelog. Additionally removed the list of
changed files and functions.

* Scripts/webkitpy/common/checkout/changelog.py:
(ChangeLog.update_with_unreviewed_message): Cut off the list of modified files.
* Scripts/webkitpy/common/checkout/checkout.py:
(Checkout._changelog_data_for_revision): Store bug description.
* Scripts/webkitpy/common/checkout/checkout_mock.py:
* Scripts/webkitpy/common/checkout/checkout_unittest.py:
(CheckoutTest.test_commit_info_for_revision):
* Scripts/webkitpy/common/checkout/commitinfo.py:
(CommitInfo.bug_description): Added.
(CommitInfo.to_json):
* Scripts/webkitpy/common/checkout/commitinfo_unittest.py:
(CommitInfoTest.test_commit_info_creation):
* Scripts/webkitpy/tool/commands/download.py:
(AbstractRolloutPrepCommand._prepare_state): Store bug ids and descriptions of rolled
out patches for creating rollout changelog.
(CreateRollout._prepare_state): Remove obsolete comments and code, the bug id that
caused the regression is stored in state[&quot;bug_blocked&quot;] now.
* Scripts/webkitpy/tool/commands/download_unittest.py:
(test_prepare_rollout):
(test_create_rollout_multiple_revision):
* Scripts/webkitpy/tool/steps/preparechangelogforrevert.py:
(PrepareChangeLogForRevert._message_for_revert): Add bug urls and descriptions of
rolled out patches to the changelog.
(PrepareChangeLogForRevert.run):
* Scripts/webkitpy/tool/steps/preparechangelogforrevert_unittest.py:
(UpdateChangeLogsForRevertTest):
(test_message_for_revert):
* 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="#trunkToolsScriptswebkitpycommoncheckoutchangelogpy">trunk/Tools/Scripts/webkitpy/common/checkout/changelog.py</a></li>
<li><a href="#trunkToolsScriptswebkitpycommoncheckoutcheckoutpy">trunk/Tools/Scripts/webkitpy/common/checkout/checkout.py</a></li>
<li><a href="#trunkToolsScriptswebkitpycommoncheckoutcheckout_mockpy">trunk/Tools/Scripts/webkitpy/common/checkout/checkout_mock.py</a></li>
<li><a href="#trunkToolsScriptswebkitpycommoncheckoutcheckout_unittestpy">trunk/Tools/Scripts/webkitpy/common/checkout/checkout_unittest.py</a></li>
<li><a href="#trunkToolsScriptswebkitpycommoncheckoutcommitinfopy">trunk/Tools/Scripts/webkitpy/common/checkout/commitinfo.py</a></li>
<li><a href="#trunkToolsScriptswebkitpycommoncheckoutcommitinfo_unittestpy">trunk/Tools/Scripts/webkitpy/common/checkout/commitinfo_unittest.py</a></li>
<li><a href="#trunkToolsScriptswebkitpytoolcommandsdownloadpy">trunk/Tools/Scripts/webkitpy/tool/commands/download.py</a></li>
<li><a href="#trunkToolsScriptswebkitpytoolcommandsdownload_unittestpy">trunk/Tools/Scripts/webkitpy/tool/commands/download_unittest.py</a></li>
<li><a href="#trunkToolsScriptswebkitpytoolstepspreparechangelogforrevertpy">trunk/Tools/Scripts/webkitpy/tool/steps/preparechangelogforrevert.py</a></li>
<li><a href="#trunkToolsScriptswebkitpytoolstepspreparechangelogforrevert_unittestpy">trunk/Tools/Scripts/webkitpy/tool/steps/preparechangelogforrevert_unittest.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 (165446 => 165447)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog        2014-03-11 11:19:06 UTC (rev 165446)
+++ trunk/Tools/ChangeLog        2014-03-11 11:23:27 UTC (rev 165447)
</span><span class="lines">@@ -1,3 +1,44 @@
</span><ins>+2014-03-11  Eva Balazsfalvi  &lt;evab.u-szeged@partner.samsung.com&gt;
+
+        webkitbot rollout ChangeLogs should be nicer
+        https://bugs.webkit.org/show_bug.cgi?id=122654
+
+        Reviewed by Csaba Osztrogonác.
+
+        Added bug urls and descriptions of rolled out patches to the rollout changelog
+        if they are present in the original changelog. Additionally removed the list of
+        changed files and functions.
+
+        * Scripts/webkitpy/common/checkout/changelog.py:
+        (ChangeLog.update_with_unreviewed_message): Cut off the list of modified files.
+        * Scripts/webkitpy/common/checkout/checkout.py:
+        (Checkout._changelog_data_for_revision): Store bug description.
+        * Scripts/webkitpy/common/checkout/checkout_mock.py:
+        * Scripts/webkitpy/common/checkout/checkout_unittest.py:
+        (CheckoutTest.test_commit_info_for_revision):
+        * Scripts/webkitpy/common/checkout/commitinfo.py:
+        (CommitInfo.bug_description): Added.
+        (CommitInfo.to_json):
+        * Scripts/webkitpy/common/checkout/commitinfo_unittest.py:
+        (CommitInfoTest.test_commit_info_creation):
+        * Scripts/webkitpy/tool/commands/download.py:
+        (AbstractRolloutPrepCommand._prepare_state): Store bug ids and descriptions of rolled
+        out patches for creating rollout changelog.
+        (CreateRollout._prepare_state): Remove obsolete comments and code, the bug id that
+        caused the regression is stored in state[&quot;bug_blocked&quot;] now.
+        * Scripts/webkitpy/tool/commands/download_unittest.py:
+        (test_prepare_rollout):
+        (test_create_rollout_multiple_revision):
+        * Scripts/webkitpy/tool/steps/preparechangelogforrevert.py:
+        (PrepareChangeLogForRevert._message_for_revert): Add bug urls and descriptions of
+        rolled out patches to the changelog.
+        (PrepareChangeLogForRevert.run):
+        * Scripts/webkitpy/tool/steps/preparechangelogforrevert_unittest.py:
+        (UpdateChangeLogsForRevertTest):
+        (test_message_for_revert):
+        * Scripts/webkitpy/tool/steps/reopenbugafterrollout.py:
+        (ReopenBugAfterRollout.run):
+
</ins><span class="cx"> 2014-03-11  Krzysztof Czech  &lt;k.czech@samsung.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [ATK] Adjust WKTR/DRT to use new API from ATK 2.11.90
</span></span></pre></div>
<a id="trunkToolsScriptswebkitpycommoncheckoutchangelogpy"></a>
<div class="modfile"><h4>Modified: trunk/Tools/Scripts/webkitpy/common/checkout/changelog.py (165446 => 165447)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/Scripts/webkitpy/common/checkout/changelog.py        2014-03-11 11:19:06 UTC (rev 165446)
+++ trunk/Tools/Scripts/webkitpy/common/checkout/changelog.py        2014-03-11 11:23:27 UTC (rev 165447)
</span><span class="lines">@@ -391,11 +391,10 @@
</span><span class="cx">                 if first_boilerplate_line_regexp.search(line):
</span><span class="cx">                     message_lines = self._wrap_lines(message)
</span><span class="cx">                     result.write(first_boilerplate_line_regexp.sub(message_lines, line))
</span><del>-                    # Remove all the ChangeLog boilerplate before the first changed
-                    # file.
</del><ins>+                    # Remove all the ChangeLog boilerplate, except the first line (date, name, e-mail).
</ins><span class="cx">                     removing_boilerplate = True
</span><span class="cx">                 elif removing_boilerplate:
</span><del>-                    if line.find('*') &gt;= 0:  # each changed file is preceded by a *
</del><ins>+                    if re.search(&quot;^[1-9]&quot;, line):  # each changelog entry is preceded by a date
</ins><span class="cx">                         removing_boilerplate = False
</span><span class="cx"> 
</span><span class="cx">                 if not removing_boilerplate:
</span></span></pre></div>
<a id="trunkToolsScriptswebkitpycommoncheckoutcheckoutpy"></a>
<div class="modfile"><h4>Modified: trunk/Tools/Scripts/webkitpy/common/checkout/checkout.py (165446 => 165447)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/Scripts/webkitpy/common/checkout/checkout.py        2014-03-11 11:19:06 UTC (rev 165446)
+++ trunk/Tools/Scripts/webkitpy/common/checkout/checkout.py        2014-03-11 11:23:27 UTC (rev 165447)
</span><span class="lines">@@ -90,10 +90,11 @@
</span><span class="cx">             return None
</span><span class="cx">         changelog_entry = changelog_entries[0]
</span><span class="cx">         return {
</span><del>-            &quot;bug_id&quot;: parse_bug_id_from_changelog(changelog_entry.contents()),
</del><ins>+            &quot;bug_id&quot;: changelog_entry.bug_id(),
</ins><span class="cx">             &quot;author_name&quot;: changelog_entry.author_name(),
</span><span class="cx">             &quot;author_email&quot;: changelog_entry.author_email(),
</span><span class="cx">             &quot;author&quot;: changelog_entry.author(),
</span><ins>+            &quot;bug_description&quot;: changelog_entry.bug_description(),
</ins><span class="cx">             &quot;reviewer_text&quot;: changelog_entry.reviewer_text(),
</span><span class="cx">             &quot;reviewer&quot;: changelog_entry.reviewer(),
</span><span class="cx">             &quot;contents&quot;: changelog_entry.contents(),
</span></span></pre></div>
<a id="trunkToolsScriptswebkitpycommoncheckoutcheckout_mockpy"></a>
<div class="modfile"><h4>Modified: trunk/Tools/Scripts/webkitpy/common/checkout/checkout_mock.py (165446 => 165447)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/Scripts/webkitpy/common/checkout/checkout_mock.py        2014-03-11 11:19:06 UTC (rev 165446)
+++ trunk/Tools/Scripts/webkitpy/common/checkout/checkout_mock.py        2014-03-11 11:23:27 UTC (rev 165447)
</span><span class="lines">@@ -53,6 +53,7 @@
</span><span class="cx">             &quot;path/to/file&quot;,
</span><span class="cx">             &quot;another/file&quot;,
</span><span class="cx">         ],
</span><ins>+        &quot;bug_description&quot;: &quot;Example description.&quot;,
</ins><span class="cx">     }),
</span><span class="cx">     3001: CommitInfo(3001, &quot;tomz@codeaurora.org&quot;, {
</span><span class="cx">         &quot;bug_id&quot;: 50004,
</span><span class="lines">@@ -65,6 +66,7 @@
</span><span class="cx">             &quot;path/to/file&quot;,
</span><span class="cx">             &quot;another/file&quot;,
</span><span class="cx">         ],
</span><ins>+        &quot;bug_description&quot;: &quot;Another example description.&quot;,
</ins><span class="cx">     })
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkToolsScriptswebkitpycommoncheckoutcheckout_unittestpy"></a>
<div class="modfile"><h4>Modified: trunk/Tools/Scripts/webkitpy/common/checkout/checkout_unittest.py (165446 => 165447)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/Scripts/webkitpy/common/checkout/checkout_unittest.py        2014-03-11 11:19:06 UTC (rev 165446)
+++ trunk/Tools/Scripts/webkitpy/common/checkout/checkout_unittest.py        2014-03-11 11:23:27 UTC (rev 165447)
</span><span class="lines">@@ -192,6 +192,7 @@
</span><span class="cx">         checkout.changelog_entries_for_revision = lambda revision, changed_files=None: [ChangeLogEntry(_changelog1entry1)]
</span><span class="cx">         commitinfo = checkout.commit_info_for_revision(4)
</span><span class="cx">         self.assertEqual(commitinfo.bug_id(), 36629)
</span><ins>+        self.assertEqual(commitinfo.bug_description(), None)
</ins><span class="cx">         self.assertEqual(commitinfo.author_name(), u&quot;Tor Arne Vestb\u00f8&quot;)
</span><span class="cx">         self.assertEqual(commitinfo.author_email(), &quot;vestbo@webkit.org&quot;)
</span><span class="cx">         self.assertIsNone(commitinfo.reviewer_text())
</span><span class="lines">@@ -207,6 +208,7 @@
</span><span class="cx">             ],
</span><span class="cx">             'reviewer_text': None,
</span><span class="cx">             'author_name': u'Tor Arne Vestb\xf8',
</span><ins>+            'bug_description': None,
</ins><span class="cx">         })
</span><span class="cx"> 
</span><span class="cx">         checkout.changelog_entries_for_revision = lambda revision, changed_files=None: []
</span></span></pre></div>
<a id="trunkToolsScriptswebkitpycommoncheckoutcommitinfopy"></a>
<div class="modfile"><h4>Modified: trunk/Tools/Scripts/webkitpy/common/checkout/commitinfo.py (165446 => 165447)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/Scripts/webkitpy/common/checkout/commitinfo.py        2014-03-11 11:19:06 UTC (rev 165446)
+++ trunk/Tools/Scripts/webkitpy/common/checkout/commitinfo.py        2014-03-11 11:23:27 UTC (rev 165447)
</span><span class="lines">@@ -62,6 +62,9 @@
</span><span class="cx">     def author_email(self):
</span><span class="cx">         return self._changelog_data[&quot;author_email&quot;]
</span><span class="cx"> 
</span><ins>+    def bug_description(self):
+        return self._changelog_data[&quot;bug_description&quot;]
+
</ins><span class="cx">     def reviewer(self):
</span><span class="cx">         return self._changelog_data[&quot;reviewer&quot;]  # May be None
</span><span class="cx"> 
</span><span class="lines">@@ -78,6 +81,7 @@
</span><span class="cx">             &quot;author_email&quot;: self.author_email(),
</span><span class="cx">             &quot;reviewer_text&quot;: self.reviewer_text(),
</span><span class="cx">             &quot;changed_files&quot;: self.changed_files(),
</span><ins>+            &quot;bug_description&quot;: self.bug_description(),
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">     def responsible_parties(self):
</span></span></pre></div>
<a id="trunkToolsScriptswebkitpycommoncheckoutcommitinfo_unittestpy"></a>
<div class="modfile"><h4>Modified: trunk/Tools/Scripts/webkitpy/common/checkout/commitinfo_unittest.py (165446 => 165447)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/Scripts/webkitpy/common/checkout/commitinfo_unittest.py        2014-03-11 11:19:06 UTC (rev 165446)
+++ trunk/Tools/Scripts/webkitpy/common/checkout/commitinfo_unittest.py        2014-03-11 11:23:27 UTC (rev 165447)
</span><span class="lines">@@ -46,6 +46,7 @@
</span><span class="cx">             &quot;author&quot;: author,
</span><span class="cx">             &quot;reviewer_text&quot;: &quot;Reviewer&quot;,
</span><span class="cx">             &quot;reviewer&quot;: reviewer,
</span><ins>+            &quot;bug_description&quot;: &quot;Bug description&quot;,
</ins><span class="cx">         }
</span><span class="cx">         commit = CommitInfo(123, &quot;committer@example.com&quot;, changelog_data, committer_list)
</span><span class="cx"> 
</span><span class="lines">@@ -59,3 +60,4 @@
</span><span class="cx">         self.assertEqual(commit.committer(), committer)
</span><span class="cx">         self.assertEqual(commit.committer_email(), &quot;committer@example.com&quot;)
</span><span class="cx">         self.assertEqual(commit.responsible_parties(), set([author, committer, reviewer]))
</span><ins>+        self.assertEqual(commit.bug_description(), &quot;Bug description&quot;)
</ins></span></pre></div>
<a id="trunkToolsScriptswebkitpytoolcommandsdownloadpy"></a>
<div class="modfile"><h4>Modified: trunk/Tools/Scripts/webkitpy/tool/commands/download.py (165446 => 165447)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/Scripts/webkitpy/tool/commands/download.py        2014-03-11 11:19:06 UTC (rev 165446)
+++ trunk/Tools/Scripts/webkitpy/tool/commands/download.py        2014-03-11 11:23:27 UTC (rev 165447)
</span><span class="lines">@@ -394,6 +394,8 @@
</span><span class="cx"> 
</span><span class="cx">     def _prepare_state(self, options, args, tool):
</span><span class="cx">         revision_list = []
</span><ins>+        description_list = []
+        bug_id_list = []
</ins><span class="cx">         for revision in str(args[0]).split():
</span><span class="cx">             if revision.isdigit():
</span><span class="cx">                 revision_list.append(int(revision))
</span><span class="lines">@@ -402,15 +404,26 @@
</span><span class="cx">         revision_list.sort()
</span><span class="cx"> 
</span><span class="cx">         # We use the earliest revision for the bug info
</span><ins>+        for revision in revision_list:
+            commit_info = self._commit_info(revision)
+            if commit_info:
+                description_list.append(commit_info.bug_description())
+                bug_id_list.append(commit_info.bug_id())
+            else:
+                description_list.append(None)
+                bug_id_list.append(None)
</ins><span class="cx">         earliest_revision = revision_list[0]
</span><span class="cx">         state = {
</span><span class="cx">             &quot;revision&quot;: earliest_revision,
</span><span class="cx">             &quot;revision_list&quot;: revision_list,
</span><span class="cx">             &quot;reason&quot;: args[1],
</span><ins>+            &quot;bug_id&quot;: None,
+            &quot;bug_id_list&quot;: bug_id_list,
+            &quot;description_list&quot;: description_list,
</ins><span class="cx">         }
</span><span class="cx">         commit_info = self._commit_info(earliest_revision)
</span><span class="cx">         if commit_info:
</span><del>-            state[&quot;bug_id&quot;] = commit_info.bug_id()
</del><ins>+            state[&quot;bug_blocked&quot;] = commit_info.bug_id()
</ins><span class="cx">             cc_list = sorted([party.bugzilla_email()
</span><span class="cx">                             for party in commit_info.responsible_parties()
</span><span class="cx">                             if party.bugzilla_email()])
</span><span class="lines">@@ -448,14 +461,6 @@
</span><span class="cx"> 
</span><span class="cx">     def _prepare_state(self, options, args, tool):
</span><span class="cx">         state = AbstractRolloutPrepCommand._prepare_state(self, options, args, tool)
</span><del>-        # Currently, state[&quot;bug_id&quot;] points to the bug that caused the
-        # regression.  We want to create a new bug that blocks the old bug
-        # so we move state[&quot;bug_id&quot;] to state[&quot;bug_blocked&quot;] and delete the
-        # old state[&quot;bug_id&quot;] so that steps.CreateBug will actually create
-        # the new bug that we want (and subsequently store its bug id into
-        # state[&quot;bug_id&quot;])
-        state[&quot;bug_blocked&quot;] = state[&quot;bug_id&quot;]
-        del state[&quot;bug_id&quot;]
</del><span class="cx">         state[&quot;bug_title&quot;] = &quot;REGRESSION(r%s): %s&quot; % (state[&quot;revision&quot;], state[&quot;reason&quot;])
</span><span class="cx">         state[&quot;bug_description&quot;] = &quot;%s broke the build:\n%s&quot; % (urls.view_revision_url(state[&quot;revision&quot;]), state[&quot;reason&quot;])
</span><span class="cx">         # FIXME: If we had more context here, we could link to other open bugs
</span></span></pre></div>
<a id="trunkToolsScriptswebkitpytoolcommandsdownload_unittestpy"></a>
<div class="modfile"><h4>Modified: trunk/Tools/Scripts/webkitpy/tool/commands/download_unittest.py (165446 => 165447)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/Scripts/webkitpy/tool/commands/download_unittest.py        2014-03-11 11:19:06 UTC (rev 165446)
+++ trunk/Tools/Scripts/webkitpy/tool/commands/download_unittest.py        2014-03-11 11:23:27 UTC (rev 165447)
</span><span class="lines">@@ -289,11 +289,12 @@
</span><span class="cx">         self.assert_execute_outputs(LandFromURL(), [&quot;https://bugs.webkit.org/show_bug.cgi?id=50000&quot;], options=self._default_options(), expected_logs=expected_logs)
</span><span class="cx"> 
</span><span class="cx">     def test_prepare_rollout(self):
</span><del>-        expected_logs = &quot;Preparing rollout for bug 50000.\nUpdating working directory\n&quot;
</del><ins>+        expected_logs = &quot;Preparing rollout for bug 50000.\nPreparing rollout for bug 50000.\nUpdating working directory\n&quot;
</ins><span class="cx">         self.assert_execute_outputs(PrepareRollout(), [852, &quot;Reason&quot;], options=self._default_options(), expected_logs=expected_logs)
</span><span class="cx"> 
</span><span class="cx">     def test_create_rollout(self):
</span><span class="cx">         expected_logs = &quot;&quot;&quot;Preparing rollout for bug 50000.
</span><ins>+Preparing rollout for bug 50000.
</ins><span class="cx"> Updating working directory
</span><span class="cx"> MOCK create_bug
</span><span class="cx"> bug_title: REGRESSION(r852): Reason
</span><span class="lines">@@ -314,10 +315,37 @@
</span><span class="cx"> -- End comment --
</span><span class="cx"> &quot;&quot;&quot;
</span><span class="cx">         self.assert_execute_outputs(CreateRollout(), [852, &quot;Reason&quot;], options=self._default_options(), expected_logs=expected_logs)
</span><ins>+
+    def test_create_rollout_multiple_revision(self):
+        expected_logs = &quot;&quot;&quot;Preparing rollout for bug 50000.
+Preparing rollout for bug 50000.
+Unable to parse bug number from diff.
+Preparing rollout for bug 50000.
+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
+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.maxDiff = None
</ins><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><span class="cx">     def test_create_rollout_resolved(self):
</span><span class="cx">         expected_logs = &quot;&quot;&quot;Preparing rollout for bug 50004.
</span><ins>+Preparing rollout for bug 50004.
</ins><span class="cx"> Updating working directory
</span><span class="cx"> MOCK create_bug
</span><span class="cx"> bug_title: REGRESSION(r3001): Reason
</span><span class="lines">@@ -342,6 +370,7 @@
</span><span class="cx"> 
</span><span class="cx">     def test_rollout(self):
</span><span class="cx">         expected_logs = &quot;&quot;&quot;Preparing rollout for bug 50000.
</span><ins>+Preparing rollout for bug 50000.
</ins><span class="cx"> Updating working directory
</span><span class="cx"> MOCK: user.open_url: file://...
</span><span class="cx"> Was that diff correct?
</span><span class="lines">@@ -353,5 +382,5 @@
</span><span class="cx"> 
</span><span class="cx"> Committed r49824: &lt;http://trac.webkit.org/changeset/49824&gt;'
</span><span class="cx"> &quot;&quot;&quot;
</span><del>-        self.assert_execute_outputs(Rollout(), [852, &quot;Reason&quot;], options=self._default_options(), expected_logs=expected_logs)
</del><ins>+        self.assert_execute_outputs(Rollout(), [852, &quot;Reason&quot;, &quot;Description&quot;], options=self._default_options(), expected_logs=expected_logs)
</ins><span class="cx"> 
</span></span></pre></div>
<a id="trunkToolsScriptswebkitpytoolstepspreparechangelogforrevertpy"></a>
<div class="modfile"><h4>Modified: trunk/Tools/Scripts/webkitpy/tool/steps/preparechangelogforrevert.py (165446 => 165447)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/Scripts/webkitpy/tool/steps/preparechangelogforrevert.py        2014-03-11 11:19:06 UTC (rev 165446)
+++ trunk/Tools/Scripts/webkitpy/tool/steps/preparechangelogforrevert.py        2014-03-11 11:23:27 UTC (rev 165447)
</span><span class="lines">@@ -34,24 +34,33 @@
</span><span class="cx"> 
</span><span class="cx"> class PrepareChangeLogForRevert(AbstractStep):
</span><span class="cx">     @classmethod
</span><del>-    def _message_for_revert(cls, revision_list, reason, bug_url=None):
</del><ins>+    def _message_for_revert(cls, revision_list, reason, description_list, reverted_bug_url_list, rollout_bug_url=None):
</ins><span class="cx">         message = &quot;Unreviewed, rolling out %s.\n&quot; % join_with_separators(['r' + str(revision) for revision in revision_list])
</span><del>-        for revision in revision_list:
-            message += &quot;%s\n&quot; % urls.view_revision_url(revision)
-        if bug_url:
-            message += &quot;%s\n&quot; % bug_url
-        # Add an extra new line after the rollout links, before any reason.
</del><ins>+        if rollout_bug_url:
+            message += &quot;%s\n&quot; % rollout_bug_url
</ins><span class="cx">         message += &quot;\n&quot;
</span><span class="cx">         if reason:
</span><del>-            message += &quot;%s\n\n&quot; % reason
</del><ins>+            message += &quot;%s\n&quot; % reason
+        message += &quot;\n&quot;
+        pluralSuffix = 's' if len(revision_list) &gt; 1 else ''
+        message += &quot;Reverted changeset%s:\n\n&quot; % pluralSuffix
+        for index in range(len(revision_list)):
+            if description_list[index]:
+                message += &quot;\&quot;%s\&quot;\n&quot; % description_list[index]
+            if reverted_bug_url_list[index]:
+                message += &quot;%s\n&quot; % reverted_bug_url_list[index]
+            message += &quot;%s\n\n&quot; % urls.view_revision_url(revision_list[index])
</ins><span class="cx">         return message
</span><span class="cx"> 
</span><span class="cx">     def run(self, state):
</span><ins>+        reverted_bug_url_list = []
</ins><span class="cx">         # This could move to prepare-ChangeLog by adding a --revert= option.
</span><span class="cx">         self._tool.executive.run_and_throw_if_fail(self._tool.deprecated_port().prepare_changelog_command(), cwd=self._tool.scm().checkout_root)
</span><span class="cx">         changelog_paths = self._tool.checkout().modified_changelogs(git_commit=None)
</span><del>-        bug_url = self._tool.bugs.bug_url_for_bug_id(state[&quot;bug_id&quot;]) if state[&quot;bug_id&quot;] else None
-        message = self._message_for_revert(state[&quot;revision_list&quot;], state[&quot;reason&quot;], bug_url)
</del><ins>+        rollout_bug_url = self._tool.bugs.bug_url_for_bug_id(state[&quot;bug_id&quot;]) if state[&quot;bug_id&quot;] else None
+        for bug_id in state[&quot;bug_id_list&quot;]:
+            reverted_bug_url_list.append(self._tool.bugs.bug_url_for_bug_id(bug_id))
+        message = self._message_for_revert(state[&quot;revision_list&quot;], state[&quot;reason&quot;], state[&quot;description_list&quot;], reverted_bug_url_list, rollout_bug_url)
</ins><span class="cx">         for changelog_path in changelog_paths:
</span><span class="cx">             # FIXME: Seems we should prepare the message outside of changelogs.py and then just pass in
</span><span class="cx">             # text that we want to use to replace the reviewed by line.
</span></span></pre></div>
<a id="trunkToolsScriptswebkitpytoolstepspreparechangelogforrevert_unittestpy"></a>
<div class="modfile"><h4>Modified: trunk/Tools/Scripts/webkitpy/tool/steps/preparechangelogforrevert_unittest.py (165446 => 165447)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/Scripts/webkitpy/tool/steps/preparechangelogforrevert_unittest.py        2014-03-11 11:19:06 UTC (rev 165446)
+++ trunk/Tools/Scripts/webkitpy/tool/steps/preparechangelogforrevert_unittest.py        2014-03-11 11:23:27 UTC (rev 165447)
</span><span class="lines">@@ -37,57 +37,88 @@
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> class UpdateChangeLogsForRevertTest(unittest.TestCase):
</span><del>-    _revert_entry_with_bug_url = '''2009-08-19  Eric Seidel  &lt;eric@webkit.org&gt;
</del><ins>+    _revert_entry = '''2009-08-19  Eric Seidel  &lt;eric@webkit.org&gt;
</ins><span class="cx"> 
</span><span class="cx">         Unreviewed, rolling out r12345.
</span><del>-        http://trac.webkit.org/changeset/12345
-        http://example.com/123
</del><span class="cx"> 
</span><span class="cx">         Reason
</span><span class="cx"> 
</span><del>-        * Scripts/bugzilla-tool:
</del><ins>+        Reverted changeset:
+
+        &quot;Blocked Bug's Description&quot;
+        http://bug.example.com/12345
+        http://trac.webkit.org/changeset/12345
</ins><span class="cx"> '''
</span><span class="cx"> 
</span><del>-    _revert_entry_without_bug_url = '''2009-08-19  Eric Seidel  &lt;eric@webkit.org&gt;
</del><ins>+    _revert_entry_with_missing_bug_url_and_description = '''2009-08-19  Eric Seidel  &lt;eric@webkit.org&gt;
</ins><span class="cx"> 
</span><span class="cx">         Unreviewed, rolling out r12345.
</span><del>-        http://trac.webkit.org/changeset/12345
</del><span class="cx"> 
</span><span class="cx">         Reason
</span><span class="cx"> 
</span><del>-        * Scripts/bugzilla-tool:
</del><ins>+        Reverted changeset:
+
+        http://trac.webkit.org/changeset/12345
</ins><span class="cx"> '''
</span><span class="cx"> 
</span><del>-    _multiple_revert_entry_with_bug_url = '''2009-08-19  Eric Seidel  &lt;eric@webkit.org&gt;
</del><ins>+    _multiple_revert_entry = '''2009-08-19  Eric Seidel  &lt;eric@webkit.org&gt;
</ins><span class="cx"> 
</span><span class="cx">         Unreviewed, rolling out r12345, r12346, and r12347.
</span><ins>+
+        Reason
+
+        Reverted changesets:
+
+        &quot;r12345's Description&quot;
+        http://bug.example.com/12345
</ins><span class="cx">         http://trac.webkit.org/changeset/12345
</span><ins>+
+        &quot;r12346's Description&quot;
+        http://bug.example.com/12346
</ins><span class="cx">         http://trac.webkit.org/changeset/12346
</span><ins>+
+        &quot;r12347's Description&quot;
+        http://bug.example.com/12347
</ins><span class="cx">         http://trac.webkit.org/changeset/12347
</span><del>-        http://example.com/123
</del><ins>+'''
</ins><span class="cx"> 
</span><ins>+    _multiple_revert_entry_with_missing_bug_urls_and_descriptions = '''2009-08-19  Eric Seidel  &lt;eric@webkit.org&gt;
+
+        Unreviewed, rolling out r12345, r12346, and r12347.
+
</ins><span class="cx">         Reason
</span><span class="cx"> 
</span><del>-        * Scripts/bugzilla-tool:
</del><ins>+        Reverted changesets:
+
+        http://trac.webkit.org/changeset/12345
+
+        http://trac.webkit.org/changeset/12346
+
+        http://trac.webkit.org/changeset/12347
</ins><span class="cx"> '''
</span><span class="cx"> 
</span><del>-    _multiple_revert_entry_without_bug_url = '''2009-08-19  Eric Seidel  &lt;eric@webkit.org&gt;
</del><ins>+    _multiple_revert_entry_with_a_missing_bug_url_and_description = '''2009-08-19  Eric Seidel  &lt;eric@webkit.org&gt;
</ins><span class="cx"> 
</span><span class="cx">         Unreviewed, rolling out r12345, r12346, and r12347.
</span><ins>+
+        Reason
+
+        Reverted changesets:
+
+        &quot;r12345's Description&quot;
+        http://bug.example.com/12345
</ins><span class="cx">         http://trac.webkit.org/changeset/12345
</span><ins>+
</ins><span class="cx">         http://trac.webkit.org/changeset/12346
</span><ins>+
+        &quot;r12347's Description&quot;
+        http://bug.example.com/12347
</ins><span class="cx">         http://trac.webkit.org/changeset/12347
</span><del>-
-        Reason
-
-        * Scripts/bugzilla-tool:
</del><span class="cx"> '''
</span><span class="cx"> 
</span><del>-    _revert_with_log_reason = &quot;&quot;&quot;2009-08-19  Eric Seidel  &lt;eric@webkit.org&gt;
</del><ins>+    _revert_with_long_reason = &quot;&quot;&quot;2009-08-19  Eric Seidel  &lt;eric@webkit.org&gt;
</ins><span class="cx"> 
</span><span class="cx">         Unreviewed, rolling out r12345.
</span><del>-        http://trac.webkit.org/changeset/12345
-        http://example.com/123
</del><span class="cx"> 
</span><span class="cx">         This is a very long reason which should be long enough so that
</span><span class="cx">         _message_for_revert will need to wrap it.  We'll also include
</span><span class="lines">@@ -95,9 +126,35 @@
</span><span class="cx">         https://veryveryveryveryverylongbugurl.com/reallylongbugthingy.cgi?bug_id=12354
</span><span class="cx">         link so that we can make sure we wrap that right too.
</span><span class="cx"> 
</span><del>-        * Scripts/bugzilla-tool:
</del><ins>+        Reverted changeset:
+
+        &quot;Blocked Bug's Description&quot;
+        http://bug.example.com/12345
+        http://trac.webkit.org/changeset/12345
</ins><span class="cx"> &quot;&quot;&quot;
</span><span class="cx"> 
</span><ins>+    _multiple_revert_entry_with_rollout_bug_url = '''2009-08-19  Eric Seidel  &lt;eric@webkit.org&gt;
+
+        Unreviewed, rolling out r12345, r12346, and r12347.
+        http://rollout.example.com/56789
+
+        Reason
+
+        Reverted changesets:
+
+        &quot;r12345's Description&quot;
+        http://bug.example.com/12345
+        http://trac.webkit.org/changeset/12345
+
+        &quot;r12346's Description&quot;
+        http://bug.example.com/12346
+        http://trac.webkit.org/changeset/12346
+
+        &quot;r12347's Description&quot;
+        http://bug.example.com/12347
+        http://trac.webkit.org/changeset/12347
+'''
+
</ins><span class="cx">     def _assert_message_for_revert_output(self, args, expected_entry):
</span><span class="cx">         changelog_contents = u&quot;%s\n%s&quot; % (changelog_unittest.ChangeLogTest._new_entry_boilerplate, changelog_unittest.ChangeLogTest._example_changelog)
</span><span class="cx">         changelog_path = &quot;ChangeLog&quot;
</span><span class="lines">@@ -112,9 +169,11 @@
</span><span class="cx">         self.assertEqual(actual_entry.author_email(), &quot;eric@webkit.org&quot;)
</span><span class="cx"> 
</span><span class="cx">     def test_message_for_revert(self):
</span><del>-        self._assert_message_for_revert_output([[12345], &quot;Reason&quot;], self._revert_entry_without_bug_url)
-        self._assert_message_for_revert_output([[12345], &quot;Reason&quot;, &quot;http://example.com/123&quot;], self._revert_entry_with_bug_url)
-        self._assert_message_for_revert_output([[12345, 12346, 12347], &quot;Reason&quot;], self._multiple_revert_entry_without_bug_url)
-        self._assert_message_for_revert_output([[12345, 12346, 12347], &quot;Reason&quot;, &quot;http://example.com/123&quot;], self._multiple_revert_entry_with_bug_url)
</del><ins>+        self._assert_message_for_revert_output([[12345], &quot;Reason&quot;, [&quot;Blocked Bug's Description&quot;], [&quot;http://bug.example.com/12345&quot;]], self._revert_entry)
+        self._assert_message_for_revert_output([[12345], &quot;Reason&quot;, [None], [None]], self._revert_entry_with_missing_bug_url_and_description)
+        self._assert_message_for_revert_output([[12345, 12346, 12347], &quot;Reason&quot;, [&quot;r12345's Description&quot;, &quot;r12346's Description&quot;, &quot;r12347's Description&quot;], [&quot;http://bug.example.com/12345&quot;, &quot;http://bug.example.com/12346&quot;, &quot;http://bug.example.com/12347&quot;]], self._multiple_revert_entry)
+        self._assert_message_for_revert_output([[12345, 12346, 12347], &quot;Reason&quot;, [None, None, None], [None, None, None]], self._multiple_revert_entry_with_missing_bug_urls_and_descriptions)
+        self._assert_message_for_revert_output([[12345, 12346, 12347], &quot;Reason&quot;, [&quot;r12345's Description&quot;, None, &quot;r12347's Description&quot;], [&quot;http://bug.example.com/12345&quot;, None, &quot;http://bug.example.com/12347&quot;]], self._multiple_revert_entry_with_a_missing_bug_url_and_description)
</ins><span class="cx">         long_reason = &quot;This is a very long reason which should be long enough so that _message_for_revert will need to wrap it.  We'll also include a https://veryveryveryveryverylongbugurl.com/reallylongbugthingy.cgi?bug_id=12354 link so that we can make sure we wrap that right too.&quot;
</span><del>-        self._assert_message_for_revert_output([[12345], long_reason, &quot;http://example.com/123&quot;], self._revert_with_log_reason)
</del><ins>+        self._assert_message_for_revert_output([[12345], long_reason, [&quot;Blocked Bug's Description&quot;], [&quot;http://bug.example.com/12345&quot;]], self._revert_with_long_reason)
+        self._assert_message_for_revert_output([[12345, 12346, 12347], &quot;Reason&quot;, [&quot;r12345's Description&quot;, &quot;r12346's Description&quot;, &quot;r12347's Description&quot;], [&quot;http://bug.example.com/12345&quot;, &quot;http://bug.example.com/12346&quot;, &quot;http://bug.example.com/12347&quot;], &quot;http://rollout.example.com/56789&quot;], self._multiple_revert_entry_with_rollout_bug_url)
</ins></span></pre></div>
<a id="trunkToolsScriptswebkitpytoolstepsreopenbugafterrolloutpy"></a>
<div class="modfile"><h4>Modified: trunk/Tools/Scripts/webkitpy/tool/steps/reopenbugafterrollout.py (165446 => 165447)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/Scripts/webkitpy/tool/steps/reopenbugafterrollout.py        2014-03-11 11:19:06 UTC (rev 165446)
+++ trunk/Tools/Scripts/webkitpy/tool/steps/reopenbugafterrollout.py        2014-03-11 11:23:27 UTC (rev 165447)
</span><span class="lines">@@ -39,7 +39,7 @@
</span><span class="cx">         commit_comment = bug_comment_from_commit_text(self._tool.scm(), state[&quot;commit_text&quot;])
</span><span class="cx">         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)
</span><span class="cx"> 
</span><del>-        bug_id = state[&quot;bug_id&quot;]
</del><ins>+        bug_id = state[&quot;bug_blocked&quot;]
</ins><span class="cx">         if not bug_id:
</span><span class="cx">             _log.info(comment_text)
</span><span class="cx">             _log.info(&quot;No bugs were updated.&quot;)
</span></span></pre>
</div>
</div>

</body>
</html>