Modify ↓
Opened 19 years ago
Closed 19 years ago
#1985 closed defect (fixed)
diff processor displays wrong line number (+1)
Reported by: | Owned by: | Christopher Lenz | |
---|---|---|---|
Priority: | normal | Milestone: | 0.9 |
Component: | wiki system | Version: | devel |
Severity: | minor | Keywords: | |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
The diff processor (in wiki/ticket, not in browser) displays wrong line number added by 1.
For example, I put a raw diff text and a processed one to compare. both has same content.
--- templates/changeset.cs (revision 2143) +++ templates/changeset.cs (working copy) @@ -106,7 +106,8 @@ <dt class="author">Author:</dt> <dd class="author"><?cs var:changeset.author ?></dd> <dt class="message">Message:</dt> - <dd class="message" id="searchable"><?cs var:changeset.message ?></dd> + <dd class="message" id="searchable"><?cs + alt:changeset.message ?> <?cs /alt ?></dd> <dt class="files">Files:</dt> <dd class="files"> <ul><?cs each:item = changeset.changes ?>
-
templates/changeset.cs
106 106 <dt class="author">Author:</dt> 107 107 <dd class="author"><?cs var:changeset.author ?></dd> 108 108 <dt class="message">Message:</dt> 109 <dd class="message" id="searchable"><?cs var:changeset.message ?></dd> 109 <dd class="message" id="searchable"><?cs 110 alt:changeset.message ?> <?cs /alt ?></dd> 110 111 <dt class="files">Files:</dt> 111 112 <dd class="files"> 112 113 <ul><?cs each:item = changeset.changes ?>
Attachments (0)
Change History (6)
comment:1 by , 19 years ago
comment:2 by , 19 years ago
Owner: | changed from | to
---|---|
Severity: | normal → minor |
Status: | new → assigned |
comment:4 by , 19 years ago
Owner: | changed from | to
---|---|
Status: | assigned → new |
I'll take this (sorry cboos). If you have a unit test ready, that'd be cool of course ;-)
comment:5 by , 19 years ago
Status: | new → assigned |
---|
Note:
See TracTickets
for help on using tickets.
This is due to bug of
PatchRenderer._diff_to_hdf()
caused by the difference of 'line number' (1 base) and 'offset number' (0 base). Here is a patch:patch.py
, 'base.lines': [],,'changed.lines': []})