Changeset 56748 in webkit


Ignore:
Timestamp:
Mar 29, 2010 4:33:49 PM (14 years ago)
Author:
eric@webkit.org
Message:

2010-03-29 Eric Seidel <eric@webkit.org>

Reviewed by Adam Barth.

ValidateReviewer step is draconian and un-tested
https://bugs.webkit.org/show_bug.cgi?id=36792

ValidateReviewer logic was commented out in
http://trac.webkit.org/changeset/56744
That was a symptom of the fact that validatereviewer.py
is too inflexible to be used when real humans are driving webkit-patch.
For now we just disable ValidateReviewer when humans are at the keyboard.

  • Scripts/webkitpy/tool/steps/validatereviewer.py:
    • Only run when in non-interactive mode.
  • Scripts/webkitpy/tool/steps/validatereviewer_unittest.py: Added.
    • Test our validation logic to make sure it's sane.
Location:
trunk/WebKitTools
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKitTools/ChangeLog

    r56747 r56748  
     12010-03-29  Eric Seidel  <eric@webkit.org>
     2
     3        Reviewed by Adam Barth.
     4
     5        ValidateReviewer step is draconian and un-tested
     6        https://bugs.webkit.org/show_bug.cgi?id=36792
     7
     8        ValidateReviewer logic was commented out in
     9        http://trac.webkit.org/changeset/56744
     10        That was a symptom of the fact that validatereviewer.py
     11        is too inflexible to be used when real humans are driving webkit-patch.
     12        For now we just disable ValidateReviewer when humans are at the keyboard.
     13
     14        * Scripts/webkitpy/tool/steps/validatereviewer.py:
     15         - Only run when in non-interactive mode.
     16        * Scripts/webkitpy/tool/steps/validatereviewer_unittest.py: Added.
     17         - Test our validation logic to make sure it's sane.
     18
    1192010-03-29  Chris Jerdonek  <cjerdonek@webkit.org>
    220
  • trunk/WebKitTools/Scripts/webkitpy/tool/steps/validatereviewer.py

    r56744 r56748  
    3535
    3636
     37# FIXME: Some of this logic should probably be unified with CommitterValidator?
    3738class ValidateReviewer(AbstractStep):
     39    # FIXME: This should probably move onto ChangeLogEntry
     40    def _has_valid_reviewer(self, changelog_entry):
     41        if changelog_entry.reviewer():
     42            return True
     43        if re.search("unreviewed", changelog_entry.contents(), re.IGNORECASE):
     44            return True
     45        if re.search("rubber[ -]stamp", changelog_entry.contents(), re.IGNORECASE):
     46            return True
     47        return False
     48
    3849    def run(self, state):
     50        # FIXME: For now we disable this check when a user is driving the script
     51        # this check is too draconian (and too poorly tested) to foist upon users.
     52        if not self._options.non_interactive:
     53            return
    3954        # FIXME: We should figure out how to handle the current working
    4055        #        directory issue more globally.
     
    4257        for changelog_path in self._tool.checkout().modified_changelogs():
    4358            changelog_entry = ChangeLog(changelog_path).latest_entry()
    44             if changelog_entry.reviewer():
    45                 continue
    46             if re.search("unreviewed", changelog_entry.contents(), re.IGNORECASE):
    47                 continue
    48             if re.search("rubber[ -]stamp", changelog_entry.contents(), re.IGNORECASE):
     59            if self._has_valid_reviewer(changelog_entry):
    4960                continue
    5061            reviewer_text = changelog_entry.reviewer_text()
    51 #            if reviewer_text:
    52 #                log("%s does not appear to be a valid reviewer according to committers.py.")
    53 #            error('%s neither lists a valid reviewer nor contains the string "Unreviewed" or "Rubber stamp" (case insensitive).' % changelog_path)
     62            if reviewer_text:
     63                log("%s found in %s does not appear to be a valid reviewer according to committers.py." % (reviewer_text, changelog_path))
     64            error('%s neither lists a valid reviewer nor contains the string "Unreviewed" or "Rubber stamp" (case insensitive).' % changelog_path)
Note: See TracChangeset for help on using the changeset viewer.