Correctly request and return FileDiffs with base FileDiff IDs
Review Request #10245 — Created Oct. 19, 2018 and submitted
The logic to request a diff fragment with a base FileDiff ID was never
actually implemented. TheRB.DiffReviewable
model generated a URL with
an invalid query string and, even if it were valid, the
DiffFragmentView
did not know how to ask for a single FileDiff with a
base FileDiff.The
RB.DiffReviewable
model now generates a correct URL and the
DiffFragmentView
can parse this into a call intoget_diff_files
with
the appropriate parameters.Additionally, the base FileDiff determination in
get_diff_files
was
incorrect: it returned an ancestor that was too old. This has been
corrected to return the least recent FileDiff from after the specified
base commit.
Ran unit tests.
Description | From | Last Updated |
---|---|---|
E201 whitespace after '(' |
reviewbot | |
Typo: "provded" -> "provided" |
chipx86 | |
No blank line. |
chipx86 | |
assertIsNone |
chipx86 | |
assertIsNone |
chipx86 | |
Do we have proper checks and test coverage here? It's crucial that nobody can get to other people's diffs through … |
chipx86 | |
This doesn't seem like a suitable message. |
chipx86 | |
Nor this. |
chipx86 | |
Let's pull the index out. This is a lengthy expression to put into a template literal. Debugging is easier if … |
chipx86 | |
No trailing comma here. (File isn't ES6). |
chipx86 | |
E999 SyntaxError: invalid syntax |
reviewbot | |
E113 unexpected indentation |
reviewbot | |
W391 blank line at end of file |
reviewbot | |
Col: 48 Unnecessary semicolon. |
reviewbot | |
Col: 47 Missing semicolon. |
reviewbot | |
Col: 17 Missing semicolon. |
reviewbot | |
Col: 48 Unnecessary semicolon. |
reviewbot | |
Col: 47 Missing semicolon. |
reviewbot | |
Col: 17 Missing semicolon. |
reviewbot | |
W391 blank line at end of file |
reviewbot | |
Col: 17 Missing semicolon. |
reviewbot | |
Col: 47 Missing semicolon. |
reviewbot | |
Col: 48 Unnecessary semicolon. |
reviewbot | |
Let's use the IDs instead of %r, to avoid any chance of leaking details on filenames to those who shouldn't … |
chipx86 | |
Typo: "Test sfor" -> "Tests for" |
chipx86 | |
Alphabetical order. |
chipx86 | |
Can you pass this with data= specifically? |
chipx86 |
- Change Summary:
-
Fixed unit tests. Added JS test.
- Summary:
-
WIP: Correctly request and return FileDiffs with base FileDiff IDsCorrectly request and return FileDiffs with base FileDiff IDs
- Testing Done:
-
Ran unit tests.
- - TODO: Add more unit tests
- TODO: Add more JS tests. - Commit:
-
c948c3912e33581c77b79af82cdf365a46fb2663fa0439896578d7f7c60c592d176d102ebcf92d15
- Diff:
-
Revision 2 (+103 -52)
Checks run (1 failed, 1 succeeded)
flake8
- Commit:
-
fa0439896578d7f7c60c592d176d102ebcf92d1548fcd287b1fd201293b4d7895f5d7134198e2bb1
- Diff:
-
Revision 3 (+103 -52)
Checks run (2 succeeded)
- Commit:
-
48fcd287b1fd201293b4d7895f5d7134198e2bb1330e7fe43a3b6628fa6aba4d35a1eb524d89e75a
- Diff:
-
Revision 4 (+144 -52)
- Commit:
-
330e7fe43a3b6628fa6aba4d35a1eb524d89e75aa789b9e03e6231f7bd3a1749348a05bc567ca5a6
- Diff:
-
Revision 5 (+110 -52)
- Commit:
-
a789b9e03e6231f7bd3a1749348a05bc567ca5a6bd7adc68819449a9bf089dd1843d9a95a9601a93
- Diff:
-
Revision 6 (+271 -52)
- Commit:
-
bd7adc68819449a9bf089dd1843d9a95a9601a9357c9cc3419e02c21dea5b71df72b605eda99fe26
- Diff:
-
Revision 7 (+261 -52)
Checks run (2 succeeded)
- Change Summary:
-
Addressed feedback.
- Commit:
-
57c9cc3419e02c21dea5b71df72b605eda99fe261cd0436c4c197d7200f6136fdea8634d3ecfb8af
- Diff:
-
Revision 8 (+258 -52)