flake8
-
reviewboard/diffviewer/parser.py (Diff revision 1) Show all issues -
reviewboard/diffviewer/tests/test_diffx_parser.py (Diff revision 1) E501 line too long (80 > 79 characters)
Review Request #11769 — Created Aug. 3, 2021 and submitted
Information | |
---|---|
chipx86 | |
Review Board | |
release-4.0.x | |
Reviewers | |
reviewboard | |
DiffXParser
stores parsed information on a DiffX file inDiffSet
,
DiffCommit
, andFileDiff
, and then uses that information to
regenerate the DiffX file.The problem is, if a diff is uploaded without commit history (due to API
usage or SCM limitation), there is noDiffCommit
, so we were losing
out on all the change-related data and all associated files. This isn't
just an issue for DiffX, but any parser storing data in
ParsedDiffChange.extra_data
.
FileDiff
creation now checks for this situation and stores any
ParsedDiffChange.extra_data
content in a special key inDiffSet
(change_extra_data
for a main diff,parent_change_extra_data
for a
parent diff).DiffXParser
will look for this and use it if commits
aren't available.
Unit tests pass on Python 2 and 3.
Verified that this fixed issues in production with non-commit-backed
diffs.
reviewboard/diffviewer/parser.py (Diff revision 1) |
---|
reviewboard/diffviewer/tests/test_diffx_parser.py (Diff revision 1) |
---|
E501 line too long (80 > 79 characters)
Commits: |
|
|||||||||
---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 2 (+586 -48) |