RESOLVED FIXED Bug 82933
check-webkit-style errors when removing .png files
https://bugs.webkit.org/show_bug.cgi?id=82933
Summary check-webkit-style errors when removing .png files
Florin Malita
Reported 2012-04-02 13:20:34 PDT
After http://trac.webkit.org/changeset/112270, removing .png files triggers the following: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'LayoutTests/ChangeLog', u'LayoutTests/plat..." exit_code: 1 ERROR: File does not exist: 'LayoutTests/platform/mac/transforms/no_transform_hit_testing-expected.png' Looks like we're force-processing non-existent (removed) png files (patchreader.py:66): if not line_numbers: match = re.search("\s*png$", path) if match: if call_only_once: self._text_file_reader.process_file(file_path=path, line_numbers=None)
Attachments
Patch (2.99 KB, patch)
2012-04-02 14:47 PDT, Tony Chang
no flags
Patch for landing (3.10 KB, patch)
2012-04-02 15:01 PDT, Tony Chang
no flags
Philip Rogers
Comment 1 2012-04-02 13:21:57 PDT
I'm hitting this as well, using vanilla SVN.
Tony Chang
Comment 2 2012-04-02 14:47:09 PDT
Adam Barth
Comment 3 2012-04-02 14:55:48 PDT
Comment on attachment 135195 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=135195&action=review > Tools/Scripts/webkitpy/style/patchreader.py:55 > - def check(self, patch_string): > + def check(self, patch_string, fs=FileSystem()): Eric doesn't like this pattern because it creates a static FileSystem() object that's re-used each time this function is called, but maybe it's ok here since FileSystem is normally global-ish object.
Tony Chang
Comment 4 2012-04-02 15:01:47 PDT
Created attachment 135201 [details] Patch for landing
Tony Chang
Comment 5 2012-04-02 15:02:21 PDT
View in context: https://bugs.webkit.org/attachment.cgi?id=135195&action=review >> Tools/Scripts/webkitpy/style/patchreader.py:55 >> + def check(self, patch_string, fs=FileSystem()): > > Eric doesn't like this pattern because it creates a static FileSystem() object that's re-used each time this function is called, but maybe it's ok here since FileSystem is normally global-ish object. Yeah, I thought it was OK in this case because FileSystem has no state. I guess that might not be true in the future so I'll change it to None.
Tony Chang
Comment 6 2012-04-02 16:55:08 PDT
Note You need to log in before you can comment on or make changes to this bug.