Bug 69031 - watchlist: Add a way to detect a net increase or decrease of a pattern (in a file).
Summary: watchlist: Add a way to detect a net increase or decrease of a pattern (in a ...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: David Levin
URL:
Keywords:
Depends on:
Blocks: 68822
  Show dependency treegraph
 
Reported: 2011-09-28 14:38 PDT by David Levin
Modified: 2011-09-30 17:39 PDT (History)
3 users (show)

See Also:


Attachments
Patch (13.95 KB, patch)
2011-09-30 17:14 PDT, David Levin
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Levin 2011-09-28 14:38:27 PDT
The idea is that to attempt a regex match. 

When there is a regex match, use the exact match and count additions and removals and do a diff to determine if it the pattern is a match.

This allows one to have a pattern like this:
  more_in_code: r'RefCountedThreadSafe<|RefCounted<'
and then the pattern matches if the number of ThreadSafeRefCount< or RefCounted< increased in any file (even if one was replaced by the other).

This is a simple way to do mimic an intraline diff and say that the an occurrence of a string is new (which is typically what people would want to see).
Comment 1 David Levin 2011-09-30 17:14:38 PDT
Created attachment 109378 [details]
Patch
Comment 2 Adam Barth 2011-09-30 17:25:56 PDT
Comment on attachment 109378 [details]
Patch

Ok.  My sense is you should wire this up to a real bot pretty soon so we can get experience.  Ship first, ask questions later!
Comment 3 David Levin 2011-09-30 17:27:45 PDT
fwiw, I think this one is by far more useful than added_in_lines (and I may remove "added/remove_in_line" in the future).
Comment 4 Adam Barth 2011-09-30 17:32:27 PDT
(In reply to comment #3)
> fwiw, I think this one is by far more useful than added_in_lines (and I may remove "added/remove_in_line" in the future).

Oh definitely.  This looks very cool.  I still think you should ship early and often.  :)
Comment 5 WebKit Review Bot 2011-09-30 17:39:00 PDT
Comment on attachment 109378 [details]
Patch

Clearing flags on attachment: 109378

Committed r96441: <http://trac.webkit.org/changeset/96441>
Comment 6 WebKit Review Bot 2011-09-30 17:39:04 PDT
All reviewed patches have been landed.  Closing bug.