Edgewall Software
Modify

Opened 6 years ago

Last modified 3 years ago

#6858 new enhancement

Improve intra-line diff highlighting

Reported by: cboos Owned by: cboos
Priority: normal Milestone: next-major-releases
Component: version control/changeset view Version:
Severity: minor Keywords: diff
Cc: a.a.vykhodtsev@…, franz.mayer@…
Release Notes:
API Changes:

Description

Looking at this one: http://trac.edgewall.org/wiki/TracInstall?action=diff&version=231

  • TracInstall

     
    4343* [http://www.postgresql.org/ PostgreSQL]  
    4444* [http://initd.org/projects/psycopg2 psycopg2] or [http://pypgsql.sourceforge.net/ pyPgSQL]  
    4545 
    46  '''Warning''': Postgresql-8.3 uses a strict type checking mechanism. To use trac with the 8.3 Version of Postgresql, you will need the latest version of trac.  
     46 '''Warning''': PostgreSQL 8.3 uses a strict type checking mechanism. To use Trac with the 8.3 Version of PostgreSQL, you will need the latest version of Trac.  
    4747 
    4848=== For MySQL ===  
    4949 

I think we should be able to do much better, something like:

  • TracInstall

    old new
    4343* [http://www.postgresql.org/ PostgreSQL]
    4444* [http://initd.org/projects/psycopg2 psycopg2] or [http://pypgsql.sourceforge.net/ pyPgSQL]
    4545
    46 '''Warning''': Postgresql-8.3 uses a strict type checking mechanism. To use trac with the 8.3 Version of Postgresql, you will need the latest version of trac.
    46 '''Warning''': PostgreSQL 8.3 uses a strict type checking mechanism. To use Trac with the 8.3 Version of PostgreSQL, you will need the latest version of Trac.
    4747
    4848=== For MySQL ===
    4949

That would be especially useful for Wiki text diffs, where it's common to have one line for a full paragraph, but the clarity of code diffs would probably benefit of this enhancement as well.

A somewhat related enhancement would be to have an heuristic for triggering the intra-line diff highlighting also when the base and new block length differ, as it's common to have common lines changed together with lines added/removed, in the same chunk.

Attachments (1)

Ticket-6858-intraline-diff.patch (2.0 KB) - added by psuter 3 years ago.
Use difflib to markup intraline changes.

Download all attachments as: .zip

Change History (8)

comment:1 Changed 6 years ago by a.a.vykhodtsev@…

  • Cc a.a.vykhodtsev@… added

comment:2 Changed 6 years ago by mark.freund@…

  • Cc mark.freund@… added

comment:3 Changed 4 years ago by cboos

  • Milestone changed from 1.0 to unscheduled

Milestone 1.0 deleted

comment:4 Changed 4 years ago by cboos

  • Milestone changed from triaging to next-major-0.1X

comment:5 Changed 4 years ago by mark.freund@…

  • Cc mark.freund@… removed

comment:6 Changed 3 years ago by framay <franz.mayer@…>

  • Cc franz.mayer@… added

+1 on this ticket. That would be useful for our installation as well, since we change description and custom textarea fields in ticket quite often.

comment:7 Changed 3 years ago by psuter

I still got a patch for this somewhere. I'm not sure how much of a performance impact (if any) there is though. Maybe the old approach should be kept as an option somehow?

Changed 3 years ago by psuter

Use difflib to markup intraline changes.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as new The owner will remain cboos.
as The resolution will be set. Next status will be 'closed'.
The owner will be changed from cboos to anonymous. Next status will be 'assigned'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.