[webkit-dev] watchlist: A tool to alert you about patches of interest.

Adam Barth abarth at webkit.org
Wed Oct 19 15:54:47 PDT 2011


I've been experimenting with watchlists as Dave has been working on
them, and I find them very helpful.  For example, if you'd like to be
CCed whenever someone changes a web-facing IDL file, you subscribe to
"WebIDL" changes, as I have:

http://trac.webkit.org/browser/trunk/Tools/Scripts/webkitpy/common/config/watchlist#L75

Adam


On Wed, Oct 19, 2011 at 3:40 PM, David Levin <levin at chromium.org> wrote:
> The watchlist is a simple way to watch for new patches that interest
> you. The watchlist is automatically applied to patches by a bot (currently
> the style bot).
> I'm happy to answer questions about it here or in irc (and/or review any
> patches you make to the config file, but of course I don't mind others
> reviewing those patches or answering questions either).
> Here the details on how to use it
> from https://wiki.webkit.org/wiki/WatchList
>
>
> How to use the watch list
>
> You’ll need to create a definition which matches patches that you are
> interested in or find one that already exists. You’ll need to add a rule to
> cc yourself on the bug (or add a message to the bug).
>
> Details
>
> The watchlist file is
> here:  http://trac.webkit.org/browser/trunk/Tools/Scripts/webkitpy/common/config/watchlist
>
> Here’s an example version:
>
> {
>     "DEFINITIONS": {
>         "ThreadingFiles": {
>             "filename": r"Source/JavaScriptCore/wtf/ThreadSpecific\."
>                         r"|Source/JavaScriptCore/wtf/ThreadSafeRefCounted\."
>
>         },
>         "ThreadingUsage": {
>             "more":
> r"(CrossThreadCopier|CrossThreadRefCounted)(?!\.(h|cpp))",
>         },
>     },
>     "CC_RULES": {
>         "ThreadingFiles|ThreadingUsage": [ "levin+threading at chromium.org",
> ],
>     },
>     "MESSAGE_RULES": {
>         "ThreadingUsage": [ "Are you sure you want to using threading?!?",
> ],
>     },
> }
>
> Definitions section
>
> The definitions section is where you define what you want to look for. If it
> is a filename pattern, use “filename”. Filename matches are a prefix match.
>
> If is a code pattern use “more” or “less”, if you want to know if more or
> less of instances in that pattern occur. (more use the regex to find a match
> modified lines in a patch. Then it searches the to see if more instances of
> that exact text occur on a per file basis.)
>
> A definition is said to match if all of its clauses are true for any file in
> a patch. If you could look for more instances of a pattern occurring only
> within a group of a files by using both “filename” and “more” together.
>
> CC rules
>
> The cc rules section is where you list who should be added when a definition
> matches. You can or together definitions but I only recommend doing this
> when the definitions are highly related.
>
> Message rules
>
> The message rules is where you list any messages that should be added to a
> bug when a definition matches.
>
> Trying out your change
>
> Do a change locally that should trigger your rule and run: webkit-patch
> apply-watchlist-local
>
> It should tell you who would be cc’ed and any messages that would be added
> to the bug.
>
> Check your change for mistakes
>
> Mistakes will slow things down or mess up your change.
> Run check-webkit-style on your patch to catch many of these errors.
>
> Appendix: Details about the regex used in the example:
>
> One twist in the “more” match is the ?!\.(h|cpp)). This prevents matching
> mentions of CrossThreadRefCounted.h due to includes, build files, etc. which
> I don’t care about.
>
> The r is a python thing which means that the \ in the string don’t escape
> characters (r”\n” is r“\” +”n”) which is handy when you need the \ to escape
> regex characters.
>
> Python’s regex format is documented
> here:  http://docs.python.org/library/re.html
>
> Best wishes,
> dave
> _______________________________________________
> webkit-dev mailing list
> webkit-dev at lists.webkit.org
> http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
>
>


More information about the webkit-dev mailing list