[Webkit-unassigned] [Bug 50901] Add remote zip file handling to webkitpy.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jan 6 13:34:36 PST 2011


https://bugs.webkit.org/show_bug.cgi?id=50901


Mihai Parparita <mihaip at chromium.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #77865|review?                     |review-
               Flag|                            |




--- Comment #11 from Mihai Parparita <mihaip at chromium.org>  2011-01-06 13:34:36 PST ---
(From update of attachment 77865)
View in context: https://bugs.webkit.org/attachment.cgi?id=77865&action=review

> Tools/Scripts/webkitpy/common/directoryfileset.py:30
> +from webkitpy.common.net.zipfileset import FileSetFileHandle

Having DirectoryFileSet depend on zipfileset seems wrong. Can there be a (Base)FileSet class/file for code that is used in both?

> Tools/Scripts/webkitpy/common/directoryfileset.py:39
> +        self._filesystem = filesystem if filesystem != None else FileSystem()

This can just be self._filesystem = filesystem or Filesystem()

> Tools/Scripts/webkitpy/common/directoryfileset.py:72
> +        # directory heirarchy exists at the output path.

Typo ("heirarchy")

> Tools/Scripts/webkitpy/common/directoryfileset_unittest.py:35
> +        self._files = {}

Seems like _files doesn't need to be a property of the class (and you don't need an addFile method), given that you're using a MockFileSystem. Instead you could just say:
def setUp(self):
  files = {
   '/test/some-file': 'contents',
  ...
  }
  self._fileset = DirectoryFileSet('/test', MockFileSystem(files))

>> Tools/Scripts/webkitpy/common/system/filesystem_mock.py:116

> 
> This is  just [file for file in self.files if file.startswith(path)]

Though this should also handle directory names that are substrings of one another. I.e. if files is:
/foo/bar
/foo2/bar

Then files_under('/foo') should not include ('foo2/bar). 

(see how listdir is implemented to avoid this)

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list