Bug 69288 - watchlist: Allow specified a bug to attach the watchlist info to.
Summary: watchlist: Allow specified a bug to attach the watchlist info to.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: David Levin
URL:
Keywords:
Depends on:
Blocks: 68822 68974
  Show dependency treegraph
 
Reported: 2011-10-03 13:34 PDT by David Levin
Modified: 2011-10-03 14:44 PDT (History)
2 users (show)

See Also:


Attachments
Patch (5.47 KB, patch)
2011-10-03 13:38 PDT, David Levin
eric: review+
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-10-03 13:34:46 PDT
This is for the apply-watchlist-local command which is what the bot will use since the patch will already be downloaded.
Comment 1 David Levin 2011-10-03 13:38:42 PDT
Created attachment 109521 [details]
Patch
Comment 2 Eric Seidel (no email) 2011-10-03 13:44:01 PDT
Comment on attachment 109521 [details]
Patch

OK.
Comment 3 Adam Barth 2011-10-03 14:12:20 PDT
Comment on attachment 109521 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=109521&action=review

> Tools/Scripts/webkitpy/tool/commands/applywatchlistlocal.py:45
> +        if len(args) > 1:
> +            raise Exception("Too many arguments given: %s" % (' '.join(args)))

The Command infrastructure should do most of this work for you by parsing argument_names

> Tools/Scripts/webkitpy/tool/commands/applywatchlistlocal.py:47
> +        if not args:
> +            return {}

Should we try to get the bug information from the ChangeLog if it's not given on the command line?  There's a bunch of infrastructure for doing that.
Comment 4 David Levin 2011-10-03 14:44:41 PDT
Committed as http://trac.webkit.org/changeset/96540

(In reply to comment #3)
> (From update of attachment 109521 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=109521&action=review
> 
> > Tools/Scripts/webkitpy/tool/commands/applywatchlistlocal.py:45
> > +        if len(args) > 1:
> > +            raise Exception("Too many arguments given: %s" % (' '.join(args)))
> 
> The Command infrastructure should do most of this work for you by parsing argument_names

It looks like it only handles required arguments but BUGID is an optional argument. 

> 
> > Tools/Scripts/webkitpy/tool/commands/applywatchlistlocal.py:47
> > +        if not args:
> > +            return {}
> 
> Should we try to get the bug information from the ChangeLog if it's not given on the command line?   There's a bunch of infrastructure for doing that.

Yeah, I saw a lot of commands that do this. I feel like actually putting the results on a bug is the rare case that only the bot will use but other folks will use this for trying out local changes to the watchlist, so I'd rather only but the results on a bug if the given is given explicitly.