Title: [120867] trunk/Tools
- Revision
- 120867
- Author
- [email protected]
- Date
- 2012-06-20 15:02:41 -0700 (Wed, 20 Jun 2012)
Log Message
Unreviewed, rolling out r120821.
http://trac.webkit.org/changeset/120821
https://bugs.webkit.org/show_bug.cgi?id=89605
It made duplicated reviewer entries (Requested by Ossy on
#webkit).
Patch by Sheriff Bot <[email protected]> on 2012-06-20
* Scripts/webkitpy/common/checkout/changelog.py:
(ChangeLog.set_reviewer):
* Scripts/webkitpy/common/checkout/changelog_unittest.py:
(test_set_reviewer):
(test_set_short_description_and_bug_url):
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (120866 => 120867)
--- trunk/Tools/ChangeLog 2012-06-20 21:58:18 UTC (rev 120866)
+++ trunk/Tools/ChangeLog 2012-06-20 22:02:41 UTC (rev 120867)
@@ -1,3 +1,18 @@
+2012-06-20 Sheriff Bot <[email protected]>
+
+ Unreviewed, rolling out r120821.
+ http://trac.webkit.org/changeset/120821
+ https://bugs.webkit.org/show_bug.cgi?id=89605
+
+ It made duplicated reviewer entries (Requested by Ossy on
+ #webkit).
+
+ * Scripts/webkitpy/common/checkout/changelog.py:
+ (ChangeLog.set_reviewer):
+ * Scripts/webkitpy/common/checkout/changelog_unittest.py:
+ (test_set_reviewer):
+ (test_set_short_description_and_bug_url):
+
2012-06-20 Dirk Pranke <[email protected]>
nrwt outputs empty files for wdiff output if wdiff is not installed
Modified: trunk/Tools/Scripts/webkitpy/common/checkout/changelog.py (120866 => 120867)
--- trunk/Tools/Scripts/webkitpy/common/checkout/changelog.py 2012-06-20 21:58:18 UTC (rev 120866)
+++ trunk/Tools/Scripts/webkitpy/common/checkout/changelog.py 2012-06-20 22:02:41 UTC (rev 120867)
@@ -345,27 +345,11 @@
print line,
def set_reviewer(self, reviewer):
- latest_entry = self.latest_entry().contents()
- found_reviewer = re.search("NOBODY\s*\(OOPS!\)", latest_entry, re.MULTILINE)
+ # inplace=1 creates a backup file and re-directs stdout to the file
+ for line in fileinput.FileInput(self.path, inplace=1):
+ # Trailing comma suppresses printing newline
+ print line.replace("NOBODY (OOPS!)", reviewer.encode("utf-8")),
- if found_reviewer:
- # inplace=1 creates a backup file and re-directs stdout to the file
- for line in fileinput.FileInput(self.path, inplace=1):
- # Trailing comma suppresses printing newline
- print line.replace("NOBODY (OOPS!)", reviewer.encode("utf-8")),
- else:
- bug_url_number_of_items = len(re.findall(config_urls.bug_url_long, latest_entry, re.MULTILINE))
- bug_url_number_of_items += len(re.findall(config_urls.bug_url_short, latest_entry, re.MULTILINE))
- for line in fileinput.FileInput(self.path, inplace=1):
- found_bug_url = re.search(config_urls.bug_url_long, line)
- if not found_bug_url:
- found_bug_url = re.search(config_urls.bug_url_short, line)
- print line,
- if found_bug_url:
- if bug_url_number_of_items == 1:
- print "\n Reviewed by %s." % (reviewer.encode("utf-8"))
- bug_url_number_of_items -= 1
-
def set_short_description_and_bug_url(self, short_description, bug_url):
message = "%s\n %s" % (short_description, bug_url)
for line in fileinput.FileInput(self.path, inplace=1):
Modified: trunk/Tools/Scripts/webkitpy/common/checkout/changelog_unittest.py (120866 => 120867)
--- trunk/Tools/Scripts/webkitpy/common/checkout/changelog_unittest.py 2012-06-20 21:58:18 UTC (rev 120866)
+++ trunk/Tools/Scripts/webkitpy/common/checkout/changelog_unittest.py 2012-06-20 22:02:41 UTC (rev 120867)
@@ -496,46 +496,8 @@
* Scripts/bugzilla-tool:
'''
- _new_entry_boilerplate_with_bugurl = '''2009-08-19 Eric Seidel <[email protected]>
-
- Need a short description and bug URL (OOPS!)
- https://bugs.webkit.org/show_bug.cgi?id=12345
-
- Reviewed by NOBODY (OOPS!).
-
- * Scripts/bugzilla-tool:
-'''
-
- _new_entry_boilerplate_with_multiple_bugurl = '''2009-08-19 Eric Seidel <[email protected]>
-
- Need a short description and bug URL (OOPS!)
- https://bugs.webkit.org/show_bug.cgi?id=12345
- http://webkit.org/b/12345
-
- Reviewed by NOBODY (OOPS!).
-
- * Scripts/bugzilla-tool:
-'''
-
- _new_entry_boilerplate_without_reviewer_line = '''2009-08-19 Eric Seidel <[email protected]>
-
- Need a short description and bug URL (OOPS!)
- https://bugs.webkit.org/show_bug.cgi?id=12345
-
- * Scripts/bugzilla-tool:
-'''
-
- _new_entry_boilerplate_without_reviewer_multiple_bugurl = '''2009-08-19 Eric Seidel <[email protected]>
-
- Need a short description and bug URL (OOPS!)
- https://bugs.webkit.org/show_bug.cgi?id=12345
- http://webkit.org/b/12345
-
- * Scripts/bugzilla-tool:
-'''
-
def test_set_reviewer(self):
- changelog_contents = u"%s\n%s" % (self._new_entry_boilerplate_with_bugurl, self._example_changelog)
+ changelog_contents = u"%s\n%s" % (self._new_entry_boilerplate, self._example_changelog)
changelog_path = self._write_tmp_file_with_contents(changelog_contents.encode("utf-8"))
reviewer_name = 'Test Reviewer'
ChangeLog(changelog_path).set_reviewer(reviewer_name)
@@ -544,24 +506,8 @@
os.remove(changelog_path)
self.assertEquals(actual_contents.splitlines(), expected_contents.splitlines())
- changelog_contents_without_reviewer_line = u"%s\n%s" % (self._new_entry_boilerplate_without_reviewer_line, self._example_changelog)
- changelog_path = self._write_tmp_file_with_contents(changelog_contents_without_reviewer_line.encode("utf-8"))
- ChangeLog(changelog_path).set_reviewer(reviewer_name)
- actual_contents = self._read_file_contents(changelog_path, "utf-8")
- os.remove(changelog_path)
- self.assertEquals(actual_contents.splitlines(), expected_contents.splitlines())
-
- changelog_contents_without_reviewer_line = u"%s\n%s" % (self._new_entry_boilerplate_without_reviewer_multiple_bugurl, self._example_changelog)
- changelog_path = self._write_tmp_file_with_contents(changelog_contents_without_reviewer_line.encode("utf-8"))
- ChangeLog(changelog_path).set_reviewer(reviewer_name)
- actual_contents = self._read_file_contents(changelog_path, "utf-8")
- changelog_contents = u"%s\n%s" % (self._new_entry_boilerplate_with_multiple_bugurl, self._example_changelog)
- expected_contents = changelog_contents.replace('NOBODY (OOPS!)', reviewer_name)
- os.remove(changelog_path)
- self.assertEquals(actual_contents.splitlines(), expected_contents.splitlines())
-
def test_set_short_description_and_bug_url(self):
- changelog_contents = u"%s\n%s" % (self._new_entry_boilerplate_with_bugurl, self._example_changelog)
+ changelog_contents = u"%s\n%s" % (self._new_entry_boilerplate, self._example_changelog)
changelog_path = self._write_tmp_file_with_contents(changelog_contents.encode("utf-8"))
short_description = "A short description"
bug_url = "http://example.com/b/2344"
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes