Opened 14 months ago
Last modified 6 days ago
#13861 new enhancement
Improve diff display
| Reported by: | Dirk Stöcker | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | version control | Version: | 1.6 |
| Severity: | normal | Keywords: | |
| Cc: | chealer@… | Branch: | |
| Release Notes: | |||
| API Changes: | |||
| Internal Changes: | |||
Description (last modified by )
The diff functionality in trac has a very simple method to show changes in a line. In JOSM wiki we use this diff a lot for translation and I wanted a better display. The attached patch improves trac/versioncontrol/diff.py to highlight differences more specifically.
Example
Attachments (4)
Change History (13)
by , 14 months ago
| Attachment: | update.diff added |
|---|
comment:1 by , 14 months ago
| Description: | modified (diff) |
|---|
comment:3 by , 14 months ago
I found one other usage of the function get_change_extent (without "s") in (mimeview/patch.py) which needs to be adapted as the one in diff.py. Code can be copied 1:1 it seems.
Yes. This seems identical to #6858, only for current codebase.
comment:4 by , 14 months ago
NOTE: Reverse sort is necessary, so the inserts of \0 and \1 are at correct positions.
comment:8 by , 6 days ago
| Cc: | added |
|---|---|
| Description: | modified (diff) |
Thank you very much Dirk, that looks like quite an improvement (judging from the provided example alone). I wish all of this could be handled by a library, but I'm glad your version seems to offload more of the work.👏
Is this about the source code browser only, or also improving the wiki and other components?
If I may:
- The variable names (
new,n,e) could be more descriptive. - "typles" should read "tuples".
This comment is from Philippe "Chealer" Cloutier. All of my comments and contributions in this ticket are offered under the terms of CC0 1.0 (unless otherwise noted).
comment:9 by , 6 days ago
I think we should keep the naming of the get_change_extent method because it is listed in __all__ and public.





The diff as file