Bug 80443

Summary: Copying old baselines throws an error if the new directory doesn't exist
Product: WebKit Reporter: Ojan Vafai <ojan>
Component: New BugsAssignee: 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 Flags
Patch
none
Patch abarth: review+

Ojan Vafai
Reported 2012-03-06 14:39:07 PST
Copying old baselines throws an error if the new directory doesn't exist
Attachments
Patch (2.25 KB, patch)
2012-03-06 14:40 PST, Ojan Vafai
no flags
Patch (3.63 KB, patch)
2012-03-06 14:50 PST, Ojan Vafai
abarth: review+
Ojan Vafai
Comment 1 2012-03-06 14:40:50 PST
Adam Barth
Comment 2 2012-03-06 14:43:12 PST
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.
Ojan Vafai
Comment 3 2012-03-06 14:44:44 PST
(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?
Adam Barth
Comment 4 2012-03-06 14:47:17 PST
> 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.
Ojan Vafai
Comment 5 2012-03-06 14:50:48 PST
Adam Barth
Comment 6 2012-03-06 14:51:26 PST
Comment on attachment 130447 [details] Patch Thanks.
Ojan Vafai
Comment 7 2012-03-06 14:53:43 PST
Dirk Pranke
Comment 8 2012-03-06 18:16:12 PST
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 ...
Note You need to log in before you can comment on or make changes to this bug.