Comment serialization cleanup part 6: Fix terrible DiffFile names
Review Request #13660 — Created March 21, 2024 and submitted
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.
Summary | ID |
---|---|
c3569256e79e4322448ac3bd5165f09f675e0ed8 |
Description | From | Last Updated |
---|---|---|
This affects the Diff Context API, right? If so, then we do have to be careful with this, because it's … |
chipx86 | |
line too long (80 > 79 characters) Column: 80 Error code: E501 |
reviewbot | |
I do want to document versioning of any fields that have changed, because from time to time changes do need … |
chipx86 | |
Should this use import type? |
chipx86 |
- Commits:
-
Summary ID 3a87c86d7761ec135d9364e8d0e011f998097f2f 493987e97a9b36abdd91b6dbb5bb9849c20c1ca1 - Diff:
-
Revision 2 (+382 -282)
Checks run (2 succeeded)
-
-
This affects the Diff Context API, right? If so, then we do have to be careful with this, because it's been used in the wild in a couple places in the past. Whether it's actively in use, I don't know, but we should be careful with it.
If this does affect it, then we need to figure out a versioning scheme here. We can discuss that more offline.
-
I do want to document versioning of any fields that have changed, because from time to time changes do need to be backported and this history could easily be lost.
-
- Commits:
-
Summary ID 493987e97a9b36abdd91b6dbb5bb9849c20c1ca1 c3569256e79e4322448ac3bd5165f09f675e0ed8 - Diff:
-
Revision 3 (+432 -284)