Summary: | webkit-patch should be able to find users and add them to bugzilla groups | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Eric Seidel (no email) <eric> | ||||||
Component: | New Bugs | Assignee: | Eric Seidel (no email) <eric> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | abarth, aroben, dbates, levin, ojan | ||||||
Priority: | P2 | ||||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Bug Depends on: | |||||||||
Bug Blocks: | 34179 | ||||||||
Attachments: |
|
Description
Eric Seidel (no email)
2011-06-24 13:37:56 PDT
The name "webkit-patch" is getting less and less accurate. Should we be using separate scripts for things like this? Or renaming webkit-patch? Created attachment 98532 [details]
Patch
webkit-patch has never been an accurate name. Suggestions welcome. We've also wanted to be able to have separate collections of commands, but never quite finished the refactoring necessary to make that happen. Meh. I prefer having one tool. It means that "webkit-patch --all-commands" shows you each command with a description of what it does instead of just seeing the list of all the scripts without description of what they do. Here is an example of using the new add-users-to-groups command: webkit-patch add-users-to-groups sullivan@chromium.org Add users matching "sullivan@chromium.org" which groups? 1. canconfirm 2. editbugs Enter one or more numbers (comma-separated), or "all": Logging in as eric@webkit.org... Found 1 users matching sullivan@chromium.org: sullivan@chromium.org (15086) Are you sure you want add 1 users to groups ['canconfirm', 'editbugs']? (This action cannot be undone using webkit-patch.) [Y/n]: Adding sullivan@chromium.org to ['canconfirm', 'editbugs'] With this we could grant editbugs/canconfirm to all of @chromium.org or @mozilla.org at once (or whatever policy decision we'd like to make). Here is an example of running find-users: webkit-patch find-users chromium.org Logging in as eric@webkit.org... Aaron Boodman <aa@chromium.org> (8238) (canconfirm, editbugs) Andrey Adaikin <aandrey@chromium.org> (14805) (editbugs) Alice Boxhall <aboxhall@chromium.org> (14625) (canconfirm, editbugs) Aaron Colwell <acolwell@chromium.org> (13774) (none) Adam Klein <adamk@chromium.org> (14354) (canconfirm, editbugs) Mads Ager <ager@chromium.org> (8890) (canconfirm, editbugs) Adam Langley <agl@chromium.org> (8744) (canconfirm, editbugs) Albert J. Wong <ajwong@chromium.org> (9759) (canconfirm, editbugs) <akalin@chromium.org> (15464) (none) Alok Priyadarshi <alokp@chromium.org> (11778) (editbugs) Amanda Walker <amanda@chromium.org> (8123) (none) Alexey Marinichev <amarinichev@chromium.org> (13251) (editbugs) Amit Joshi <amit@chromium.org> (9485) (none) The UI for both of these commands could be improved, but this works for a first-cut. Created attachment 98536 [details]
Fix one exception
*** Bug 34179 has been marked as a duplicate of this bug. *** can haz review? This came up again when another @chromium.org person emailed me to be added to edit bugs. I'd like to automate this. Clearly I need to troll pending-review more. Comment on attachment 98536 [details] Fix one exception View in context: https://bugs.webkit.org/attachment.cgi?id=98536&action=review > Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla.py:54 > + self._group_name_to_group_string_cache = {} Should this use a memoized function instead? > Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla.py:71 > + soup = BeautifulSoup(results_page, convertEntities=BeautifulStoneSoup.HTML_ENTITIES) There's no XML version of this page? > Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla.py:268 > + self.edit_user_parser = EditUsersParser() Do we want this to be persistent or instantiated each time? Maybe it doen't matter since the process isn't long-lived. > Tools/Scripts/webkitpy/tool/commands/__init__.py:8 > +from webkitpy.tool.commands.adduserstogroups import AddUsersToGroups > from webkitpy.tool.commands.bugsearch import BugSearch > from webkitpy.tool.commands.bugfortest import BugForTest > from webkitpy.tool.commands.download import * > from webkitpy.tool.commands.earlywarningsystem import * > +from webkitpy.tool.commands.findusers import * Not really related to this patch, but we should clean up whether this file always uses *, etc. (In reply to comment #3) > webkit-patch has never been an accurate name. Suggestions welcome. > webkit-swiss-army-knife? (In reply to comment #11) > (From update of attachment 98536 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=98536&action=review > > > Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla.py:54 > > + self._group_name_to_group_string_cache = {} > > Should this use a memoized function instead? Possibly. It gets awkward because we're passing in the edit page. > > Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla.py:71 > > + soup = BeautifulSoup(results_page, convertEntities=BeautifulStoneSoup.HTML_ENTITIES) > > There's no XML version of this page? Sadly no. > > Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla.py:268 > > + self.edit_user_parser = EditUsersParser() > > Do we want this to be persistent or instantiated each time? Maybe it doen't matter since the process isn't long-lived. Doesn't really matter. Since bugzilla is a singleton anyway, I'm not going to worry. > > Tools/Scripts/webkitpy/tool/commands/__init__.py:8 > > +from webkitpy.tool.commands.adduserstogroups import AddUsersToGroups > > from webkitpy.tool.commands.bugsearch import BugSearch > > from webkitpy.tool.commands.bugfortest import BugForTest > > from webkitpy.tool.commands.download import * > > from webkitpy.tool.commands.earlywarningsystem import * > > +from webkitpy.tool.commands.findusers import * > > Not really related to this patch, but we should clean up whether this file always uses *, etc. Agreed. Committed r95238: <http://trac.webkit.org/changeset/95238> |