[webkit-reviews] review denied: [Bug 52261] Make webkit-patch support subdirectories for SVN checkouts : [Attachment 78613] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jan 11 16:25:18 PST 2011


Adam Barth <abarth at webkit.org> has denied Maciej Stachowiak <mjs at apple.com>'s
request for review:
Bug 52261: Make webkit-patch support subdirectories for SVN checkouts
https://bugs.webkit.org/show_bug.cgi?id=52261

Attachment 78613: Patch
https://bugs.webkit.org/attachment.cgi?id=78613&action=review

------- Additional Comments from Adam Barth <abarth at webkit.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=78613&action=review

Thanks for the patch.  This looks like a good approach.

> Tools/Scripts/webkitpy/common/checkout/scm.py:330
> +	   if len(patch_directories) > 0:
> +	       self.patch_directories = patch_directories

Private member variables in python are prefixed by _ (by convention).  We're
not perfect about this in webkitpy because we learned about it after we
started, but we're trying to enforce that for new code.

> Tools/Scripts/webkitpy/common/checkout/scm.py:332
> +	       self.patch_directories = [os.path.relpath(cwd,
self.checkout_root)]

Generally, using None is better than [] for default behavior, especially
default behavior that changes the empty set into the universal set.

> Tools/Scripts/webkitpy/common/checkout/scm.py:439
> -	   return self.run_status_and_extract_filenames(self.status_command(),
self._status_regexp("ACDMR"))
> +	   status_command = ["svn", "status"]
> +	   status_command.extend(self.patch_directories)

We don't want to do this for all clients of run_status_and_extract_filenames
and/or status_command ?  It seems strange to do this only here.

> Tools/Scripts/webkitpy/tool/main.py:88
> -	       self._scm = default_scm()
> +	       self._scm = default_scm(self._options)

options is a tool-layer concept (i.e., specific to webkit-patch).  We shouldn't
be passing the options collection to the "common" layer because different
scripts (e.g., new-run-webkit-tests) might have a different set of options. 
Usually what we do in this case is read the value out of the options collection
and pass it in a named argument explicitly.


More information about the webkit-reviews mailing list