Display commits in the diffviewer based on the selected revision
Review Request #6933 — Created Feb. 11, 2015 and submitted
The
DiffViewerView
now provides information about the DiffCommits on
the selected revision. TheDiffViewerPageView
and associated models
have been updated to parse this information. The information on
DiffCommits is shown in the diffviewer now via theDiffCommitIndexView
,
which renders a table similar to theDiffCommitListField
on a review
request.When the diff revision slider is moved to select a diff revision, the
DiffCommitListField
will automatically update and populate the table
with information from the individual diff commits pertaining to the
selected revision. If the selected diff revision does not have any
commits, then the table will be hidden until a revision is selected that
does have associated commits.
Manually verified the following:
- Selecting the base and a diff revision that had commits displayed the
commit table. - Selecting the base and a diff revision that did not have commits did
not display the table. - Switching from one diff revision to another with different commits
changed the table to display the new commits.
Description | From | Last Updated |
---|---|---|
We can reduce the work needed with: diff_context['diff_commits'] = \ diffset.diff_commits.values('commit_id', 'summary', 'author_name') |
chipx86 | |
Can you sort these alphabetically, with comments? |
chipx86 | |
If you append this after building all the children, you'll reduce the work performed by the browser. |
chipx86 | |
No space after function. |
chipx86 | |
Can this be one line? |
chipx86 | |
You can use this.$el for this. |
chipx86 | |
Should be inserted alphabetically. |
chipx86 | |
Can we put the comments before the attributes, like in other models? That helps to prevent having to modify other … |
chipx86 | |
What if this is empty? |
david | |
These need to be localized. Given that, we should just use _.template for this. |
chipx86 | |
Can we use underscores in the ID to match the other diff ones? |
chipx86 | |
Did you test this? I don't think <%- %> can work this way (since it pulls values out of the … |
david | |
This line is useless because you set it again in update() |
david | |
These two lines can be combined. |
david | |
Now that you've moved the creation into here, you don't need the .empty() call. |
david |
- Change Summary:
-
Update dependencies
- Diff:
-
Revision 2 (+142 -2)
-
Tool: Pyflakes Processed Files: reviewboard/diffviewer/views.py reviewboard/staticbundles.py Ignored Files: reviewboard/templates/diffviewer/view_diff.html reviewboard/static/rb/js/diffviewer/collections/diffCommitCollection.js reviewboard/static/rb/js/diffviewer/views/diffCommitIndexView.js reviewboard/static/rb/js/pages/models/diffViewerPageModel.js reviewboard/static/rb/js/diffviewer/models/diffCommitModel.js reviewboard/static/rb/js/pages/views/diffViewerPageView.js Tool: PEP8 Style Checker Processed Files: reviewboard/diffviewer/views.py reviewboard/staticbundles.py Ignored Files: reviewboard/templates/diffviewer/view_diff.html reviewboard/static/rb/js/diffviewer/collections/diffCommitCollection.js reviewboard/static/rb/js/diffviewer/views/diffCommitIndexView.js reviewboard/static/rb/js/pages/models/diffViewerPageModel.js reviewboard/static/rb/js/diffviewer/models/diffCommitModel.js reviewboard/static/rb/js/pages/views/diffViewerPageView.js
- Change Summary:
-
Fix Christian's issues.
- Diff:
-
Revision 3 (+144)
-
Tool: Pyflakes Processed Files: reviewboard/diffviewer/views.py reviewboard/staticbundles.py Ignored Files: reviewboard/templates/diffviewer/view_diff.html reviewboard/static/rb/js/diffviewer/collections/diffCommitCollection.js reviewboard/static/rb/js/diffviewer/views/diffCommitIndexView.js reviewboard/static/rb/js/pages/models/diffViewerPageModel.js reviewboard/static/rb/js/diffviewer/models/diffCommitModel.js reviewboard/static/rb/js/pages/views/diffViewerPageView.js Tool: PEP8 Style Checker Processed Files: reviewboard/diffviewer/views.py reviewboard/staticbundles.py Ignored Files: reviewboard/templates/diffviewer/view_diff.html reviewboard/static/rb/js/diffviewer/collections/diffCommitCollection.js reviewboard/static/rb/js/diffviewer/views/diffCommitIndexView.js reviewboard/static/rb/js/pages/models/diffViewerPageModel.js reviewboard/static/rb/js/diffviewer/models/diffCommitModel.js reviewboard/static/rb/js/pages/views/diffViewerPageView.js
- Change Summary:
-
JSHint
- Diff:
-
Revision 4 (+144)
-
Tool: Pyflakes Processed Files: reviewboard/diffviewer/views.py reviewboard/staticbundles.py Ignored Files: reviewboard/templates/diffviewer/view_diff.html reviewboard/static/rb/js/diffviewer/collections/diffCommitCollection.js reviewboard/static/rb/js/diffviewer/views/diffCommitIndexView.js reviewboard/static/rb/js/pages/models/diffViewerPageModel.js reviewboard/static/rb/js/diffviewer/models/diffCommitModel.js reviewboard/static/rb/js/pages/views/diffViewerPageView.js Tool: PEP8 Style Checker Processed Files: reviewboard/diffviewer/views.py reviewboard/staticbundles.py Ignored Files: reviewboard/templates/diffviewer/view_diff.html reviewboard/static/rb/js/diffviewer/collections/diffCommitCollection.js reviewboard/static/rb/js/diffviewer/views/diffCommitIndexView.js reviewboard/static/rb/js/pages/models/diffViewerPageModel.js reviewboard/static/rb/js/diffviewer/models/diffCommitModel.js reviewboard/static/rb/js/pages/views/diffViewerPageView.js
- Diff:
-
Revision 5 (+148)
-
Tool: Pyflakes Processed Files: reviewboard/diffviewer/views.py reviewboard/staticbundles.py Ignored Files: reviewboard/templates/diffviewer/view_diff.html reviewboard/static/rb/js/diffviewer/collections/diffCommitCollection.js reviewboard/static/rb/js/diffviewer/views/diffCommitIndexView.js reviewboard/static/rb/js/pages/models/diffViewerPageModel.js reviewboard/static/rb/js/diffviewer/models/diffCommitModel.js reviewboard/static/rb/js/pages/views/diffViewerPageView.js Tool: PEP8 Style Checker Processed Files: reviewboard/diffviewer/views.py reviewboard/staticbundles.py Ignored Files: reviewboard/templates/diffviewer/view_diff.html reviewboard/static/rb/js/diffviewer/collections/diffCommitCollection.js reviewboard/static/rb/js/diffviewer/views/diffCommitIndexView.js reviewboard/static/rb/js/pages/models/diffViewerPageModel.js reviewboard/static/rb/js/diffviewer/models/diffCommitModel.js reviewboard/static/rb/js/pages/views/diffViewerPageView.js
- Commit:
-
9c6d138b3f015eb1745930bb7aa18b1d17a127a2
- Diff:
-
Revision 6 (+143)
-
Tool: PEP8 Style Checker Processed Files: reviewboard/diffviewer/views.py reviewboard/staticbundles.py Ignored Files: reviewboard/templates/diffviewer/view_diff.html reviewboard/static/rb/js/diffviewer/collections/diffCommitCollection.js reviewboard/static/rb/js/diffviewer/views/diffCommitIndexView.js reviewboard/static/rb/js/pages/models/diffViewerPageModel.js reviewboard/static/rb/js/diffviewer/models/diffCommitModel.js reviewboard/static/rb/js/pages/views/diffViewerPageView.js Tool: Pyflakes Processed Files: reviewboard/diffviewer/views.py reviewboard/staticbundles.py Ignored Files: reviewboard/templates/diffviewer/view_diff.html reviewboard/static/rb/js/diffviewer/collections/diffCommitCollection.js reviewboard/static/rb/js/diffviewer/views/diffCommitIndexView.js reviewboard/static/rb/js/pages/models/diffViewerPageModel.js reviewboard/static/rb/js/diffviewer/models/diffCommitModel.js reviewboard/static/rb/js/pages/views/diffViewerPageView.js
- Summary:
-
Display commits in the diffviewer based on the selected revision.Display commits in the diffviewer based on the selected revision
- Diff:
-
Revision 7 (+133)
-
Tool: Pyflakes Processed Files: reviewboard/diffviewer/views.py reviewboard/staticbundles.py Ignored Files: reviewboard/templates/diffviewer/view_diff.html reviewboard/static/rb/js/diffviewer/collections/diffCommitCollection.js reviewboard/static/rb/js/diffviewer/views/diffCommitIndexView.js reviewboard/static/rb/js/pages/models/diffViewerPageModel.js reviewboard/static/rb/js/diffviewer/models/diffCommitModel.js reviewboard/static/rb/js/pages/views/diffViewerPageView.js Tool: PEP8 Style Checker Processed Files: reviewboard/diffviewer/views.py reviewboard/staticbundles.py Ignored Files: reviewboard/templates/diffviewer/view_diff.html reviewboard/static/rb/js/diffviewer/collections/diffCommitCollection.js reviewboard/static/rb/js/diffviewer/views/diffCommitIndexView.js reviewboard/static/rb/js/pages/models/diffViewerPageModel.js reviewboard/static/rb/js/diffviewer/models/diffCommitModel.js reviewboard/static/rb/js/pages/views/diffViewerPageView.js
- Diff:
-
Revision 8 (+141)
-
Tool: PEP8 Style Checker Processed Files: reviewboard/diffviewer/views.py reviewboard/staticbundles.py Ignored Files: reviewboard/templates/diffviewer/view_diff.html reviewboard/static/rb/js/diffviewer/collections/diffCommitCollection.js reviewboard/static/rb/js/diffviewer/views/diffCommitIndexView.js reviewboard/static/rb/js/pages/models/diffViewerPageModel.js reviewboard/static/rb/js/diffviewer/models/diffCommitModel.js reviewboard/static/rb/js/pages/views/diffViewerPageView.js Tool: Pyflakes Processed Files: reviewboard/diffviewer/views.py reviewboard/staticbundles.py Ignored Files: reviewboard/templates/diffviewer/view_diff.html reviewboard/static/rb/js/diffviewer/collections/diffCommitCollection.js reviewboard/static/rb/js/diffviewer/views/diffCommitIndexView.js reviewboard/static/rb/js/pages/models/diffViewerPageModel.js reviewboard/static/rb/js/diffviewer/models/diffCommitModel.js reviewboard/static/rb/js/pages/views/diffViewerPageView.js
- Diff:
-
Revision 9 (+141)
-
Tool: PEP8 Style Checker Processed Files: reviewboard/diffviewer/views.py reviewboard/staticbundles.py Ignored Files: reviewboard/templates/diffviewer/view_diff.html reviewboard/static/rb/js/diffviewer/collections/diffCommitCollection.js reviewboard/static/rb/js/diffviewer/views/diffCommitIndexView.js reviewboard/static/rb/js/pages/models/diffViewerPageModel.js reviewboard/static/rb/js/diffviewer/models/diffCommitModel.js reviewboard/static/rb/js/pages/views/diffViewerPageView.js Tool: Pyflakes Processed Files: reviewboard/diffviewer/views.py reviewboard/staticbundles.py Ignored Files: reviewboard/templates/diffviewer/view_diff.html reviewboard/static/rb/js/diffviewer/collections/diffCommitCollection.js reviewboard/static/rb/js/diffviewer/views/diffCommitIndexView.js reviewboard/static/rb/js/pages/models/diffViewerPageModel.js reviewboard/static/rb/js/diffviewer/models/diffCommitModel.js reviewboard/static/rb/js/pages/views/diffViewerPageView.js