This is for the apply-watchlist-local command which is what the bot will use since the patch will already be downloaded.
Created attachment 109521 [details] Patch
Comment on attachment 109521 [details] Patch OK.
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.
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.