WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
59908
scm.py should be split into many pieces
https://bugs.webkit.org/show_bug.cgi?id=59908
Summary
scm.py should be split into many pieces
Eric Seidel (no email)
Reported
2011-05-01 18:17:11 PDT
scm.py should be split into many pieces
Attachments
Patch
(80.68 KB, patch)
2011-05-01 18:17 PDT
,
Eric Seidel (no email)
abarth
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Eric Seidel (no email)
Comment 1
2011-05-01 18:17:35 PDT
Created
attachment 91866
[details]
Patch
Eric Seidel (no email)
Comment 2
2011-05-01 18:34:24 PDT
Committed
r85450
: <
http://trac.webkit.org/changeset/85450
>
Dirk Pranke
Comment 3
2011-05-02 13:40:26 PDT
Comment on
attachment 91866
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=91866&action=review
> Tools/Scripts/webkitpy/common/checkout/scm/__init__.py:7 > +from .svn import SVN
I mentioned this in the other bug, but since you seem to be doing this intentionally here, relative path imports are discouraged in PEP-8.
> Tools/Scripts/webkitpy/common/checkout/scm/__init__.py:34 > + """
We should really add a comment here that this routine should NOT be used to determine the top of the webkit checkout, since that will only work if (a) the CWD is actually in the webkit checkout and not some other checkout and (b) the webkit checkout is a full checkout and not something like Chromium's hand-picked subset. We should point to a suggested alternative.
Adam Barth
Comment 4
2011-05-02 14:12:51 PDT
(In reply to
comment #3
)
> (From update of
attachment 91866
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=91866&action=review
> > > Tools/Scripts/webkitpy/common/checkout/scm/__init__.py:7 > > +from .svn import SVN > > I mentioned this in the other bug, but since you seem to be doing this intentionally here, relative path imports are discouraged in PEP-8.
That's what I thought, but Eric kept saying otherwise.
Eric Seidel (no email)
Comment 5
2011-05-02 14:56:29 PDT
(In reply to
comment #4
)
> (In reply to
comment #3
) > > (From update of
attachment 91866
[details]
[details]) > > View in context:
https://bugs.webkit.org/attachment.cgi?id=91866&action=review
> > > > > Tools/Scripts/webkitpy/common/checkout/scm/__init__.py:7 > > > +from .svn import SVN > > > > I mentioned this in the other bug, but since you seem to be doing this intentionally here, relative path imports are discouraged in PEP-8. > > That's what I thought, but Eric kept saying otherwise.
I haven't read pep-8 recently, so I don't feel an expert here. I don't think that absolute paths make sense inside module containers inside webkitpy. I think our deep module tree makes things tricky. I don't think .. relative paths *ever* make sense. But I would like to tighten up our module boundaries more. We have problems of one module reaching out into another module (checkout.changelog reaching out to bugzilla and bugzilla reaching back into checkout.scm.git for example) which I would like to get rid of. It feels a bit strange to me to have scm/__init__.py need to know where it is just to import its own .scm.py file, but if that's what the python experts tell us we should do, I'm not sure I know enough to disagree.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug