Changes between Initial Version and Version 1 of WatchList


Ignore:
Timestamp:
Oct 19, 2011 3:01:26 PM (11 years ago)
Author:
levin@chromium.org
Comment:

instructions about using the watch list

Legend:

Unmodified
Added
Removed
Modified
  • WatchList

    v1 v1  
     1The watchlist is a simple way to watch for new patches that interest you.
     2
     3
     4= How to use the watch list =
     5
     6You’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).
     7
     8= Details =
     9
     10The watchlist file is here: http://trac.webkit.org/browser/trunk/Tools/Scripts/webkitpy/common/config/watchlist
     11
     12Here’s an example version:
     13
     14{{{
     15{
     16    "DEFINITIONS": {
     17        "ThreadingFiles": {
     18            "filename": r"Source/JavaScriptCore/wtf/ThreadSpecific\."
     19                        r"|Source/JavaScriptCore/wtf/ThreadSafeRefCounted\."
     20                       
     21        },
     22        "ThreadingUsage": {
     23            "more": r"(CrossThreadCopier|CrossThreadRefCounted)(?!\.(h|cpp))",
     24        },
     25    },
     26    "CC_RULES": {
     27        "ThreadingFiles|ThreadingUsage": [ "levin+threading@chromium.org", ],
     28    },
     29    "MESSAGE_RULES": {
     30        "ThreadingUsage": [ "Are you sure you want to using threading?!?", ],
     31    },
     32}
     33}}}
     34
     35== Definitions section ==
     36
     37The 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.
     38
     39If 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.) 
     40
     41A 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.
     42
     43== CC rules ==
     44
     45The 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.
     46
     47== Message rules ==
     48
     49The message rules is where you list any messages that should be added to a bug when a definition matches.
     50
     51= Trying out your change =
     52
     53Do a change locally that should trigger your rule and run:
     54{{{  webkit-patch apply-watchlist-local }}}
     55
     56It should tell you who would be cc’ed and any messages that would be added to the bug.
     57
     58= Check your change for mistakes =
     59
     60Mistakes will slow things down or mess up your change. Run {{{check-webkit-style}}} on your patch to catch many of these errors.
     61
     62= Appendix: Details about the regex used in the example: =
     63
     64One 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.
     65
     66The 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.
     67
     68Python’s regex format is documented here: http://docs.python.org/library/re.html