Comment serialization cleanup part 6: Fix terrible DiffFile names
Review Request #13660 — Created March 21, 2024 and submitted — Latest diff uploaded
The DiffFile model (and the
files
context key when rendering
diffviewer templates) still used variable names from the very first days
of Review Board, when we used a fair bit of Perforce terminology.This change fixes that to use
orig_filename
,orig_revision
,
modified_filename
, andmodified_revision
. This is a breaking change,
but I think that's okay for two reasons:
- The
DiffFile
model is pretty much an implementation detail of our
diffviewer UI. It seems extremely unlikely that anybody would be
digging into this.- The documentation inside
DiffFile
was quite incorrect for many of
the attributes. This was fixed in a prior change, but reinforces my
belief that nobody was using it.
Ran python tests.
Ran js-tests.
Diff Revision 2
This is not the most recent revision of the diff. The latest diff is revision 3. See what's changed.
orig
1
2
3
Commits
Files
reviewboard/diffviewer/diffutils.py |
---|
reviewboard/diffviewer/tests/test_diffutils.py |
---|
reviewboard/reviews/tests/test_reviews_diff_viewer_view.py |
---|
reviewboard/reviews/views/diff_fragments.py |
---|
reviewboard/reviews/views/diffviewer.py |
---|
reviewboard/static/rb/js/reviews/models/diffFileModel.ts |
---|
reviewboard/static/rb/js/reviews/models/tests/diffFileModelTests.ts |
---|
reviewboard/static/rb/js/reviews/views/diffFileIndexView.ts |
---|
reviewboard/static/rb/js/reviews/views/diffViewerPageView.ts |
---|
reviewboard/templates/diffviewer/diff_file_fragment.html |
---|
reviewboard/templates/diffviewer/diff_fragment_error_base.html |
---|