[ce, ee, pr, compare] redo diffs, support side by side diffs, html diffs
One of the most requested features is side by side diffs for multiple files at the same time (eg. pull request & compare pages).
51 this is the end of a doc string 52 """ 53 return True
will mark the
return True part as a string.
Therefore the things we need in diffs are:
- Syntax highlighting based on the entire file, rather than the partial diff
- Inline comments + all relevant functionality
- Ajax file context loading (eg. click to load more lines of a file before/after the changed lines)
- In the browser conversion between raw/unified/side diffs - using JS
This will be exposed as a reusuable widget that can be used anywhere in Rhodecode, taking a diff reference as a sole argument.
The steps to create the diff are:
- Generate the diff chunks for each file
- Get the old and new versions of the files, highlight using pygments
- Use custom pygments renderer to generate the diff context:
- Using the original highlighted file lines which will have proper syntax highlighting colors
- Support both unified/sideside without modification
- Use a table that is copypaste friendly
- Add inline comments + functionality
- Expose load more file lines context functionality markers
- Render this in the template
This will also require an endpoint to get the partial N-M lines context of a file @ revision via ajax
Updated by Redmine Integration about 6 years ago
pullrequest merged by marcink (status: approved). https://internal-code.rhodecode.com/rhodecode-enterprise-ce/pull-request/2804