Summary: | Copying old baselines throws an error if the new directory doesn't exist | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Ojan Vafai <ojan> | ||||||
Component: | New Bugs | Assignee: | Ojan Vafai <ojan> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | abarth, dpranke, webkit.review.bot | ||||||
Priority: | P2 | ||||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Attachments: |
|
Description
Ojan Vafai
2012-03-06 14:39:07 PST
Created attachment 130445 [details]
Patch
Comment on attachment 130445 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=130445&action=review > Tools/Scripts/webkitpy/common/system/filesystem.py:73 > + self.maybe_make_directory(self.dirname(destination)) copyfile is supposed to just be a wrapper around shutil.copyfile with the same semantics. We should change the callers of copyfile to call maybe_make_directory or provide a new function that does both. (In reply to comment #2) > (From update of attachment 130445 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=130445&action=review > > > Tools/Scripts/webkitpy/common/system/filesystem.py:73 > > + self.maybe_make_directory(self.dirname(destination)) > > copyfile is supposed to just be a wrapper around shutil.copyfile with the same semantics. We should change the callers of copyfile to call maybe_make_directory or provide a new function that does both. Why is it important that the semantics match? > Why is it important that the semantics match?
The idea behind filesystem is just to be able to mock out access to the real file system. Having the functions match the native python functions means you can read the python docs to see how they work.
Created attachment 130447 [details]
Patch
Comment on attachment 130447 [details]
Patch
Thanks.
Committed r109963: <http://trac.webkit.org/changeset/109963> I think this change broke test_start_cmd (webkitpy.layout_tests.servers.http_server_unittest.TestHttpServer) on the mac. I'll fix that in a separate change ... |