Fix display of diffs of files that were renamed in a parent diff
Review Request #4015 — Created March 29, 2013 and discarded
Fix display of diffs of files that were renamed in a parent diff In order for this to work it was necessary to add a new column to the FileDiff table: parent_file. This stores the name of the file in the base revision, which may be different from the names of the file in either or both of the source and destination revisions.
- Posted several diffs with parent diffs that rename files. Scenarios: 1. Rename in parent diff, no rename in review diff 2. Rename in review diff, no rename in parent diff 3. Rename in both parent diff and review diff - Added unit tests for looking up files with the key scenarios that were failing before.
Description | From | Last Updated |
---|---|---|
I know most of the unit tests in this file use camelCase, but we're trying to move toward underscores. Mind … |
chipx86 | |
Unit tests must have their docstrings be 1 line, with no newlines. |
chipx86 | |
Col: 27 E128 continuation line under-indented for visual indent |
reviewbot | |
Col: 27 E128 continuation line under-indented for visual indent |
reviewbot | |
We try to avoid this format. Mind changing to standard strings? |
chipx86 | |
Only one blank line needed. |
chipx86 | |
Col: 5 E303 too many blank lines (2) |
reviewbot | |
Col: 27 E128 continuation line under-indented for visual indent |
reviewbot | |
Col: 27 E128 continuation line under-indented for visual indent |
reviewbot | |
Same here. |
chipx86 | |
And here. |
chipx86 | |
Col: 80 E501 line too long (85 > 79 characters) |
reviewbot | |
Col: 80 E501 line too long (80 > 79 characters) |
reviewbot |
- Testing Done:
-
+ -
Posted several diffs with parent diffs that rename files. Scenarios:
1. Rename in parent diff, no rename in review diff
2. Rename in review diff, no rename in parent diff
3. Rename in both parent diff and review diff
+ -
Added unit tests for looking up files with the key scenarios that were failing before.
-
-
This is a review from Review Bot. Tool: PEP8 Style Checker Processed Files: reviewboard/diffviewer/models.py reviewboard/diffviewer/tests.py reviewboard/diffviewer/diffutils.py reviewboard/diffviewer/evolutions/__init__.py reviewboard/diffviewer/forms.py reviewboard/diffviewer/evolutions/filediff_parent_file.py Ignored Files:
-
-
This is a review from Review Bot. Tool: PEP8 Style Checker Processed Files: reviewboard/diffviewer/models.py reviewboard/diffviewer/tests.py reviewboard/diffviewer/diffutils.py reviewboard/diffviewer/evolutions/__init__.py reviewboard/diffviewer/forms.py reviewboard/diffviewer/evolutions/filediff_parent_file.py Ignored Files:
-
This is a review from Review Bot. Tool: PEP8 Style Checker Processed Files: reviewboard/diffviewer/models.py reviewboard/diffviewer/tests.py reviewboard/diffviewer/diffutils.py reviewboard/diffviewer/evolutions/__init__.py reviewboard/diffviewer/forms.py reviewboard/diffviewer/evolutions/filediff_parent_file.py Ignored Files:
-
-
This is a review from Review Bot. Tool: PEP8 Style Checker Processed Files: reviewboard/diffviewer/models.py reviewboard/diffviewer/tests.py reviewboard/diffviewer/diffutils.py reviewboard/diffviewer/evolutions/__init__.py reviewboard/diffviewer/forms.py reviewboard/diffviewer/evolutions/filediff_parent_file.py Ignored Files:
-
Hi Colin, I went to go try out this patch today, but one of our other unit tests weren't passing after this change. This appears to be due to what's being stored in parent_files. My concern is that this change is going to cause other problems, as switching from f.origFile to f.newFile is a pretty significant change in what data is being stored.