Switch between selected commit revisions shown in the diffviewer
Review Request #10136 — Created Sept. 10, 2018 and submitted
This patch builds upon the UI in /r/10132/ and implements the
functionality to render the actual content of the diff specified by the
selected commit range.
- Ran unit tests.
- Ran JS tests.
- Viewed the diffs generated -- they looked correct.
Description | From | Last Updated |
---|---|---|
Would it be possible to split out the ES6 port part of this change into a separate review request? |
david | |
W391 blank line at end of file |
reviewbot | |
E999 SyntaxError: invalid syntax |
reviewbot | |
E501 line too long (90 > 79 characters) |
reviewbot | |
W391 blank line at end of file |
reviewbot | |
F841 local variable 'diffset_commits' is assigned to but never used |
reviewbot | |
Col: 10 Missing semicolon. |
reviewbot | |
Col: 70 Missing semicolon. |
reviewbot | |
Col: 69 Missing semicolon. |
reviewbot | |
request -> requested? |
david | |
request -> requested? |
david | |
There's a lot of nesting and conditionals in here. Can we split this up to be more readable? |
david | |
Too many blank lines now. |
david | |
Needs a trailing comma. |
david | |
Needs a trailing comma. |
david | |
Missing the explanations here. |
david | |
Needs a doc comment. |
david | |
Looks to me like this returns a function, not an object. |
david | |
Can we use a ~ for each class reference to trim the output a bit? |
chipx86 | |
Let's get rid of the double loop and need for constructing generators. What do you think of: needs_base_commit = base_commit_id … |
chipx86 | |
Too many blank lines. |
chipx86 | |
There's some redundancy in handling of missing data here. We know index is in GET, but we call .get() on … |
chipx86 | |
string |
chipx86 | |
string |
chipx86 | |
Can you put parens around the expression? |
chipx86 | |
These are indented too far. |
chipx86 | |
These should all align. |
chipx86 |
- Change Summary:
-
Rebased. Added js tests.
- Summary:
-
WIP: Switch between selected commit revisions shown in the diffviewerSwitch between selected commit revisions shown in the diffviewer
- Commit:
-
95605536806a8870ae11a35498bacb3a4f17d1d71eb2d33897c22087d203da658338f67cfc28b49b
- Diff:
-
Revision 2 (+1130 -236)
- Change Summary:
-
jshint,pep8
- Commit:
-
1eb2d33897c22087d203da658338f67cfc28b49ba9692dab919775e59bf2bfac27d85cfdb8ae85be
- Diff:
-
Revision 3 (+1127 -236)
Checks run (2 succeeded)
- Depends On:
-
- Commit:
a9692dab919775e59bf2bfac27d85cfdb8ae85beb697192e1d3627ff2cf6c226fe52579f0768f3fe- Diff:
Revision 4 (+946 -132)
Checks run (2 succeeded)
flake8 passed.JSHint passed.
- Commit:
-
b697192e1d3627ff2cf6c226fe52579f0768f3fe7158966c0cb57dbd306dcb9ee22499bfaed0c385
- Diff:
-
Revision 5 (+967 -132)
Checks run (2 succeeded)
- Change Summary:
-
Adds missing unit tests
- Depends On:
-
- Commit:
7158966c0cb57dbd306dcb9ee22499bfaed0c3853b1c31d97d42a0d50ae60acc91c32afe5ea2f9a9- Diff:
Revision 6 (+990 -132)
Checks run (2 succeeded)
flake8 passed.JSHint passed.
-
-
-
Let's get rid of the double loop and need for constructing generators. What do you think of:
needs_base_commit = base_commit_id is not None needs_tip_commit = tip_commit_id is not None if needs_base_commit or needs_tip_commit: for commit in commits: if needs_base_commit and commit.pk == base_commit_id: base_commit = commit needs_base_commit = False if needs_tip_commit and commit.pk == tip_commit_id: tip_commit = commit needs_tip_commit = False if not needs_base_commit and not needs_tip_commit: break
-
-
There's some redundancy in handling of missing data here. We know
index
is inGET
, but we call.get()
on it anyways. We're also then doing exception handling anywya. How about instead we do:try: diff_file['index'] = int(self.request.GET['index']) except (KeyError, ValueError): pass
-
-
-
-
- Change Summary:
-
Addressed feedback.
- Commit:
-
3b1c31d97d42a0d50ae60acc91c32afe5ea2f9a9d543ed966b0a1ac50afd49cebfbc67c1753a1bb5
- Diff:
-
Revision 7 (+958 -106)