Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(328)

Issue 6627059: make tests work, implement 'set noparent', owners propagating down (Closed)

Created:
9 years, 9 months ago by Dirk Pranke
Modified:
9 years, 7 months ago
Reviewers:
M-A Ruel
CC:
chromium-reviews, M-A Ruel
Visibility:
Public.

Description

make tests work, implement 'set noparent', owners propagating down Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=77351

Patch Set 1 #

Patch Set 2 : rebase against master now that I've committed the other change #

Patch Set 3 : whoops, missed some merge conflicts #

Patch Set 4 : lint #

Total comments: 16

Patch Set 5 : update w/ review feedback from maruel #

Unified diffs Side-by-side diffs Delta from patch set Stats (+167 lines, -105 lines) Patch
M owners.py View 1 2 3 4 4 chunks +99 lines, -50 lines 0 comments Download
M tests/filesystem_mock.py View 2 chunks +8 lines, -3 lines 0 comments Download
M tests/owners_unittest.py View 1 2 3 4 3 chunks +60 lines, -52 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
Dirk Pranke
There's a fair amount of change in this file, as all the logic needed to ...
9 years, 9 months ago (2011-03-07 20:50:27 UTC) #1
Dirk Pranke
Okay, landed the other changed and rebased ... this should make things easier to follow.
9 years, 9 months ago (2011-03-07 21:03:39 UTC) #2
M-A Ruel
A lots of nits but nothing show stopping, lgtm http://codereview.chromium.org/6627059/diff/5001/owners.py File owners.py (right): http://codereview.chromium.org/6627059/diff/5001/owners.py#newcode28 owners.py:28: ...
9 years, 9 months ago (2011-03-08 20:24:02 UTC) #3
Dirk Pranke
9 years, 9 months ago (2011-03-08 22:05:26 UTC) #4
http://codereview.chromium.org/6627059/diff/5001/owners.py
File owners.py (right):

http://codereview.chromium.org/6627059/diff/5001/owners.py#newcode28
owners.py:28: BASIC_EMAIL_REGEXP = r'^[\w\-\+\%\.]+\@[\w\-\+\%\.]+$'
On 2011/03/08 20:24:03, Marc-Antoine Ruel wrote:
> style nit:
> I prefer const at the top of the file, and 2 empty lines between file-level
> symbols.

OK.

http://codereview.chromium.org/6627059/diff/5001/owners.py#newcode50
owners.py:50: self.email_regexp = re.compile(BASIC_EMAIL_REGEXP)
On 2011/03/08 20:24:03, Marc-Antoine Ruel wrote:
> FYI, if you want it to be a whitelist of valid credentials, it probably needs
to
> be either a functor or a list of valid regexp or something.
> 
> I think it's out of scope of this change and I'm fine with this design for now
> and just fix it once it's needed.

Yeah, this was intended to be the simplest possible thing that would work for
now, and when I get to the TODO it'll probably need to be a validation callback
or something.

http://codereview.chromium.org/6627059/diff/5001/owners.py#newcode90
owners.py:90: def _CheckPaths(self, files):
On 2011/03/08 20:24:03, Marc-Antoine Ruel wrote:
> BTW I'm trying to get towards PEP-8 style naming for new code but I don't mind
> either.

You tell me this NOW?? :) Is there anything else in your style that isn't PEP-8
besides the two-space indent?

I'll change the naming in a later patch. I'd be happy to do anything that pushes
us to converging styles between Chromium and WebKit.

http://codereview.chromium.org/6627059/diff/5001/owners.py#newcode93
owners.py:93: assert all(_isunder(f, self.root) for f in files)
On 2011/03/08 20:24:03, Marc-Antoine Ruel wrote:
> What if self.root is not an abspath already? Like a symlink

Good question. I'll update it.

http://codereview.chromium.org/6627059/diff/5001/owners.py#newcode95
owners.py:95: def _CheckReviewers(self, reviewers):
On 2011/03/08 20:24:03, Marc-Antoine Ruel wrote:
> Can you add a one line docstring saying that it "Verifies that each reviewer
is
> a valid email address". While I'm not a fan of docstrings, it think it's
useful
> here.

Will do.

http://codereview.chromium.org/6627059/diff/5001/owners.py#newcode135
owners.py:135: self._ReadOneLine(line, lineno, dirpath, owners_path)
On 2011/03/08 20:24:03, Marc-Antoine Ruel wrote:
> I don't think having this code in a function makes it more readable.

I slightly prefer it, I think, but I agree it's not much of a win.

http://codereview.chromium.org/6627059/diff/5001/tests/filesystem_mock.py
File tests/filesystem_mock.py (right):

http://codereview.chromium.org/6627059/diff/5001/tests/filesystem_mock.py#new...
tests/filesystem_mock.py:41: if self.sep not in path:
On 2011/03/08 20:24:03, Marc-Antoine Ruel wrote:
> I always forgot the subtle difference there. (?)

I think it's mostly a question of operator precedence; there was real change in
this particular diff, I just prefer the latter style.

http://codereview.chromium.org/6627059/diff/5001/tests/owners_unittest.py
File tests/owners_unittest.py (right):

http://codereview.chromium.org/6627059/diff/5001/tests/owners_unittest.py#new...
tests/owners_unittest.py:124: self.assert_SyntaxError('set
myparentisbillgates\n')
On 2011/03/08 20:24:03, Marc-Antoine Ruel wrote:
> mydadisbillgates would be more specific. :)

Heh. Done.

Powered by Google App Engine
This is Rietveld 408576698