Bug 31544 - Move StyleQueue over to using PatchCollection
Summary: Move StyleQueue over to using PatchCollection
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
Depends on:
Reported: 2009-11-16 04:18 PST by Adam Barth
Modified: 2009-11-16 08:46 PST (History)
4 users (show)

See Also:

Patch (7.82 KB, patch)
2009-11-16 04:19 PST, Adam Barth
no flags Details | Formatted Diff | Diff
Patch (5.85 KB, patch)
2009-11-16 04:20 PST, Adam Barth
eric: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Barth 2009-11-16 04:18:21 PST
That's what infrastructure is for.
Comment 1 Adam Barth 2009-11-16 04:19:20 PST
Created attachment 43291 [details]
Comment 2 Adam Barth 2009-11-16 04:20:37 PST
Created attachment 43292 [details]
Comment 3 Eric Seidel (no email) 2009-11-16 04:26:10 PST
Comment on attachment 43292 [details]

I think add_all should be add_patches
add() doens't need to exist.

The tests will need to update names if you do that.

There is likely some super-slick python way to do this, by implementing the right bits to be a sequence type, but that's more python than I know.  I'll CC some python folks though and they can give post-landing comments if they choose.
Comment 4 Adam Barth 2009-11-16 04:29:43 PST
	M	WebKitTools/ChangeLog
	M	WebKitTools/Scripts/bugzilla-tool
	M	WebKitTools/Scripts/modules/patchcollection.py
	M	WebKitTools/Scripts/modules/patchcollection_unittest.py
Committed r51030
Comment 5 Evan Martin 2009-11-16 08:46:00 PST
Not quite sure what you're asking, but if it's about add vs add_all, you can do something like

def add(self, *patches):
  use patches like an array

foobar.add(somepatch)       # works, passes a one-length array
foobar.add(patch1, patch2)  # also works
foobar.add(*patches)        # can also pass arrays

so you'd have stuff like

+    def add_all_from_bug(self, bug_id):
+        self.add_all(self._bugs.fetch_patches_from_bug(bug_id))
instead be
def add_from_bug(self, bug_id):