-
-
reviewboard/reviews/builtin_fields.py (Diff revision 1) Col: 80 E501 line too long (117 > 79 characters)
-
-
-
-
-
Refactor queries for the review request page.
Review Request #8347 — Created Aug. 25, 2016 and submitted
This change moves all the data querying logic out of the review_detail view
into a newReviewRequestPageData
object. The view itself is now primarily
concerned with computation of the etag, creation of the entries, and rendering
of the template--as it should be. This new object documents its attributes, and
is passed into the builtin fields which wish to use it to optimize their
queries, rather than the oldlocals_vars
hack, which I believe was possibly
literally one of the gateways to hell.As I was doing this I cleaned up some code which was no longer used and moved
some of the work from pre-etag to post-etag. This also changes some of the
timestamp comparisons to work off of integers (ctimes) instead of datetimes,
since before we had a few instances where we were comparing datetimes to 0.
- Did lots of testing with a few different review requests with lots of change
description and review boxes. - Ran unit tests.
Description | From | Last Updated |
---|---|---|
Col: 80 E501 line too long (117 > 79 characters) |
reviewbot | |
Col: 80 E501 line too long (81 > 79 characters) |
reviewbot | |
Col: 80 E501 line too long (113 > 79 characters) |
reviewbot | |
'GeneralComment' imported but unused |
reviewbot | |
'ScreenshotComment' imported but unused |
reviewbot | |
'FileAttachmentComment' imported but unused |
reviewbot | |
Col: 80 E501 line too long (117 > 79 characters) |
reviewbot | |
Col: 80 E501 line too long (81 > 79 characters) |
reviewbot | |
Col: 80 E501 line too long (113 > 79 characters) |
reviewbot | |
Col: 80 E501 line too long (117 > 79 characters) |
reviewbot | |
I know this was here before, but while updating this code, maybe move to a try/except KeyError, to reduce this … |
chipx86 | |
"great number more queries" sounds kinda odd. Maybe just "many more queries than necessary?" |
chipx86 | |
Col: 80 E501 line too long (81 > 79 characters) |
reviewbot | |
Col: 80 E501 line too long (113 > 79 characters) |
reviewbot | |
Let's say "The HTTP request object," just to help differentiate it from "review request" for those newer to the concepts. |
chipx86 | |
Missing period. |
chipx86 | |
Can you go into the details of the ctime additions in the description? I'm assuming they fix some bug. |
chipx86 | |
Col: 80 E501 line too long (117 > 79 characters) |
reviewbot | |
Col: 80 E501 line too long (117 > 79 characters) |
reviewbot |
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 2 (+442 -345) |
-
Tool: Pyflakes Processed Files: reviewboard/reviews/builtin_fields.py reviewboard/reviews/views.py reviewboard/reviews/detail.py Tool: PEP8 Style Checker Processed Files: reviewboard/reviews/builtin_fields.py reviewboard/reviews/views.py reviewboard/reviews/detail.py
-
reviewboard/reviews/builtin_fields.py (Diff revision 2) Col: 80 E501 line too long (117 > 79 characters)
-
-
Change Summary:
Fix ordering of replies to body-top and body-bottom (since reviews are now fetched in reverse order to make timestamp calculation faster for the ETag).
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 3 (+443 -345) |
-
Tool: Pyflakes Processed Files: reviewboard/reviews/builtin_fields.py reviewboard/reviews/views.py reviewboard/reviews/detail.py Tool: PEP8 Style Checker Processed Files: reviewboard/reviews/builtin_fields.py reviewboard/reviews/views.py reviewboard/reviews/detail.py
-
reviewboard/reviews/builtin_fields.py (Diff revision 3) Col: 80 E501 line too long (117 > 79 characters)
-
-
Change Summary:
Fix some issues that somehow snuck through my previous unit test runs.
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 4 (+455 -345) |
-
Tool: Pyflakes Processed Files: reviewboard/reviews/builtin_fields.py reviewboard/reviews/views.py reviewboard/reviews/detail.py Tool: PEP8 Style Checker Processed Files: reviewboard/reviews/builtin_fields.py reviewboard/reviews/views.py reviewboard/reviews/detail.py
-
reviewboard/reviews/builtin_fields.py (Diff revision 4) Col: 80 E501 line too long (117 > 79 characters)
-
Very nice.
-
reviewboard/reviews/builtin_fields.py (Diff revision 3) I know this was here before, but while updating this code, maybe move to a
try/except KeyError
, to reduce this from two lookups to one? -
reviewboard/reviews/detail.py (Diff revision 3) "great number more queries" sounds kinda odd. Maybe just "many more queries than necessary?"
-
reviewboard/reviews/detail.py (Diff revision 3) Let's say "The HTTP request object," just to help differentiate it from "review request" for those newer to the concepts.
-
-
reviewboard/reviews/views.py (Diff revision 3) Can you go into the details of the ctime additions in the description? I'm assuming they fix some bug.
Change Summary:
Requested changes.
Description: |
|
|||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Commit: |
|
|||||||||||||||||||||||||||||||||||||||
Diff: |
Revision 5 (+455 -345) |
-
Tool: Pyflakes Processed Files: reviewboard/reviews/builtin_fields.py reviewboard/reviews/views.py reviewboard/reviews/detail.py Tool: PEP8 Style Checker Processed Files: reviewboard/reviews/builtin_fields.py reviewboard/reviews/views.py reviewboard/reviews/detail.py
-
reviewboard/reviews/builtin_fields.py (Diff revision 5) Col: 80 E501 line too long (117 > 79 characters)