Show cumulative diffs in the diffviewer
Review Request #10123 — Created Aug. 21, 2018 and submitted
Previously,
FileDiffs
for review requests with history would not show
cumulatively. That is, you would see only the result of applying that
FileDiff
, not the result of applying the entire stack ofFileDiffs
in the history graph.We now compute the entire file history, including deletions, and use
that to compute the cumulative diff. In other words, for a review
request with commitsA -> B -> C
where all three commits modify the
same file, previously you would see the result ofA
,B
, andC
independently. Now the diffviewer showsA
,A..B
, andA..C
.Files are still repeated (as indicated above) so this is not yet a true
cumulative diff. A future patch will update the diffviewer to only show
the leafFileDiffs
in the history graph.
- Ran unit tests.
- Uploaded a multi-commit review request and looked at the diff. I
observed cumulative (but repeated) diffs.
Description | From | Last Updated |
---|---|---|
E501 line too long (86 > 79 characters) |
reviewbot | |
E501 line too long (82 > 79 characters) |
reviewbot | |
E501 line too long (91 > 79 characters) |
reviewbot | |
E501 line too long (81 > 79 characters) |
reviewbot | |
E501 line too long (81 > 79 characters) |
reviewbot | |
E303 too many blank lines (2) |
reviewbot | |
F401 'reviewboard.diffviewer.models.DiffSet' imported but unused |
reviewbot | |
E303 too many blank lines (2) |
reviewbot | |
E303 too many blank lines (2) |
reviewbot | |
F811 redefinition of unused 'setUp' from line 2822 |
reviewbot | |
F401 'reviewboard.diffviewer.models.DiffSet' imported but unused |
reviewbot | |
E303 too many blank lines (2) |
reviewbot | |
E303 too many blank lines (2) |
reviewbot | |
Can you explicitly compare against 0? |
chipx86 | |
One blank line. |
chipx86 | |
Can you move the paren for the base_filediff stuff onto the next line, like: (newfile or (base_filediff is not None … |
chipx86 | |
You'll need to import range from six, or we get a list here on Python 2. |
chipx86 | |
Missing docstring. |
chipx86 | |
Missing docstring. |
chipx86 | |
Too many blank lines. |
chipx86 | |
Too many blank lines. |
chipx86 | |
We should compare in the returned order, not as a set, to catch future discrepencies. |
chipx86 | |
Since we're looping and asserting stuff in each loop, we should print out something to help identify the diff_file we're … |
chipx86 | |
This is indented 1 too many spaces. |
david | |
I personally find it more readable to do for i in reversed(range(len(ancestor_ids))). No biggie though. |
david |
- Testing Done:
-
~ - Uploaded a multi-commit review request and looked at the diff. I
observed cumulative (but repeated) diffs.
~ - TODO: Add unit tests.
~ - Ran unit tests.
~ - Uploaded a multi-commit review request and looked at the diff. I
observed cumulative (but repeated) diffs.
+ - TODO: Add unit tests.
- Uploaded a multi-commit review request and looked at the diff. I
- Change Summary:
-
Better architecture.
- Commit:
-
6768bdcb44671579184d7ab94dc12708bd0e7b901dbe3963e4b8c427f5d2152e83602493bd7f2dad
- Commit:
-
1dbe3963e4b8c427f5d2152e83602493bd7f2dadecec404ab7fb0e45af857d295606ccf66b95fe9f
Checks run (2 succeeded)
- Summary:
-
WIP: Show cumulative diffs in the diffviewerShow cumulative diffs in the diffviewer
- Testing Done:
-
- Ran unit tests.
- Uploaded a multi-commit review request and looked at the diff. I
observed cumulative (but repeated) diffs.
- - TODO: Add unit tests.
- Commit:
-
ecec404ab7fb0e45af857d295606ccf66b95fe9f80f2911476891ce37c947036b34de2ef1e4d7804
- Commit:
-
a9fcb81c2bd0a0a3ef140fcae3cffe211c8f882c29b588f387be58f5a1ff781ea99c75a882255acc
Checks run (2 succeeded)
- Commit:
-
29b588f387be58f5a1ff781ea99c75a882255acc5c0167db0e6081a5dbfb30144a7de89068f5c686
Checks run (2 succeeded)
- Change Summary:
-
Rebase
- Commit:
-
5c0167db0e6081a5dbfb30144a7de89068f5c686acf4912903c689ef8ac97441e2cb081369e14e35
Checks run (2 succeeded)
- Commit:
-
acf4912903c689ef8ac97441e2cb081369e14e352c0f8462989d794deae15244ae6f07e215a8562b
Checks run (2 succeeded)
- Change Summary:
-
Add more unit tests
- Commit:
-
2c0f8462989d794deae15244ae6f07e215a8562b037cc56cd51f3094e7f61a433b5df80a571c79c8
Checks run (2 succeeded)
- Change Summary:
-
Addressed feedback.
- Commit:
-
037cc56cd51f3094e7f61a433b5df80a571c79c83aeb572f153406c48a6f8e8c33ccba28c8a7d89f
Checks run (2 succeeded)
- Commit:
-
3aeb572f153406c48a6f8e8c33ccba28c8a7d89f7e6d55105315dd4111395d35139acf239033db97