Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
webkit-patch land shouldn't add a reviewer for unreviewed build fixes
https://bugs.webkit.org/show_bug.cgi?id=130220

Patch by Eva Balazsfalvi <evab.u-szeged@partner.samsung.com> on 2014-03-18
Reviewed by Csaba Osztrogonác.

* Scripts/webkitpy/common/checkout/changelog.py:
(ChangeLog.set_reviewer):
* Scripts/webkitpy/common/checkout/changelog_unittest.py:
(test_set_reviewer):

Canonical link: https://commits.webkit.org/148396@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@165824 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
Eva Balazsfalvi authored and webkit-commit-queue committed Mar 18, 2014
1 parent 4d67ec0 commit 64758cc
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 2 deletions.
12 changes: 12 additions & 0 deletions Tools/ChangeLog
@@ -1,3 +1,15 @@
2014-03-18 Eva Balazsfalvi <evab.u-szeged@partner.samsung.com>

webkit-patch land shouldn't add a reviewer for unreviewed build fixes
https://bugs.webkit.org/show_bug.cgi?id=130220

Reviewed by Csaba Osztrogonác.

* Scripts/webkitpy/common/checkout/changelog.py:
(ChangeLog.set_reviewer):
* Scripts/webkitpy/common/checkout/changelog_unittest.py:
(test_set_reviewer):

2014-03-17 Filip Pizlo <fpizlo@apple.com>

More FTL enabling.
Expand Down
4 changes: 2 additions & 2 deletions Tools/Scripts/webkitpy/common/checkout/changelog.py
Expand Up @@ -406,8 +406,8 @@ def set_reviewer(self, reviewer):
latest_entry_contents = latest_entry.contents()
reviewer_text = latest_entry.reviewer()
found_nobody = re.search("NOBODY\s*\(OOPS!\)", latest_entry_contents, re.MULTILINE)

if not found_nobody and not reviewer_text:
found_reviewer_or_unreviewed = latest_entry.has_valid_reviewer()
if not found_nobody and not found_reviewer_or_unreviewed and not reviewer_text:
bug_url_number_of_items = len(re.findall(config_urls.bug_url_long, latest_entry_contents, re.MULTILINE))
bug_url_number_of_items += len(re.findall(config_urls.bug_url_short, latest_entry_contents, re.MULTILINE))
result = StringIO()
Expand Down
16 changes: 16 additions & 0 deletions Tools/Scripts/webkitpy/common/checkout/changelog_unittest.py
Expand Up @@ -556,6 +556,16 @@ def test_latest_entry_parse_single_entry(self):
* Scripts/bugzilla-tool:
'''

_new_entry_boilerplate_with_unreviewed = '''2009-08-19 Eric Seidel <eric@webkit.org>
Need a short description (OOPS!).
https://bugs.webkit.org/show_bug.cgi?id=12345
Unreviewed.
* Scripts/bugzilla-tool:
'''

_new_entry_boilerplate_with_multiple_bugurl = '''2009-08-19 Eric Seidel <eric@webkit.org>
Need a short description (OOPS!).
Expand Down Expand Up @@ -595,6 +605,12 @@ def test_set_reviewer(self):
expected_contents = changelog_contents.replace('NOBODY (OOPS!)', reviewer_name)
self.assertEqual(actual_contents.splitlines(), expected_contents.splitlines())

changelog_contents = u"%s\n%s" % (self._new_entry_boilerplate_with_unreviewed, self._example_changelog)
fs.write_text_file(self._changelog_path, changelog_contents)
ChangeLog(self._changelog_path, fs).set_reviewer(reviewer_name)
actual_contents = fs.read_text_file(self._changelog_path)
self.assertEqual(actual_contents.splitlines(), changelog_contents.splitlines())

changelog_contents_without_reviewer_line = u"%s\n%s" % (self._new_entry_boilerplate_without_reviewer_line, self._example_changelog)
fs.write_text_file(self._changelog_path, changelog_contents_without_reviewer_line)
ChangeLog(self._changelog_path, fs).set_reviewer(reviewer_name)
Expand Down

0 comments on commit 64758cc

Please sign in to comment.