Fix the order shown for file attachment diffs.
Review Request #7089 — Created March 19, 2015 and submitted
When viewing diffs of file attachments, the displayed order between the two revisions were reversed. For instance, on images, the new image was being shown as the original version, and the original image was shown a the new version. This was due to the order in which the URL arguments were captured. In file attachment terms, the original file is the one being diffed against, but the URL was capturing the new file as the one being diffed against. Text attachments were correctly shown, but had reversed the IDs and state. They're now using the correct variables. This change fixes up the capture order, the template rendering for text attachments, and the logic for text attachments, fixing all display issues.
Tested with some revisioned images I had. The order was correct for all revisions.
Description | From | Last Updated |
---|---|---|
I don't like this change. We have it in the other order for diffs+interdiffs. I'd rather fix the other code … |
david |
- Change Summary:
-
Fixed the order of data for text-based file attachments.
- Description:
-
When viewing diffs of file attachments, the displayed order between the
two revisions were reversed. For instance, on images, the new image was being shown as the original version, and the original image was shown a the new version. This was due to the order in which the URL arguments were captured. In
file attachment terms, the original file is the one being diffed against, but the URL was capturing the new file as the one being diffed against. ~ This change just fixes up the capture order, fixing all display issues.
~ Text attachments were correctly shown, but had reversed the IDs and
+ state. They're now using the correct variables. + + This change fixes up the capture order, the template rendering for text
+ attachments, and the logic for text attachments, fixing all display + issues. - Commit:
-
0078b275fe30012fd1d2eb432f491158412b00dd3e416f8ecaeb13ec0e3170469a65c9433cdfd4d0
-
Tool: Pyflakes Processed Files: reviewboard/reviews/ui/text.py reviewboard/reviews/urls.py Ignored Files: reviewboard/templates/reviews/ui/text.html reviewboard/static/rb/js/views/fileAttachmentRevisionLabelView.js Tool: PEP8 Style Checker Processed Files: reviewboard/reviews/ui/text.py reviewboard/reviews/urls.py Ignored Files: reviewboard/templates/reviews/ui/text.html reviewboard/static/rb/js/views/fileAttachmentRevisionLabelView.js