[webkit-reviews] review granted: [Bug 69303] watchlist: Don't add the same message to a bug more than once. : [Attachment 109573] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Oct 4 22:16:48 PDT 2011


Adam Barth <abarth at webkit.org> has granted David Levin <levin at chromium.org>'s
request for review:
Bug 69303: watchlist: Don't add the same message to a bug more than once.
https://bugs.webkit.org/show_bug.cgi?id=69303

Attachment 109573: Patch
https://bugs.webkit.org/attachment.cgi?id=109573&action=review

------- Additional Comments from Adam Barth <abarth at webkit.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=109573&action=review


> Tools/Scripts/webkitpy/tool/mocktool.py:311
> -	   return Bug(self.bug_cache.get(bug_id), self)
> +	   return Bug(self.bug_cache.get(int(bug_id)), self)

Yeah, the issue of when bug ID are numbers and when they are strings is tricky.
 We didn't realize it would be a problem until it was too late.  We're more
careful in new objects.

> Tools/Scripts/webkitpy/tool/steps/applywatchlist.py:37
> +def is_message_in_comments(bug, message):

Module private functions start with _ by convention.  This seems like it should
be a method on bug though.

> Tools/Scripts/webkitpy/tool/steps/applywatchlist.py:61
> +	       messages = [message for message in messages if not
is_message_in_comments(bug, message)]

You can do this more easily with the filter function.


More information about the webkit-reviews mailing list